About multi-tenant Canvas

1,614 views
Skip to first unread message

Trương Hoàng Dũng

unread,
Nov 20, 2012, 7:52:31 AM11/20/12
to canvas-l...@googlegroups.com
Hi all.
I've manually created new account in the Accounts table, so that i can get more Managed Accounts in Canvas (besides two default accounts).
I'd love to know which way Canvas support multi tenant (by creating new Schema in Postgres for each subdoman/account) or anything else ?
Do you know any way to implement that feature in Canvas ?
Thank you very much.

Obinna Ukwueze

unread,
Feb 12, 2013, 2:38:12 PM2/12/13
to canvas-l...@googlegroups.com
I would also love to learn how to configure multi-tenancy in canvas

Juan Miguel Ávila Nieto

unread,
Feb 12, 2013, 3:30:33 PM2/12/13
to canvas-l...@googlegroups.com
I'm afraid canvas-lms community version does not support multi-tenancy. I think there is a commercial version that has this feature. So, I don't know if any developer of Instructure is able to give us this answer. A clue at least would be great :)

Zach Wily

unread,
Feb 12, 2013, 3:31:41 PM2/12/13
to canvas-l...@googlegroups.com
That is correct - multi-tenancy is not included in the open-source version of Canvas.

--
Zach Wily | VP Engineering

--
 
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Colin Murtaugh

unread,
Feb 25, 2013, 12:10:14 PM2/25/13
to canvas-l...@googlegroups.com
Zach --

I've read here that multi-tenancy is available as a commercial plugin from Instructure, but I haven't been able to locate any more details. 

Is this true, and if so is there any documentation/pricing details available?

(I've also asked this via the sales channel and did not get an answer.)

Thanks --
Colin

Zach Wily

unread,
Feb 25, 2013, 12:11:22 PM2/25/13
to canvas-l...@googlegroups.com
Colin,

No, multi-tenancy is not available as a commercial plugin. We have such a plugin developed internally, but only for use on Canvas Cloud.

--
Zach Wily | VP Engineering

to...@klepper.us

unread,
Feb 27, 2013, 5:17:47 PM2/27/13
to canvas-l...@googlegroups.com
If you edit the database directly, you can add a top level account. Entries are needed in the accounts table (to create the account) and account_users (so your user can see it). After that your user can add sub-accounts normally to it. This worked for me anyway.

Juan Miguel Ávila Nieto

unread,
Mar 1, 2013, 7:36:58 AM3/1/13
to canvas-l...@googlegroups.com
Hi carter,
sorry I can't understand it. Do you mean that if you create a new root account by hand in database, then you can 'simulate' the multi-tenancy?

I know that when you init db you get an Account Admin, and an account for your institution. So I don't see why I should create such account you say, because the account for my institution could have many sub-accounts that should be 'Another institutions'.


Does it have any sense?

thanks

CarterK

unread,
Mar 7, 2013, 9:46:28 AM3/7/13
to canvas-l...@googlegroups.com
I am not sure what all you are looking for when you ask for multi-tenancy. I was simply referring to being able to have multiple root accounts. Currently canvas only gives you your Site Admin and one root account. It is actually a little simpler that I first described. 

  • You can create a sub-account in canvas through the normal interface.
  • Make sure you add an admin user to the sub-account ( your own user or someone else).
  • Then there are only two changes you need to make in the database
    • Find the sub-account that you just created in the accounts table
      1. Remove the Parent ID
      2. Remove the Root Account ID
When you go back into canvas, the sub-account you created will be a root account with all the settings and options available to a root account.

Hope that helps

Colin Murtaugh

unread,
Mar 9, 2013, 8:51:23 AM3/9/13
to canvas-l...@googlegroups.com
I was able to convert a sub-account into a root account by removing the Parent ID and the Root Account ID as you suggest, but now I can't seem to save settings for this modified account.  I do see all of the root-level account settings in the form, but when I save it I get a "Account settings update failed" message.  The log isn't particularly helpful; I just see:

[...]   SQL (0.2ms)   BEGIN
[...]   SQL (0.2ms)   ROLLBACK

instead of the regular update.  Do you see this behavior too?  I'm guessing that there's something else that I need to modify in the database to get this account to work properly, but I haven't found it yet.  

Colin Murtaugh

unread,
Mar 9, 2013, 9:33:54 AM3/9/13
to canvas-l...@googlegroups.com
FWIW, the error I was seeing is related to the sis_source_id in the accounts table; for a manually-created account (that has no sis_source_id), I can promote a sub-account to a root account with no problem.  For a sub-account that was created by a SIS import, I get the error message described below. Not really a big deal; it's reasonable to just manually create the accounts that will be top-level accounts.

--Colin

Trương Hoàng Dũng

unread,
Mar 9, 2013, 9:02:06 PM3/9/13
to canvas-l...@googlegroups.com
In case you can map each root domain account with a name domain you can get benefit of the multi-tenancy. I don't see the benefit of root account in comparison with sub-account. I guess in Canvas Cloud, each root account must be lied in a seperate schema or database to support data partitioning (for scalability).

atlan...@gmail.com

unread,
Feb 26, 2014, 5:48:49 PM2/26/14
to canvas-l...@googlegroups.com
This doesn't appear to have worked for me.  Any insight?

1) create the subaccount (HelpDesk) and add myself as admin

2) locate the subaccount in the accounts table:
canvas_production=# SELECT name,parent_account_id,root_account_id FROM accounts;
           name           | parent_account_id | root_account_id 
--------------------------+-------------------+-----------------
 Manually-Created Courses |                 1 |               1
 Helpdesk 201             |                 1 |               1
 Helpdesk 101             |                 1 |               1
 default domain           |                   |                
 Site Admin               |                   |                
 HelpDesk                 |                 1 |               1
 HelpDesk                 |                 1 |               1
(8 rows)

**There are (2) HelpDesk values listed because I had created, deleted, and recreated.

3) set the values for Parent ID and Root Account ID to NULL
canvas_production=# UPDATE accounts SET parent_account_id=NULL, root_account_id=NULL WHERE name='HelpDesk';
UPDATE 2

4) verify the values are NULL
canvas_production=# SELECT name,parent_account_id,root_account_id FROM accounts;
           name           | parent_account_id | root_account_id 
--------------------------+-------------------+-----------------
 Manually-Created Courses |                 1 |               1
 Helpdesk 201             |                 1 |               1
 Helpdesk 101             |                 1 |               1
 default domain            |                   |                
 Site Admin               |                   |                
 HelpDesk                 |                   |                
 HelpDesk                 |                   |    

atlan...@gmail.com

unread,
Feb 26, 2014, 6:20:29 PM2/26/14
to canvas-l...@googlegroups.com, atlan...@gmail.com
Even though I restarted postgresql and apache, I apparently had a cached copy of the page in my browser.  After a few minutes it changed to a root account.
Still, this method appears to create the foundation, but some features, like Terms and Authentication are still only visible under the original root that was created during deployment.

Other than providing a bit more organizational ability, this isnt that different from just creating a subaccount and making sure to add yourself (or whoever) as an admin.  I dont see any other benefit unless i'm missing something?

Maria Breger

unread,
Aug 19, 2015, 12:19:00 PM8/19/15
to Canvas LMS Users
Are you saying that you were able to directly update your Canvas database?  I thought we were not allowed access to even see it (any Schema), let alone update it!

Graham Ballantyne

unread,
Aug 19, 2015, 1:07:03 PM8/19/15
to canvas-l...@googlegroups.com
Holy thread necromancy, Batman!

If you're self-hosting the open-source version, you can do whatever you want. You have full access to the code and your database.

If Instructure is hosting for you, then no, you can't touch the database.

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arun kumar

unread,
Mar 1, 2016, 3:55:40 AM3/1/16
to Canvas LMS Users, atlan...@gmail.com
Connect to redis-cli and run flushall. 
Reply all
Reply to author
Forward
0 new messages