OCI Fast Track Tutorial-OCI v26

Download as pdf or txt
Download as pdf or txt
You are on page 1of 68

OCI Fast Track – Hands On Guide

OCI Fast Track


Hands On Lab Guide

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
OCI Fast track
Hands On Lab Guide
Introduction .................................................................................................................. 3
Tools used on this Workshop .................................................................................................................. 3
Used Images ............................................................................................................................................ 3
Lab 1. Accessing Oracle Cloud ................................................................................... 4
Understanding OCI Basic Concepts .......................................................................... 6
Regions .................................................................................................................................................... 7
Availability Domains .............................................................................................................................. 7
Working With Compartments ................................................................................................................. 7
Creating Compartments........................................................................................................................... 9
Lab 2. Networking ..................................................................................................... 12
Virtual Cloud Network and It’s Resources ........................................................................................... 12
Create Oracle Cloud Network (VCN) ................................................................................................... 12
Subnets inside a VCN ........................................................................... Error! Bookmark not defined.
Internet Gateway Creation .................................................................... Error! Bookmark not defined.
Route Configuration for the Internet Gateway ...................................... Error! Bookmark not defined.
Lab 3. Compute Instances ......................................................................................... 18
Creating Windows Server 2016 Virtual Machine ................................................... 19
Begin Windows VM Creation ............................................................................................................... 26
Security Rules ....................................................................................................................................... 30
RDP Setting permissions ....................................................................................................................... 31
Windows access through Remote Desktop ........................................................................................... 33
Oracle Linux 7.7 Compute Instance Creation ........................................................ 19
SSH Key pair creation ........................................................................................................................... 19
Creating Virtual Machine ...................................................................................................................... 21
Creating Virtual Machine Linux 2 ........................................................................................................ 23
Accessing Linux Compute Instance with PuTTY ................................................................................. 24
Lab 4. Storage Cloud Services .................................................................................. 36
Block Storage ........................................................................................................................................ 36
Creating Block Storage Volumes .......................................................................................................... 36
Connecting Block Volumes to Compute Instance ................................................................................ 38
Testing Block Volume performance ..................................................................................................... 43
Setting Backup Policies for Block Storage............................................................... 44
Objectives .............................................................................................................................................. 44
Lab 5. FileStorage Service ......................................................................................... 46
Objective ............................................................................................................................................... 46
Creating File Storage Service FileSystem............................................................................................. 46
Creating Mount Targets ........................................................................................................................ 49
Connectivity Issues ............................................................................................................................... 50
Lab 6. Load Balancer ................................................................................................ 53
Load Balancing Concepts...................................................................................................................... 53
Objective ............................................................................................................................................... 54
Load Balancer Creation Process ........................................................................................................... 57
Creating Load Balancer ......................................................................................................................... 57
Load Balancer Testing .......................................................................................................................... 59
Lab 7. Autonomous Database ................................................................................... 62
Overview ............................................................................................................................................... 62
LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Introduction
On this guide, we’re going to work on creating some Oracle Cloud virtual machines, following
different processes and good implementation techniques

We’ll explore each and every one of the available resources on Infrastructure as Code (IaaS),
going from network, storage, virtual machines, and Load Balancer. To begin, it’s important to
check if the user has a clear understanding of OCI’s basic components like: Regions,
Compartments, and Availability Domains

Through this guide, we’re going to provision :


• Network (VCN, and subnets)
• Compute Instances (Linux and Windows)
• Block Storage
• Object Storage
• Load Balancer

Our goal is that, in the end of this workshop, attendees will be able to deploy their own
infrastructure segments following OCI’s best practices

Tools used on this Workshop


This lab will require the user to download and install:

• PuTTY e PuTTY KeyGen (for Windows Users)

PuTTY

PuTTY is a telnet and SSH client developed to grant Windows users, access
to Linux/Unix Servers. Putty is a Open Source Software.

PuTTY can be downloaded on https://www.putty.org/.

Used Images
This LAB will basically use 2 different images:

• Oracle Linux 7
• Microsoft Windows 2016 Standard

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 1.
Accessing Oracle Cloud
Lab 1. Accessing Oracle Cloud
Objectives
• Access Oracle Cloud Console
• Known IaaS and PaaS Services
• Become acquainted with OCI Interface

In this Section, you will learn more about the initial steps on Oracle Cloud Portal

On your preferred browser, type: cloud.oracle.com, or www.oracle.com. You can also


change your language:

Hit the “Sign in to Cloud” link, and you will be redirected to the Cloud Connection screen, as
follows:

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

To more recent deployed environments, login must be made through “Identity Cloud Service
Account”. Where will be necessary to input “Account Name” (which is the defined name for
the Tenant).

After Tenant identification, you’ll be able to insert username and password for environment
access

Once identified, you’ll reach Oracle’s Cloud main screen, from where you can access all the
available services. Your default main screen will look like this.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

From the “Action Menu” (Top left corner), you can reach the available services on our
console

Understanding OCI Basic Concepts


LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Objectives
• Understand Availability Domain (AD) concept
• Understand Compartments
• Understand Fault Domains

In this section, you’ll learn about OCI’s high availability architecture.

Regions
Oracle Cloud Infrastructure is hosted in regions and availability domains. A region is a
localized geographic area. A region is composed of one or more availability domains. Most
Oracle Cloud Infrastructure resources are either region-specific, such as a virtual cloud
network, or availability domain-specific, such as a compute instance.

Regions are completely independent of other regions and can be separated by vast distances—
across countries or even continents. Generally, you would deploy an application in the region
where it is most heavily used, since using nearby resources is faster than using distant
resources. However, you can also deploy applications in different regions to:

• mitigate the risk of region-wide events, such as large weather systems or earthquakes
• meet varying requirements for legal jurisdictions, tax domains, and other business or
social criteria

After accessing the environment, is possible to change your region with just one click:

Availability Domains
In a Region, you may have up to three Availability Domains.

The availability domains within the same region are connected to each other by a low latency,
high bandwidth network, which makes it possible for you to provide high-availability
connectivity to the Internet and customer premises, and to build replicated systems in multiple
availability domains for both high-availability and disaster recovery.

Availability domains are isolated from each other, fault tolerant, and very unlikely to fail
simultaneously. Because availability domains do not share infrastructure such as power or
cooling, or the internal availability domain network, a failure at one availability domain within
a region is unlikely to impact the availability of the others within the same region

Working With Compartments


LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
When you first start working with Oracle Cloud Infrastructure, you need to think carefully
about how you want to use compartments to organize and isolate your cloud resources.
Compartments are fundamental to that process. Once you put a resource in a compartment, you
can't move it, so it's important to think through your compartment design for your organization
up front, before implementing anything.

When creating a new compartment, you must provide a name for it (maximum 100 characters,
including letters, numbers, periods, hyphens, and underscores) that is unique within its parent
compartment. You must also provide a description, which is a non-unique, changeable
description for the compartment, between 1 and 400 characters. Oracle will also assign the
compartment a unique ID called an Oracle Cloud ID

Once a resource is created in a compartment, you can’t move it to another.

The Console is designed to display your resources by compartment within the current region.
When you work with your resources in the Console, you must choose which compartment to
work in from a list on the page.

That list is filtered to show only the compartments in the tenancy that you have permission to
access. If you're an administrator, you'll have permission to view all compartments and work
with any compartment's resources, but if you're a user with limited access, you probably won't

Compartments are global, across regions, when you create a compartment, it is available in
every region that your tenancy is subscribed to.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Creating Compartments
On the main menu, Hit “Identity”, then choose “Compartments”

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Click on “Create Compartment” and fill the information:

Name: Compartimento-Trial
Description: Compartimento para recursos de testes
Parent Compartment: root

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 2. Networking
Virtual Cloud Network and
It’s Resources

1 2 3 4 5 6 7 8

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 2. Networking
Virtual Cloud Network and It’s Resources
Objectives
• Create Oracle Cloud Network (VCN)
• Configure Regional Public and Private Subnets
• Provision an Internet Gateway, which will allow your VCN access to public internet
• Configure Route Table

Create Oracle Cloud Network (VCN)


To create a network, remember to choose your compartment, then hit:
Networking>>Virtual Cloud Networks, on main menu.

Entering the Virtual Network Module, you’ll be presented to 2 options for creating an OCI
Network:
• You can individually create the network components
• You can run through a wizard-based creation process, that will assist you on setting
up network components, and basic connectivity setup.

On this example, we will use the wizard-based process, started by choosing the option
“Networking Quickstart” button below

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Starting the process, you’ll be guided by OCI interface through the process.

1 – Choose the type of connectivity you want, you can choose a VPN model, or standard
internet access through internet gateway

Please note, the provided blueprint on the right side of the screen, it works as an illustration
of how your connectivity will be set. On our tests, we’ll use a simple internet connectivity
model, which will create the following components:

• VCN
• Regional Public and Private Subnets
• Internet Gateway
• Route Table
• NAT Gateway (Not covered on this Workshop)
• Service Gateway (Not covered on this Workshop)

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

2 – Setup Basic VCN parameters:

Name: VCN-TRIAL
Compartment: Choose your own compartment

Your compartment
compartment name
goes here

Then, input CIDR Block information for VCN and it’s subnets

VCN CIDR Block: 10.0.0.0/16


Public Subnet: 10.0.0.0/24
PrivateSubnet: 10.0.1.0/24

• CIDR Block info provided here are for sample setup only.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
At the end, Hit “Next” button, and you’ll be directed to “review and create page” where the
networking components will be created:

Check the provided information and hit the “Create” blue button at the end of the screen.
Finishing the process, you can follow the all the creation steps executed by the interface:

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

The networking creation process is very quick, when finished, will be shown as below:

We can take a look at the “reference blueprint” showed at the start of the VCN creation
process, and review the elements that were automatically created by OCI wizard:

We got : 1 VCN, 2 Regional Subnets (public and private), 1 Internet Gateway, 1 NAT
Gateway, and 1 Service Gateway, all already setup and ready for use.
Note that using this option, you get the entire Network stack ready in less than 5 minutes.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 3.
Compute Instances

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 3. Compute Instances

Create Oracle Linux 7 Compute Instances


Objectives
• Create SSH key pair with PuTTY Gen
• Create Oracle Linux 7.7 virtual Machine
• Access compute instance using PuTTY

SSH Key pair creation


First step, before start VM Creation, is to create a SSH key pair. To do it, we’ll use Putty Key
Generator

Open the application, choose a RSA type key, and a 2048 bits key. Then hit “Generate”

Move the mouse until the green bar stops moving


LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Save private and public Keys in safe place.


“Key Passphrase” fields are optional

For VM creation, we’ll use public key. Private key will only be used for connection.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Creating Virtual Machine
In Main Menu, hit : Compute > Instances, than “Create Instance” (Blue Button) :

Name you instance: VM-OracleLinux-AD2


Availability Domain: AD 2
Operating System: Oracle Linux 7.7
Instance Type: Virtual Machine
Instance Shape: VM.Standard2.1
Choose SSH Key File: Insert public key file (.pub)
Virtual Cloud Network Compartment: <Your Compartment>
Virtual Cloud Network: <Your VCN>
Subnet Compartment: <Your Compartment>
Subnet: Public Subnet
Assign Public IP Address

Hit this option to


expand network
and shape options

After expanding Shape’s and networking options, input the necessary data to finish the
creation process:

• Remember to choose your AD, and compartment

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
When entering Networking information, remember to choose the option “Assign a Public IP
address”

Upload the SSH key and hit the “Create” button

You will probably have the new instance properly created in a few minutes. After finishing
the creation process, the main screen will look like this:

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Creating Virtual Machine Linux 2


In Main Menu, hit : Compute > Instances, than “Create Instance” :

Name you instance: VM-OracleLinux-AD3


Availability Domain: AD 3
Operating System: Oracle Linux 7.7
Instance Type: Virtual Machine
Instance Shape: VM.Standard2.1
Choose SSH Key File: Insert public key file (.pub)
Virtual Cloud Network Compartment: <Your Compartment>
Virtual Cloud Network: <Your VCN>
Subnet Compartment: <Your Compartment>
Subnet: Public subnet
Assign Public IP Address

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Accessing Linux Compute Instance with PuTTY
First step: Get instance’s Public IP

Open PuTTY. Fill “Host Name (or IP Address)” with the public IP address

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Expand “SSH” option on the left, then hit “Auth”. Use the “Browse...” button, to search for
the private key file generated previously.

After saving the configuration, Hit Open, and you’ll establish connection to the VM

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
User to connect: opc (When connecting to Oracle Cloud Compute instances, always use
the user opc)

Creating Windows Server 2016 Virtual Machine

Objectives
• Quickly create a Virtual Machine
• Identify main information needed for a OCI Compute Instance Creation

To access main screen, Hit Menu > Compute > Instances.

Begin Windows VM Creation


Hit “Create Instance”.
LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Name you instance: VM-Windows2016-AD1


Availability Domain: AD 1
Operating System: Windows Server 2016 Standard
Instance Type: Virtual Machine
Instance Shape: VM.Standard2.1
Virtual Cloud Network Compartment: <Your Compartment>
Virtual Cloud Network: <Your VCN>
Subnet Compartment: <Your Compartment>
Subnet: Public Subnet
Assign Public IP Address

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Windows Instance creation usually takes 5 minutes. After instance creation, you’ll see:

Before stepping forward, find the VM’ public IP, and copy it :

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Now try to access it, using “Remote Desktop” Connection.

Use instance’s Public IP address, and hit “Connect”.

You’ll get the following error when trying to connect.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Don’t worry, that’s the expected behavior. In order to access a compute instance on Oracle
Public Cloud, you need to configure firewall “Access Rules” first. On the next session, we’ll
configure other resources, that can be created before the VM, and provide access permissions
as well.

Security Rules
You probably noticed that Linux VM could be accessed by SSH key right after it’s creation,
but Windows instance could not be accessed through RDP.

To access Windows Compute, we’ll need to configure some firewall rules.

Firewall rules are set inside in an object called “Security List”, that can be accessed within a
subnet.

Security Rules are inside the Security List, from there, we can setup which ports and
protocols are allowed traffic inside a subnet.

Click on: Networking -> Virtual Cloud Networks -> VCN-Trial

Click on: Security List -> Default Security List for VCN-Trial

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

To access the VCN’s firewall rules, choose the Security List you want to configure. In our
example, you’ll find the “Default Security List” already created on our VCN. Click on the
“Default Security List” security list and then the access rules console will come up.

RDP Setting permissions


Inside Security List, hit “Add Ingress Rules” option.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Fill the blanks as follows:

Source Type: CIDR


Source CIDR: 0.0.0.0/0
IP Protocol: RDP (TCP/3389)
Source Port Range: All
Destination Port Range: 3389

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Windows access through Remote Desktop


To access Windows VM, on Main Menu choose “Run”, type “mstsc”, then hit “OK”.

Input Instance’s Public IP, then hit “Connect”

IF everything was properly configured, you’ll be transported to Windows login page, where
you will need to change OPC password on first access.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Finishing this task, you’ll see that we now have 3 compute instances, each on it’s own AD.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 4.
Storage Cloud Services

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 4. Storage Cloud Services


Block Storage
Objectives
• Create a Block Storage Volume (50GB) and Assign Block Storage volumes to
Compute Instances
• Configure Backup Options

Creating Block Storage Volumes


You can create block volumes through “Block Storage” interface. To access it: From main
menu, you choose Block Storage, than “Block Volume”.

Block Volume creation process is a very straight forward process, you just need to hit
“Create Block Volume”, and fill the requested information:

Name: block_vol50GB
Create in Compartment: <Your Compartment>
Virtual Cloud Network: <Your VCN>
Availability Domain: AD2
Size: 50GB
Backup Policy: Bronze
Volume Performance: Balanced

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

After setup, OCI Will begin provisioning. Provision time depends on the volume size, on our
example (50 GB), it will take no more than 30 seconds:

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Repeat the steps above and create a 500GB block storage;

Name: block_vol500GB
Create in Compartment: Compartimento-Trial
Availability Domain: AD2
Size: 500GB
Backup Policy: Bronze
Volume Performance: Balanced

Connecting Block Volumes to Compute Instance


To connect Block Volumes to compute instances, you need to access “Compute Instance”
home scree, and from VM’s detail page, hit “Attach Block Volume”.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

First Attach the 50GB Block Volume

ISCSI : disk must be detected manually (fdisk)


PARAVIRTUALIZED : disk is detected automatically.
But in both cases, disk must mounted manually

Once disk if properly attached, we can mount it on Compute Instance

To ease disk attachment process, Oracle Cloud Infrastructure provides the necessary
commands to detect the new disk from the VM. On the right side of the disk information,
you’ll find a three dot’s menu.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
If you choose the “iSCSI Commands & Information”, you’ll get the necessary commands to
detect the recently created disk:

=è Execute the procedure for the 50GB disk.

All you need to do, is copy the commands, and execute it on the Linux server.

After disk detection, you need to format and mount the new disk:

How to detect and map created disks on Linux Host

1st – Connect to Linux Server with user OPC

2nd – Became ROOT user with SUDO command: “$ sudo su – “

3rd – Execute the “ATTACH commands” copied from the screen above:

4th - Detect the new device with command: “$ fdisk -l” command, where you’ll will see the
following output :

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

5th – Format the disk with the command: “mkfs /dev/sdb”

6th – Create a directory do be used as a mount point for the filesystem with command:
“mkdir /vol50g”

7th – Mount the Filesystem with command: “mount /dev/sdb /vol50g”, and check the disk
availability with command: “df -h”

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

=è Execute the procedure for the 50GB disk.

Repeat the previous steps (from 1 to 7) to configure the 500GB volume. Just remind, that for
the second disk, the volume will have a different name. 50GB volume got identified by
“/dev/sdb”, the 500GB Volume will probably be identified by “/dev/sdc” name. Remember to
check disk ID before move ahead.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Testing Block Volume performance
According to our documentation, Block Volume’s performance may vary from 3.000 IOPS to
35.000 IOPS according to disk size. In the next test, we’re going to validate the true
performance delivered by the provisioned Block Volume.

Step 1 Test the true performance of the already provisioned Block Volume (/dev/sdb):

1 – Install FIO utility on the recently created Linux Compute instance: (as ROOT user, issue
the command : “yum install fio”

2 – Run FIO utility against the new disk: (50G)


sudo fio --filename=/dev/sdb --direct=1 --rw=randread --bs=8k \
--ioengine=libaio --iodepth=256 --runtime=30 --numjobs=4 --time_based \
--group_reporting --name=iops-test-job --eta-newline=1 --readonly

3 – Run FIO utility against the new disk: (500G)


sudo fio --filename=/dev/sdc --direct=1 --rw=randread --bs=8k \
--ioengine=libaio --iodepth=256 --runtime=30 --numjobs=4 --time_based \
--group_reporting --name=iops-test-job --eta-newline=1 --readonly

We can see the IOPS throughput for 50GB disk and IOPS for 500GB disk ( both balanced)

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Setting Backup Policies for Block Storage

Objectives

• Set Backup Policies

On Oracle Cloud Infrastructure, Block Volume (including boot volumes), and compute nodes
backups are independent. Backup policies can be set on the Block Storage home page (Main
Menu > Block Storage > Block Volumes):

Backup options can be easily accessed from the “fast menu” (Three dots on the right), option
“Assign Backup Policy”

Where you can choose the most appropriate backup policy for your data.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 5.
File Storage Service

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 5. FileStorage Service


Oracle Cloud Infrastructure File Storage service provides a durable, scalable, secure,
enterprise-grade network file system. You can connect to a File Storage service file system
from any bare metal, virtual machine, or container instance in your Virtual Cloud Network
(VCN). You can also access a file system from outside the VCN using Oracle Cloud
Infrastructure FastConnect and Internet Protocol security (IPSec) virtual private network
(VPN)

Using the File Storage service requires an understanding of the following concepts, including
some that pertain to Oracle Cloud Infrastructure Networking:

• Mount Target
An NFS endpoint that lives in a subnet of your choice and is highly available. The
mount target provides the IP address or DNS name that is used in the mount
command when connecting NFS clients to a file system. A single mount target can
export many file systems

• Export
Exports control how NFS clients access file systems when they connect to a mount
target. File systems are exported (made available) through mount targets. Each mount
target maintains an export set which contains one or many exports.

Objective
• Create a FileStorage Service filesystem, and access it through a Linux Compute
Instance

Creating File Storage Service FileSystem

1 – Access FileStorage Service main screen through OCI Main page on Action Menu

Hit Create File system Button on the right


LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

You’ll see a pop-up screen requesting the main information to identify FileStorage Service.
You will note, that the main fields are already filled with default information. Use the “Edit”
button on the right, to customize the filesystem info with your data.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Customize “Mount Target” is a very important step of the process. Is in this option that you
can specify the VNC and subnet that will be used on the configuration. Providing the wrong
information, you’ll experience difficulties on adjusting network permissions.

File Storage Service Mount Targets


Please note that a Mount Target is automatically created by the Cloud Orchestration. All you
have to do, is select the Mount Target, and get the connection details.

Select the created Mount Target, on the “Export’s” action menu, on the right, select “Mount
Commands”, and you’ll get a screen with connectivity information regarding the Mount
Target.

Here Oracle Cloud follows the same behavior as in the other wizards. All you need to do, is
“copy” and “Paste” the Linux commands on SSH prompt.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Connectivity Issues
Please note, FileStorage is a network service, and as such, it’s usage, is subordinated to
firewall rules. In order to mount the created mount target, we’re going to create an Ingress
Security Rule, to allow FileStorage Service IP traffic.

SOURCE CIDR is the IP address attached to the Mount Target. In our case, it`s the IP from
the Instance network 10.0.1.0/24.

DESTINATION PORT, File Storage requires some ports do be opened (2048 – 2050 and
111, for protocol TCP, and 2048,111 for protocol UDP).

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Connect to the linux-AD2 server and run the mount


command:
After the mount command you can see 8.0E available to be used:

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 6.
Load Balancer

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 6. Load Balancer


The Oracle Cloud Infrastructure Load Balancing service provides automated traffic
distribution from one entry point to multiple servers reachable from your virtual cloud network
(VCN). The service offers a load balancer with your choice of a public or private IP address,
and provisioned bandwidth.

The Load Balancing service enables you to create a public or private load balancer within your
VCN. A public load balancer has a public IP address that is accessible from the internet. A
private load balancer has an IP address from the hosting subnet, which is visible only within
your VCN. You can configure multiple for an IP address to load balance transport Layer 4 and
Layer 7 (TCP and HTTP) traffic. Both public and private load balancers can route data traffic
to any backend server that is reachable from the VCN.

Your load balancer has a backend set to route incoming traffic to your Compute instances.
The backend set is a logical entity that includes:

• A list of backend servers.

• A load balancing policy.

• A health check policy.

• Optional SSL handling.

• Optional session persistence configuration.

Load Balancing Concepts


backend server
An application server responsible for generating content in reply to the incoming TCP
or HTTP traffic. You typically identify application servers with a unique combination
of overlay (private) IPv4 address and port, for example, 10.10.10.1:8080 and
10.10.10.2:8080.

backend set
A logical entity defined by a list of backend servers, a load balancing policy, and a
health check policy. SSL configuration is optional. The backend set determines how
the load balancer directs traffic to the collection of backend servers.

certificates
If you use HTTPS or SSL for your listener, you must associate an SSL server certificate
(X.509) with your load balancer. A certificate enables the load balancer to terminate
the connection and decrypt incoming requests before passing them to the backend
servers.

health check
LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
A test to confirm the availability of backend servers. A health check can be a request
or a connection attempt. Based on a time interval you specify, the load balancer applies
the health check policy to continuously monitor backend servers. If a server fails the
health check, the load balancer takes the server temporarily out of rotation. If the server
subsequently passes the health check, the load balancer returns it to the rotation.

Objective
Create a Public Load Balancer Service, with 2 backend servers running Apache Application
server.
Before we start creating out LB service, please note that there are some important tasks to
complete. In order to have some “service” to be tested by the Load Balancer, we need to
install an application server on the Linux servers.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Follow the steps below to install Apache Application server on Linux servers:

1 – Install Apache Application Server on each server:

1. Connect to Linux host using OPC user


2. Once connected, change you user to ROOT with the command: “sudo su – “
3. Install Apache package on operating system : “sudo yum install httpd -y”
4. Start Apache deamons : “sudo apachectl start”
5. Configure local host firewall to allow Apache traffic:
o sudo systemctl enable httpd
o sudo apachectl configtest
o sudo firewall-cmd --permanent --zone=public --add-service=http
o sudo firewall-cmd --reload
o sudo su -
6. To identify the system through the web interface, customize the “index.html” file.
Issue the following command as ROOT user:
o “echo 'This is Oracle webserver 1 running on OCI Workshop' >
/var/www/html/index.html”

On the second instance you will repeat the steps above, from 1 to 5 and the command 6
will be:
“echo 'This is Oracle webserver 2 running on OCI Workshop' >
/var/www/html/index.html”

3 - Test Apache’s behavior, all you need to do, is use the Compute Instance’s public IP on the
browser to check if Apache’s main page will come up.

REMINDER: Before test Apache on your browser, be sure that you have already created an
Ingress Rule on the VCN’s Security List, so Port 80 is cleared for traffic.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

If everything if OK, you may test the apache installation. All you have to do, is to use the
public instance’s IP address on your preferred browser, and you’ll probably get this output:

IMPORTANT: Be sure to start Load Balancer creation only after both calls on apache are
working. This is important, because if you create the load balancer without an available
service, load balancer will be created in “Error” state. Load Balancer usually takes 5 minutes
to “calibrate” it’s status.
Our Goal, is to create Load Balancer service only after both Apache servers are running, so
LB service will have “ready” state, and will be ready to be tested.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Load Balancer Creation Process

To access Load Balancer interface, again, we’re going to start from the “Action Menu”

Then Hit the Create Load Balancer button:

Creating Load Balancer


The Load Balancer creation screen is a Wizard Based model, where you’ll be guided on the
process by the interface. In the main screen, you’ll provide the information below:

Name: lb-apache

Visibility Type: Public

Bandwidth: Small 100Mbps

VCN: Choose your VCN

Subnet: Choose your public Subnet

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
(choose 2 subnets, same subnets where your compute instances were created)

Set the Load Balancer Policy and add the Backend Servers. To add Backend Servers, hit the
blue button “Add Backends”

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Enter the Backend Set servers:

As a last step, define the type of traffic that will be handled

Once the creation process is finished, you’ll have the following information:

Load Balancer Testing


In order to simulate an application environment, we need to start a web service on both
Compute instances.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
To get different output’s on load balancer calls, add different contents to Index.html file on
each compute.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 7.
Autonomous Database

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

Lab 7. Autonomous Database

Objectives
• Provisioning and usage of Autonomous database

Overview
Oracle Cloud Infrastructure's Autonomous Database is a fully managed, preconfigured
database environment with two workload types available, Autonomous Transaction
Processing and Autonomous Data Warehouse. You do not need to configure or manage any
hardware, or install any software. After provisioning, you can scale the number of CPU cores
or the storage capacity of the database at any time without impacting availability or
performance. Autonomous Database handles creating the database, as well as the following
maintenance tasks:

• Backing up the database

• Patching the database

• Upgrading the database

• Tuning the database

Available Workload Types


Autonomous Database offers two workload types:

• The Autonomous Transaction Processing workload type configures the database for a
transactional workload, with a bias towards high volumes of random data access.
• For a complete product overview of Autonomous Transaction Processing,
see Autonomous Transaction Processing
The Autonomous Data Warehouse workload type configures the database for a decision
support or data warehouse workload, with a bias towards large data scanning operations.
For a complete product overview of Autonomous Data Warehouse, see Autonomous Data
Warehouse.

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Autonomous Database Provisioning

To start Autonomous Database creation process, you can choose between two different
starting points:

1. Hit Action menu on the left side of the main screen, then choose “Autonomous
Database”
2. Hit the desktop shortcut on the main screen (blue rectangle), and you’ll be redirected
to Autonomous database creation.

Autonomous Database Creation

Don’t forget to choose your


compartment

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

On the screen creation process, you’ll need to answer only 5 questions:


1. Compartment
2. Service display name
3. Database name
4. Workload type (ADW / ATP) : For the Workshop, please CHOOSE “Data
Warehouse”
5. Serverless
6. Number of CPU’s and Storage Volume. You can choose between 1 and 128 OCPU’s
and TB for storage

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
On the second half of the screen, you’ll find:

Then input:
1. Administrator password
2. Choose your license type model

After providing all this data, just hit “Create Autonomous Database” in the bottom of the
screen, and provisioning process will start

Autonomous provisioning takes no more than 5 min. You’ll then get the screen :

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
Most operations for Autonomous database can be done on the top 5 buttons of the screen:

This new version of Autonomous, brings an already loaded version of SQL Developer,
which can be reached from :

1. Hit the “Service Console” button


2. On the right side of the screen, hit “Development”, and you’ll be redirected to the
screen where you can choose several administrative option, from client download, to
rest API Services and SQL console

LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide
3 Hit “SQL Developer Web” Button

In the Worksheet tab, use the worksheet screen to right some SQL statements to query
ADW database content:

The following commands can be used on the SQL Worksheet to test Autonomous database:

• Select count(*) from dba_tables, dba_source;


• select count(*) from (select * from dba_source, v$sqltext)
• select a.cust_first_name, count(a.country_id), sum(b.amount_sold)
from sh.sales b, sh.customers a, sh.products where a.cust_id = b.cust_id
group by a.cust_first_name
LAD Knowledge Team

IaaS and Monitoring Brazil Team


OCI Fast Track – Hands On Guide

While executing commands, you can change to Activity view on the Autonomous Database
page, and follow-up the database activity.

LAD Knowledge Team

IaaS and Monitoring Brazil Team

You might also like