jimasp
jimasp

Reputation: 992

Orchard CMS - Setting up Tenants from the Command Line

It is good practice to run acceptance tests against a clean install.

We run acceptance tests nightly as part of our CI.

When we run a build, we basically:

  1. delete the database.
  2. create a clean database.
  3. run orchard setup using the command line (which populates the database).
  4. enable required features using orchard command line.
  5. start up IISExpress
  6. run the acceptance (selenium) tests

This works great, but now we have another tenant, and we need to run our acceptance tests against that tenant.

The tenant uses a different DataPrefix and RequestUrlHost.

How do we setup the tenant from the command line on a fresh install?

Upvotes: 3

Views: 920

Answers (1)

jimasp
jimasp

Reputation: 992

After a bit of playing with the command line, I found the answer:

Orchard.exe feature enable Orchard.MultiTenancy

Orchard.exe tenant add mytenant /Host:mytenant.mysite

Orchard.exe setup /t:mytenant /SiteName:mytenant.mysite /DatabaseTablePrefix:mytenant /AdminUsername:admin /AdminPassword:password  /DatabaseProvider:SQLServer /DatabaseConnectionString:"Data Source=localhost;Initial Catalog=Orchard;Persist Security Info=True;User ID=sa;Password=password"

Upvotes: 4

Related Questions