Professional Documents
Culture Documents
257 C106637GC10 Ag OCI Explorer
257 C106637GC10 Ag OCI Explorer
Activity Guide
C106637GC10
Disclaimer
This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy
and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any
way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print,
display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express
authorization of Oracle.
The information contained in this document is subject to change without notice and is not warranted to be error-free. If you find
any errors, please report them to us in writing.
If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded,
installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other
Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer
software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.
As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or
adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or
activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle
data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the
U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted
to the U.S. Government.
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective
owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license
and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or
registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This documentation may provide access to or information about content, products, and services from third parties. Oracle
Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party
content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation
and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content,
products, or services, except as set forth in an applicable agreement between you and Oracle.
1009112020
Table of Contents
Free Trial
The Free Trial provides you with $300 of cloud credits that are valid for up to 30 days. You may
spend these credits on any eligible Oracle Cloud Infrastructure service.
Paid resources that were provisioned with your credits during your free trial are reclaimed by
Oracle unless you upgrade your account.
The following list summarizes the Oracle Cloud Always Free-eligible resources that you can
provision in your tenancy:
Compute (up to two instances)
Autonomous Database (up to two database instances) with powerful tools like Oracle
Application Express (APEX) and Oracle SQL Developer
Load Balancing (one load balancer)
Block Volume (up to 100 GB total storage)
Object Storage (up to 20 GB)
Vault (up to 20 keys and up to 150 secrets)
Overview
In this practice we are going to sign up for Oracle Cloud and create your free account.
Prerequisites
Email ID
Address
Mobile Number
Credit card details
Note: Some of the UIs might look a little different than the screenshots included in the
instructions, but you can still use the instructions to complete the hands-on labs.
Tasks
1. Launch a web browser on your local system and navigate to this URL:
https://www.oracle.com/in/cloud/free/
2. On the sign in page, click "Start for free" and continue to the next screen.
3. In the Create Account section, select County/Territory from the drop-down list and
provide the Email address, click Next, and continue.
4. On the Enter Account Details page, provide the following details:
13. Finally, you will see the Cloud web console page where all the resources will be shown.
This completes the practice 1 of creating your free Oracle Cloud account.
Overview
This topic provides basic information about the Oracle Cloud infrastructure resources.
When you sign in to the Console, you see the home page.
Use the navigation menu in the upper left to navigate to the service pages where you
create, manage, and view your cloud resources.
The Help menu provides links to the documentation and to Oracle Support.
Use the Quick Actions menu in the body of the home page to navigate directly to common
tasks, like creating a VM instance, setting up a network with a wizard, and setting up a load
balancer. Use these links to set up your environment.
Start Exploring
The Start Exploring section of the home page provides links to resources that demonstrate how
to use Oracle Cloud Infrastructure to build solutions.
In the Get Started tab, you find introductory materials that you can use to learn more about
Oracle Cloud Infrastructure basics, such as information about virtual training classes, key
concepts, and introductory demos.
In the Deploy Websites & Apps tab, you find tutorials that leverage both basic and more
advanced features available in Oracle Cloud Infrastructure to build solutions.
In the Manage Bills tab, you can learn about the billing and payment tools that Oracle Cloud
Infrastructure offers to make it easy to manage your service costs.
Exploring Tenancy
Viewing the Tenancy Details Page
1. Log in to Oracle Cloud Console web page with your credentials and open the Profile menu
3. Click Menu on the top-left corner and explore the options and available services. You
will use this navigation path through the practice.
Details About Your Tenancy
The tenancy details page provides the following information about your tenancy:
TENANCY OCID
Every Oracle Cloud Infrastructure resource has an Oracle-assigned unique ID called an
Oracle Cloud Identifier (OCID). You need your tenancy's OCID to use the API. You'll also
need it when contacting support.
NAME
Your tenancy names. Your tenancy name is typically chosen when you set up your Oracle
Cloud account.
CSI NUMBER
Your Customer Service Identifier for Oracle Support
TAGS
Tagging allows you to define keys and values and associate them with resources. You can
then use the tags to help you organize and list resources based on your business needs. If
you have permissions to manage the tenancy, you also have permissions to apply free-form
tags. To apply a defined tag, you must have permissions to use the tag namespace. For
more information about tagging, see Resource Tags.
SERVICE LIMITS
The limits allotted to your tenancy and usage against these limits. Not all service resources
are included in the list shown here on the Console. For more information or to request an
increase, see Service Limits.
Overview
In this practice session, we will create a compartment called "ocilabs-comp" and grant a user
access to it.
To grant users access to the compartment and all the resources in it, you will create a group
“ocilabs-group” and then create a policy “ocilabs-policy” to define the access rule.
Finally, add the “ocilabs-user” to this group to grant them access to the ocilabs-comp
compartment.
Creating Compartment
Prerequisites
Compartment Name
Compartment Description
Parent Compartment Name
Tag Namespaces
Tasks
1. Click Menu on the top-left corner and navigate to Menu > Identity > Compartments
2. Once inside the Compartments menu, click Create Compartment.
3. Fill in the compartment details we had collected before and click Create Compartment at
the bottom left of the screen.
4. You should be able to see the newly created compartment in the list of compartments.
Creating Group
Prerequisites
Group Name
Group Description
Tag Names
Tasks
1. Click Menu on the top-left corner and navigate to Identity > Groups and click Create
Group.
2. Provide the required details and click Create.
3. The group has been created and listed along with other groups in the page.
Prerequisites
Policy name and description
Policy statement
Policy statement
Allow group ocilabs-group to manage all-resources in compartment ocilabs-comp
Tasks
1. Click Menu on the top-left corner and navigate to Menu > Identity > Policies
2. Once inside the policy menu, click Pick a compartment and click Create Policy.
Note: This compartment name may vary for your instance.
3. Fill in the policy details we had collected before and click Create Policy at the bottom left of
the screen.
Prerequisites
The first name and last name of the user.
Their email address, alternate email address, and mobile phone number.
Tasks
1. Click Menu on the top-left corner and navigate to Identity and click Users.
2. The user management page appears and click Create User.
3. Provide the required information for the user and click Create.
4. The user is created, and you will receive an email to activate their account.
5. Generate a temporary password for the newly created user. Click username and then
Create/Reset Password.
6. Copy the password to text editor.
Prerequisites
Group Name
User Name
1. Sign out from the console, open a new browser in an incognito window and navigate to the
URL
https://console.ap-mumbai-1.oraclecloud.com/
Provide the Tenant name and click Continue.
2. Enter the user name ocilabs-user with the password generated in the previous step and
click Sign In.
3. Change the temporary password and click Save New Password.
4. You will get the web cloud console page and you will be able to access the always free
resource from the menu.
5. The user name can be verified under the profile icon ).
This completes the task of creating compartment, groups, users, and policy.
Overview
You will perform the following tasks in this practice:
Create Virtual Cloud Network
Launch Cloud Shell
Generate SSH Keys
Create Bastion Instance
Prerequisites
Oracle Cloud Infrastructure account credentials (Tenant, User, Password, and
Compartment)
URL for the Console: https://console.ap-mumbai-1.oraclecloud.com/
Note: Some of the UIs might look a little different than the screenshots included in the
instructions, but you can still use the instructions to complete the hands-on labs.
Overview
In this practice we are going to create a VCN and required network resources.
Tasks
1. Launch a web browser on your local system and navigate to https://console.ap-mumbai-
1.oraclecloud.com/ or an equivalent link provided to you.
2. On the sign in page, click Change tenant if required, enter the cloud tenant or the domain
assigned to you as part of your account information, and click Continue.
3. In the Oracle Cloud Infrastructure section, enter the cloud account User Name and
Password assigned to you and click Sign In.
4. At this point, you should be logged in to Oracle Cloud Infrastructure (OCI) Dashboard,
also called as the OCI web console.
5. Click Menu on the top-left corner and explore the options and available services. You
will use this navigation path through the practice.
6. In the web console, click Menu > Networking > Virtual Cloud Networks.
Note: This option is the quickest way to get a working cloud network in the fewest steps.
This completes the task of creating a VCN along with two subnets and you will use this in the
upcoming practices.
Overview
In this practice you will launch the Cloud Shell session for the OCI user account assigned to you
in preparation for the upcoming practices.
Cloud Shell
Oracle Cloud Infrastructure (OCI) Cloud Shell is a web browser‒based terminal accessible from
the Oracle Cloud Console. Cloud Shell is free to use (within monthly tenancy limits), and
provides access to a Linux shell, with a pre-authenticated OCI CLI and other useful tools.
It provides:
An ephemeral machine to use as a host for a Linux shell, preconfigured with the latest
version of the OCI CLI and several useful tools
5 GB of storage for your home directory
A persistent frame of the Console that stays active as you navigate to different pages
of the console
Note
The OCI CLI will execute commands against the region selected in the Console's
Region selection menu when the Cloud Shell was started. Changing the region
selection in the console will not change the region for existing Cloud Shell instances;
you will need to open a new Cloud Shell instance to change regions.
Cloud Shell sessions have a maximum length of 24 hours, and time out after 20
minutes of inactivity. However this should not impact this practice.
Prerequisites
Tasks
1. Log in to OCI Web Console using your assigned Oracle Cloud account as described in the
previous practices.
2. Click the Cloud Shell icon in the OCI Console header, highlighted in the below screenshot.
4. You can use the icons in the upper-right corner of the Cloud Shell window to minimize,
maximize, restart, and close your Cloud Shell session.
5. For clipboard operations:
Windows users can use Ctrl + C or Ctrl + Insert to copy, and Shift + Insert to paste.
For Mac OS users, use Cmd + C to copy and Cmd + V to paste.
However the practices in this course assumes you are working on a Windows-based
local system.
To get started with Cloud Shell, you can run the following OCI CLI command. Your Cloud
Shell comes with the OCI CLI pre-authenticated, so there’s no setup to do before you can
start using it.
6. This command will display the name space of your OCI Tenant.
Overview
Instances use an SSH key pair instead of a password to authenticate a remote user. A key pair
file contains a private key and public key. You keep the private key on your computer and
provide the public key every time you launch an instance. In this practice you will generate SSH
keys to be used later while launching an instance.
Tasks
1. Launch the Cloud Shell session as described in the previous practice.
2. Execute the following commands to generate ssh-keys, which will be used to create a
Compute instance. As long as an id_rsa and id_rsa.pub key pair is present, they can be
reused. By default these are stored in ~/.ssh/ directly.
ocilabs_us@cloudshell:~ (ap-mumbai-1)$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key
(/home/ocilabs_us/.ssh/id_rsa):
Created directory '/home/ocilabs_us/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in
/home/ocilabs_us/.ssh/id_rsa.
Your public key has been saved in
/home/ocilabs_us/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:zxQogNbEvQJIAbJb+3x1r8QEJN8ZWlUYHHyZge5lZ10
ocilabs_us@804708cc8ef6
The key's randomart image is:
+---[RSA 2048]----+
|=+.=o.. . o++*o+ |
|o.+ o..+ = o= + E|
|.... ..= +. . o|
| o .. .. . .. o +|
|. . . S +. o o |
| o . B .. |
| o . = . |
| . . . |
| . |
+----[SHA256]-----+
4. Copy the contents of ~/.ssh/id_rsa.pub on a notepad. This is your ssh key to connect to the
instances.
Overview
In this practice you create Compute VM instances in each of the two subnets in your VCN.
An Oracle Cloud Infrastructure VM Compute instance runs on the same hardware as a Bare
Metal instance, leveraging the same cloud-optimized hardware, firmware, software stack, and
networking infrastructure.
Tasks
1. In the OCI Console, navigate to Menu > Compute > click Instances.
2. Click Create Instance.
Note: You should select your compartment before creating an instance.
3. Fill in the following details for your Compute instance.
Name: BastionHost
Image or Operating System: Select the default Oracle Linux image
Availability Domain: Select any Availability Domain
Shape: VM.Standard.E2.1.Micro
Note:
To change the Image, you can click Change Image. However, you cannot change the
shape in Always Free Account.
Click Show Shape, Network and Storage Options, and explore the details.
Add SSH Keys: Select the Paste SSH keys option and paste the content of your
Public SSH key copied in the previous practice. (Also available in
~/.ssh/id_rsa.pub)
$ ssh opc@<Public_IP_of_Compute>
Note: In general, for OCI Linux‒based compute instances, the default username is opc.
Once successfully connected you can see the change in the command prompt to ensure
you are now logged in to your ‘BastionHost’ Compute instance. Follow these instructions
whenever you need to connect to your BastionHost.
Overview
In this practice, you will create a storage bucket using Oracle Cloud Infrastructure (OCI) Object
Storage.
Assumptions
All information related to your Oracle Cloud Infrastructure (OCI) account, also referred to as
Oracle Cloud account, is assigned to you. Be sure to record the following:
Domain/Tenant
Username
Password
Compartment to be used
Tasks
1. Launch the web browser, navigate to https://console.ap-mumbai-1.oraclecloud.com/ and
log in to your OCI account.
8. Click upload and browse any file from your local machine and click upload.