In this video, I'll show you how to create a tenancy on Oracle Private Cloud Appliance.
A tenancy is an environment where Compute Enclave users create and manage cloud resources
such as compute instances, virtual cloud networks, and storage resources.
Tenancy management however, that is the creation and deletion of tenancies, is performed by
the appliance administrator using the Service Enclave.
When a tenancy is created, it has only one Compute Enclave user account: the tenancy
administrator, who has full access to all resources in the tenancy.
And because there is a strict separation between the Service Enclave and the Compute Enclave,
the appliance administrator who creates the tenancy, needs to pass on the tenancy details
to the tenancy administrator.
Here a some security considerations to take when creating a tenancy.
First of all, it's important to remember that you are creating a partition in the system
that should be secure from another partition in the system.
As such, do *not* assign a default password for the compute enclave that was used to create
another Tenancy.
Try *not* to create a default username for the new tenancy.
For example, why use ‘admin’, why not use a real username for the tenancy since
they can create more in the tenancy.
And use a Name and Description that will be useful for other administrators.
I'll first demonstrate how to create a tenancy from the Service Web UI.
From a browser enter https://adminconsole...
Here I'm showing the adminconsole URL that I mentioned, blurred out for security purposes.
I'll log on as the admin user.
From the dashboard, I'll click Tenancies.
And from here, I'll click Create Tenancy.
I'll provide a name.
You can optionally provide a description.
The service namespace sets a unique namespace for all resources created within the tenancy.
I'll scroll down to the Authentication section.
Here you set the user name and password for the primary tenancy administrator.
This is the Compute Enclave user account I mentioned at the begining of this video.
This account must be used to log in to the tenancy for the first time.
The tenancy administrator uses the Compute Enclave, either the Web UI, or the OCI CLI,
to set up additional user accounts and user groups, define compartments, policies and
other resources, and generally configures the cloud environment so that users can start
deploying resources.
I'll use admin for the Admin Username, which is something that I advised against doing
earlier in this video.
I'll provide the password and confirm the password and then click Create Tenancy.
Our new tenancy is displayed.
You also have options to Edit and Delete the tenancy in the top right corner of the window.
This concludes the Service Web UI demonstration portion of this video.
I'll now demonstrate tenancy creation using the service command-line-interface.
To access the Service CLI, run the command ssh admin@management_node -p 30006.
I'll run this command and provide the admin password and now I get the PCA-ADMIN prompt.
I'll first run the 'list tenant' command.
The output shows the services tenancy I created earlier in this demonstration from the Service
Web UI.
To create a new tenancy, I'll run the 'create tenant' command and provide the required parameters.
I'll name the new tenancy 'demo'.
I'll call the namespace 'demo' also.
I'll provide a description of 'demonstration tenant'.
I'll provide an admin user name of 'admin'.
I could continue to type and let the command wrap but the command-line interface provides
a new line character, a backslash, which I type.
On the new line, I'll type the admin password but it appears as a string of asterisks.
And the final parameter is 'confirmPassword' for which I type the password again but it
too appears as a string of asterisks.
The output shows that the command was a success and includes the OCID of the new tenancy.
Also notice that a JobID is created.
You can show details of a job by running the command 'show job id=' and then provide the
JobID.
I'll run the 'list tenant' command again and the output includes the new tenant named demo.
I next want to demonstrate how to edit a tenancy.
The only tenancy property that an administrator can modify at this time is the description.
First I'll show the existing description by running the command 'list tenant fields name,
description'.
The description for the demo tenancy wraps on the screen but it is 'demonstration tenant'.
I'll use the 'edit' command to change the description to "New Description".
I'll type 'edit tenant name=demo description="New Description"'.
The command was a success and a JobID is created.
I'll run the 'list' command again to verify that the demo tenancy now has a new description.
Finally, I'll use the 'delete' command to delete the demo tenancy.
Make sure that tenancy users have removed all their resources.
A tenancy can only be deleted if it is empty.
I'll type 'delete tenant name=demo'.
Status is running and a JobID is created.
I'll view the Job by running the command 'show job id=' and include the JobID.
The job succeeded.
Now I'll run 'list tenant' and the demo tenant is gone.
To exit the Service CLI interface, type exit.
This concludes this demonstration.
Thank you for watching.
Please check our additional information on Oracle Private Cloud Appliance in the Oracle
Private Cloud Appliance Documentation or in the Oracle Private Cloud Appliance Learning
Library.