OCI: Understanding Compartments, Users, and Groups in Oracle Cloud Infrastructure (OCI) Part -2

 When you managing resources(Storage,Network,etc) in Oracle Cloud Infrastructure (OCI), understanding how to effectively use compartments, users, and groups is crucial. These elements help you organize, control access, and manage resources efficiently.

What is a Compartment?

A compartment in OCI is a logical container to organize and control access to your resources, such as compute instances, networks, and load balancers. Here's how you can use compartments:

Compartments:

Create Policies: Write policies to protect resources in specific compartments.

Business Requirements: Based on your needs, you can create multiple compartments (e.g., Finance, HR, Network).

Management: For finance compartment can help manage all finance-related projects.


Key Points About Compartments

1. Root Compartment: When you create a cloud account, a root compartment is created automatically.

2. Global Sharing: Compartments are global, meaning you can share them across regions (e.g.,       Ashburn, UK-London).

3. Resource Placement: When creating resources (compute, storage, etc.), decide which compartment they should be placed in.

4. User Assignment: Users can be added to multiple compartments.

5. Policy Creation: After creating a compartment, create policies; otherwise, resources remain idle.

6. Rename/Delete: Compartments can be renamed or deleted.

7. Resource Movement: Resources can be moved from one compartment to another.

8. Deleting Compartments: Before deleting a compartment, ensure all resources within it are deleted first.

Identity Access Management 

IAM services lets you control who has access to your cloud resources in OCI

Resources are compute,storage,network,database,etc.

You can control what type of access of group of users have and to which speacific resource.

Users and Groups in OCI

Root User:

    The root user is a global administrator for your OCI account.

    This user is created automatically when you create an OCI account.

    You can configure multiple root users, each with different root privileges.

Users:

    Users are non-root users created based on your requirements.

    After creating a user, you need to add them to a group, which has associated policies.

    A group is a collection of users needing the same access level.

    A single user can belong to multiple resources.

Example: Creating a Test Compartment in OCI

Let's walk through an example where we create a test compartment named "Finance" and add an administrator user to it. This example will cover the creation of four OCI resources:

  1. Compartment
  2. Group
  3. User

Creating a Compartment

Open the navigation menu. Under Governance and Administration, go to Identity and
click Compartments




Here list of compartment is showing Sanjeevbe18 is my root compartment. When I create the OCI account root compartment will create


To create the compartment click Create Compartment.





Name:  Enter the name of your compartment (Example: HR,Finance,Network)

Description: Enter the the description for the compartment. If you want you can change description later.

Parent Compartment : Choose Root Compartment

Tages: Optionally, you can apply tags

Click Create Compartment.

Your compartment is displayed in the list.



Creating a Group in OCI: 

Groups in OCI are essential for managing collections of users efficiently. In this guide, we will walk you through the steps to create a group named "FinanceGroup,".

Open the navigation menu. Under Governance and Administration -> Identity -> domains -> Root compartment -> default -> group



Select Root Compartment click on default



Click Group and create group


Create group:

Name:  Enter the name of your compartment (Example: HR,Finance,Network)

Description: Enter the the description for the compartment. If you want you can change description later.

Tages: Optionally, you can apply tags


Click Create groups.

Your groups is displayed in the list.


Create a new User

Open the navigation menu. Under Governance and Administration -> Identity -> domains -> Root compartment -> default -> users

Click Users -> Create User






Accounts User created



Add a New user to Group

 

Open the navigation menu and click Identity->Domains->Default domain->Groups

Select the user that you want to modify.

Click Assign user to groups. To search for groups to assign to the user account, in the search field, enter all or part of the beginning of the group names or descriptions that you want to locate.

In the Assign user to groups window, select the checkbox for each group that you want to assign to the user account.

Click Assign user.







Resetting a User Password




Comments

Popular posts from this blog

How to troubleshoot long running concurrent request in R12.2

How to run Gather Schema Statistics in R12.2

How to compile forms in R12.2