Tuesday, October 3, 2023

Tenancy Administrative Tasks with OCI Console, and OCI CLI



Creating a Tenancy

To create a tenancy using the OCI Console:

1. Go to the OCI Console.

2. Click Identify > Tenancies.

3. Click Create Tenancy.

4. Enter the required information and click Create Tenancy.


To create a tenancy using the OCI CLI:

1. Install the OCI CLI.

2. Run the following command:


oci tenancy create --name <tenancy_name> --compartment-ocid <compartment_ocid>


Creating a User

To create a user using the OCI Console:

1. Go to the OCI Console.

2. Click Identify > Users.

3. Click Create User.

4. Enter the required information and click Create User.


To create a user using the OCI CLI:

1. Run the following command:

oci user create --name <user_name> --email <user_email> --password <user_password>


Assigning Permissions to a User

To assign permissions to a user using the OCI Console:

1. Go to the OCI Console.

2. Click Identify > Users.

3. Click the user's name.

4. Click Assign Permissions.

5. Select the permissions you want to assign to the user.

6. Click Assign.


To assign permissions to a user using the OCI CLI:

1. Run the following command:

oci user policy assign --user-ocid <user_ocid> --policy-name <policy_name>


Creating a Compartment

To create a compartment using the OCI Console:


1. Go to the OCI Console.

2. Click Govern > Compartments.

3. Click Create Compartment.

4. Enter the required information and click Create Compartment.


To create a compartment using the OCI CLI:

1. Run the following command:

oci compartment create --name <compartment_name> --description <compartment_description> --compartment-id-in-parent <parent_compartment_ocid>


Creating a Resource

To create a resource using the OCI Console:

1. Go to the OCI Console.

2. Click the type of resource you want to create.

3. Enter the required information and click Create.


To create a resource using the OCI CLI:

1. Run the appropriate command for the type of resource you want to create. For example, to create a compute instance, you would run the following command:


oci compute instance create --name <instance_name> --shape <shape_name> --image-id <image_id> --compartment-id <compartment_ocid>


Monitoring Your Tenancy

To monitor your tenancy using the OCI Console:

1. Go to the OCI Console.

2. Click Monitoring.

3. Select the metrics you want to monitor.


To monitor your tenancy using the OCI CLI:

1. Run the following command to get a list of all the metrics that are available:

oci monitoring metric list


2. Once you have a list of metrics, you can run the following command to get the value of a specific metric:

oci monitoring metric get --metric-name <metric_name> --resource-id <resource_ocid>


Troubleshooting Tenancy Issues

To troubleshoot tenancy issues using the OCI Console:


1. Go to the OCI Console.

2. Click Troubleshooting.

3. Select the area of the tenancy that you are having problems with.

4. Follow the instructions to troubleshoot the problem.


To troubleshoot tenancy issues using the OCI CLI:

1. Run the following command to get a list of all the troubleshooting logs that are available:

oci troubleshooting log list


2. Once you have a list of logs, you can run the following command to get the content of a specific log:

oci troubleshooting log get --log-name <log_name>


By following these steps, you can perform a variety of tenancy administrative tasks using the OCI Console and the OCI CLI. You can also use these tools to troubleshoot tenancy issues. 

No comments:

Post a Comment

Creating and Managing Subnets Administrative Tasks

  Creating a Subnet To create a subnet using the OCI Console: 1. Go to the OCI Console. 2. Click Networking > Virtual Cloud Networks. 3. ...