Creating a New Tenancy

An infrastructure administrator sets up a tenancy from the Service Enclave and provides access details to the primary tenancy administrator. Then the tenancy administrator can start configuring additional user accounts and cloud resources in the Compute Enclave.

Using the Service Web UI

  1. In the navigation menu, click Tenancies.

  2. In the top-right corner of the Tenancies page, click Create Tenancy.

    The Create Tenancy window appears.

  3. Fill out the tenancy details:

    • Name: Enter a name for the new tenancy.

    • Description: Optionally, enter a description for the new tenancy.

    • Service Namespace: Set a unique namespace for all resources created within this tenancy.

    • Authentication Credentials: Set a user name and password for the primary tenancy administrator.

      This account must be used to log in to the tenancy for the first time. The tenancy administrator sets up additional user accounts, defines compartments, policies and other resources, and generally configures the cloud environment so that users can start deploying their required resources.

  4. Click Save Changes to create the new tenancy.

    The new tenancy is displayed in the Tenancies list.

Using the Service CLI

  1. Create a new tenancy with the create Tenant command.

    The name, namespace and admin account credentials are required parameters; a description is optional.

    Syntax (entered on a single line):

    create Tenant 
    name=<tenancy_name> 
    serviceNamespace=<tenancy_namespace> 
    description=<tenancy_description> 
    adminUserName=<tenancy_admin_user_name> 
    adminPassword=<tenancy_admin_password> 
    confirmPassword=<tenancy_admin_password>

    Example:

    PCA-ADMIN> create Tenant name=myTestTenancy serviceNamespace=test description="A tenancy for testing purposes" \
    adminUserName=testadmin adminPassword=************ confirmPassword=************
    Command: create Tenant name=myTestTenancy serviceNamespace=test description="A tenancy for testing purposes" adminUserName=testadmin adminPassword=***** confirmPassword=*****
    Status: Success
    Time: 2021-09-08 08:54:44,778 UTC
    JobId: a0ee398f-5d44-4b3f-8b9c-e5a9692c36a4
    Data:
      id:ocid1.tenancy.....<uniqueID>  name:myTestTenancy
  2. Use the job ID to check the status of your command.

    PCA-ADMIN> show Job id=a0ee398f-5d44-4b3f-8b9c-e5a9692c36a4
    Command: show Job id=a0ee398f-5d44-4b3f-8b9c-e5a9692c36a4
    Status: Success
    Time: 2021-09-08 08:55:11,125 UTC
    Data:
      Id = a0ee398f-5d44-4b3f-8b9c-e5a9692c36a4
      Type = Job
      AssociatedObj = id:ocid1.tenancy.unique_ID  type:Tenant  name:myTestTenancy
      AssociatedObj Type = Tenant
      AssociatedObj Id = ocid1.tenancy.unique_ID
      Done = true
      Name = CREATE_TYPE
      Run State = Succeeded
      Transcript = null2021-09-08 08:54:44.753 : Created job CREATE_TYPE
    
      Username = admin
  3. Verify that the new tenancy was created correctly. Use the list and show commands to display the tenancy information.

    PCA-ADMIN> list Tenant
    Command: list Tenant
    Status: Success
    Time: 2021-09-08 08:55:44,669 UTC
    Data:
      id                            name
      --                            ----
      ocid1.tenancy.unique_ID   myTenancy1
      ocid1.tenancy.unique_ID   myTenancy2
      ocid1.tenancy.unique_ID   myTenancy3
      ocid1.tenancy.unique_ID   myTestTenancy
    
    PCA-ADMIN> show Tenant name=myTestTenancy
    Command: show Tenant name=myTestTenancy
    Status: Success
    Time: 2021-09-08 08:56:09,484 UTC
    Data:
      Id = ocid1.tenancy.unique_ID
      Type = Tenant
      Name = myTestTenancy
      Description = A tenancy for testing purposes
      Service Namespace = test
  4. Provide the Compute Web UI URL, tenancy name, user name and password to the primary tenancy administrator. The tenancy is now ready for use.

    The tenancy administrator sets up additional user accounts, defines compartments, policies and other resources, and generally configures the cloud environment so that users can start deploying their required resources.