Tutorial – Launching Your First Instance

In this tutorial you'll learn the basic features of Oracle Private Cloud Appliance by performing some guided steps to launch and connect to an instance. After your instance is up and running, this tutorial steps you through creating and attaching a block volume to your instance.

This tutorial also includes optional instructions for deleting all the resources you create.

Task Flow to Launch an Instance

No. Task Links
1.

Review the prerequisites.

Prerequisites

2. Log into the appliance.

Log into Oracle Private Cloud Appliance

3.

Create a compartment for your resources.

Create a Compartment

4.

Create a Virtual Cloud Network (VCN).

Create a Virtual Cloud Network (VCN)

5.

Create a subnet in the VCN.

Create a Subnet
6.

Configure additional network parameters to enable instance connectivity.

Create an Internet Gateway and Configure Route Rules
7.

Launch an instance

Launch an Instance

8. Get the instance IP address. Get the Instance IP Address
9.

Connect to your instance.

Connect to Your Instance

10.

Add Storage to your instance.

Add a Block Volume

Attach the Block Volume to an Instance

11.

(Optional) Clean up your resources.

(Optional) Clean Up Resources

Prerequisites

To perform this tutorial, ensure that you have the following items.

  • The URL for your Private Cloud Appliance.

    For example, https://console.pca_name.example.com where pca_name is the name of your Private Cloud Appliance and example.com is your domain.

  • A Private Cloud Appliance user account and password.

  • The name of your tenancy.

  • An SSH key pair. If you need to create a key pair for this tutorial, see Managing Key Pairs.

  • The virtual IP address (VIP) or hostname of the Private Cloud Appliance management nodes.

If you don't have these items, ask your Service Enclave administrator.

Log into Oracle Private Cloud Appliance

  1. In a browser, enter the URL for your Private Cloud Appliance.

  2. If necessary, click Change Tenant, enter the name of your tenancy, and click Continue.

  3. Enter your user name and password, and then click Sign In.

    If this is the first time you've logged in, you are prompted to change your password.

For more information about using the Compute Web UI, see Using the Compute Web UI.

What's Next

Continue to Create a Compartment.

Create a Compartment

Compartments help you organize and control access to your resources. A compartment is a collection of resources (such as cloud networks, compute instances, and block volumes) that can be accessed only by those groups that have been given permission by an administrator in your organization.

In a production environment, the compartment for the instance you plan to create might already exist, and you could use it instead of creating a new compartment. However, in this tutorial, you create a new compartment to learn how to do it, and to provide an empty compartment from which you can create your cloud network.

In this tutorial, you use one compartment for all of your resources. However, when you are ready to create a production environment you can separate resources into different compartments. For example, you might place all instances in one compartment and all networking resources in another compartment.

For more information about compartments, refer to these resources:

Using the Compute Web UI

  1. In the Navigation Menu, click Identity and then click Compartments.

  2. On the Compartments page, click the Create Compartment button.

  3. In the Create Compartment dialog, enter the following details:

    • Name: Enter Sandbox.

    • Description: Enter a description for the compartment.

    • Create in Compartment: Select the compartment in which to create this new compartment.

  4. Click the Create Compartment button in the dialog.

    The new compartment is displayed on the Compartments page.

What's Next

Continue to Create a Virtual Cloud Network (VCN).

Create a Virtual Cloud Network (VCN)

Before you can launch an instance, you need a virtual cloud network (VCN) and a subnet.

A VCN is a software-defined equivalent of a traditional network, with firewall rules and various types of communication gateways.

In a production environment, a VCN that you can use for the instance might already exist, and you could use it instead of creating a new VCN. However, in this tutorial, you create a new VCN to learn how to do it.

Important:

This tutorial creates a simple cloud network to make it easy to launch an instance for learning purposes. When you create your production instances, ensure that you create appropriate security lists and route table rules to restrict network traffic to your instances.

For more information about VCNs, refer to these resources:

Using the Compute Web UI

  1. Click Dashboard, and click the Networking/View Virtual Cloud Networks button.

  2. On the VCNs page, click the Create Virtual Cloud Network button.

  3. In the Create Virtual Cloud Network dialog, enter the following information:

    • Name: Enter a descriptive name for the cloud network.

    • Create in Compartment: Select the Sandbox compartment.

    • CIDR Block: Enter a valid CIDR block for the VCN. For example 10.0.0.0/16.

    • Use DNS hostnames in this VCN: Indicate whether you want to use DNS host names in the VCN.

    • DNS Label: If you selected to use DNS, enter a DNS label or leave the field blank to let the system generate a DNS name for you.

    • Tagging: Leave blank. This tutorial does not use tags.

  4. Click the Create Virtual Cloud Network button in the dialog.

What's Next

Continue to Create a Subnet.

Create a Subnet

A subnet is a subdivision of your VCN. The subnet directs traffic according to a route table.

For this tutorial, you'll access the instance over the internet using its public IP address, so your route table will direct traffic to an internet gateway. The subnet also uses a security list to control traffic in and out of the instance.

Using the Compute Web UI

  1. Return to the Virtual Cloud Networks page.

    A quick way to do this is to click the name of page in the breadcrumb that is in the top banner. For example:


    A screen shot of the breadcrumb string that is at the top of the page.

    If the VCNs page is not in your breadcrumb, Click Dashboard, and click the Networking/View Virtual Cloud Networks button.

  2. On the VCNs list, click the name of the VCN you just created.

    The details page for that VCN is displayed.

  3. Scroll down to the Resources panel, click Subnets, and click the Create Subnet button.

  4. In the Create Subnet dialog, enter the following information:

    • Name: Enter a descriptive name for your subnet.

    • Create in Compartment: Select the Sandbox compartment.

    • CIDR Block: Enter a valid CIDR block for the subnet. The value must be within the VCN's CIDR block. For example, 10.0.0.0/24.

    • Route Table: For this tutorial, select the default route table.

    • Subnet Access: For this tutorial, select Public Subnet to allow public IP addresses for instances in the subnet.

    • Use DNS Hostnames in this Subnet: For this tutorial, leave this unselected.

    • DHCP Options: Leave this unselected.

    • Security Lists: Click Add Security List and select the default security list.

    • Tagging: Leave blank. This tutorial does not use tags.

  5. Click the Create Subnet button in the dialog.

What's Next

Continue to Create an Internet Gateway and Configure Route Rules.

Create an Internet Gateway and Configure Route Rules

An internet gateway is an optional virtual router you can add to your VCN to enable access to your data center network.

The gateway supports connections initiated from within the VCN (egress) and connections initiated from the internet (ingress).

Security list rules control the types of traffic allowed in and out of resources in that subnet. Make sure to allow only the desired types of internet traffic.

Each public subnet that needs to use the internet gateway must have a route table rule that specifies the gateway as the target.

Using the Compute Web UI

  1. Navigate to your VCN's details page.

  2. In the Resources panel, select Internet Gateways.

  3. Click Create Internet Gateway.

  4. Enter the required information:

    • Name: Enter a descriptive name for your internet gateway.

    • Create in Compartment: Select the Sandbox compartment.

    • Enabled: Select whether you want this internet gateway to be enabled upon creation.

    • Tagging: Leave blank. This tutorial does not use tags.

  5. Click the Create button on the Create Internet Gateway dialog.

  6. Under Resources, click Route Tables.

  7. Click the name of the default route table.

  8. Scroll down to the Resources panel and click the Add Route Rules button.

  9. On the Create Route Table Rule dialog, enter the required information:

    • Target Type: From the drop-down menu, select Internet Gateway.

    • CIDR Block: Enter: 0.0.0.0/0 (which means that all non-intra-VCN traffic that is not already covered by other rules in the route table will go to the target specified in this rule).

    • Internet Gateway: From the drop-down menu, select the name of the Internet Gateway that you created.

    • Description: An optional description of the rule.

  10. Click the Create Route Table Rule button.

What's Next

Continue to Launch an Instance.

Launch an Instance

In this task, launch an instance with an image and a basic shape.

A compute instance is a virtual machine (VM), which is an independent computing environment that runs on top of physical hardware. The virtualization makes it possible to run multiple compute instances that are isolated from each other.

A shape describes the instance resources such as the number of CPUs, amount of memory, and network resources. In a production environment, you would select a shape that best suits workload and application requirements for the instance.

For more information about instances, refer to these resources:

  • For conceptual information, including descriptions of standard and flexible shapes, see Compute Instance Concepts in the Oracle Private Cloud Appliance Concepts Guide.

  • For step-by-step instructions to manage instances, see Working with Instances.

Before You Begin

Ensure that you have performed these tasks:

Using the Compute Web UI

  1. Click Dashboard, and click the Compute/View Instances button.

  2. On the Instances page, click the Create Instance button.

  3. In the Launch Instance dialog, enter the following information:

    • Name: Enter a descriptive name for your compute instance.

    • Create in Compartment: Select the Sandbox compartment.

    • Fault Domain: Leave the default set to "Automatically select the best fault domain."

    • Source Image:

      • Source Type: Select Platform Image.

      • List of images: Select the Oracle Linux 8 image.

    • Shape: Select one of the smaller shapes such as VM.PCAStandard1.1.

    • Boot Volume: Leave the check box empty so that the default boot volume size is created.

    • Subnet:

      • VCN: Select the VCN you created.

      • Subnet: Select the subnet you created.

    • Public IP Address: Ensure the check box is checked so that a public IP address is assigned to the instance.

    • Private IP Address: Leave the field blank.

    • Hostname: You can leave this field blank or enter a hostname.

    • SSH Keys: Do one of the following to provide your public SSH key:

      • Click inside the Drag and Drop box to open a file browser and select the file.

      • Drag the file from your file browser listing and drop the file on the Drag and Drop box.

      • Select the Paste the public key(s) button, copy your public SSH key text, and paste the text into the field.

    • Initialization Script: Leave this area as is.

    • Network Security Group: Leave the check box unchecked.

    • Tagging: Leave blank. This tutorial does not use tags.

  4. Click the Launch Instance button in the dialog.

  5. Monitor the state of the instance.

    The state is displayed above the icon of the object. For example:


    A screen shot showing the state of Running above the icon for an instance.

    Your instance begins in the Provisioning state. Once the instance is in the Running state, you can connect to it.

What's Next

Continue to Get the Instance IP Address.

Get the Instance IP Address

You can connect to the instance using SSH with the instance IP address.

Using the Compute Web UI

  1. Navigate to the details page of your instance.

    Click Dashboard, and click the Compute/View Instances button. In the Instances list, click the name of your instance.

  2. Select the Networking tab.

    The tabs are displayed at the top of the details panel:


    A screen shot showing the tabs that are displayed at the top of the details.
  3. Under Instance Access on the Networking tab, note the Public IP Address.

What's Next

Continue to Connect to Your Instance.

Connect to Your Instance

In most cases, you connect to a running instance using a Secure Shell (SSH) connection. Some instances support authenticating your connection with a password. This tutorial assumes you used one of the images provided on the appliance, which creates an instance that authenticates your SSH connection with an SSH key pair.

For the system that you will be connecting from, most Linux and other UNIX operating systems include an SSH client by default.

Microsoft Windows 10 and Microsoft Windows Server 2019 systems should include the OpenSSH client, which you'll need if you created your instance using the SSH keys generated by Oracle Cloud Infrastructure.

For other Microsoft Windows versions, you can download a free SSH client called PuTTY from http://www.putty.org.

Before You Begin

  • Get the public IP address of your instance, as described in Get the Instance IP Address.

  • Get the path to your private key file.

  • Get the valid user name.

    The user name is configured in the image used to launch the instance. If you launched an instance using one of the platform images that is provided on the appliance, the default user is opc. See Initial User Account for Platform Images.

Perform one of the following tasks based on the type of system you are connecting from:

Connect from a UNIX System

Perform this procedure on your UNIX system.

  1. Open a terminal window.

  2. Use the ssh command to connect to your instance.

    Syntax:

    ssh –i private_key_pathname username@public-ip-address
    • private_key_pathname is the full path name of the file that contains the private key associated with the instance you want to access.

    • username is the default user name for the instance. For this tutorial, opc is the user name.

    • public-ip-address is your instance IP address.

    Example:

    $ ssh -i /home/flast/.ssh/id_rsa opc@192.0.2.1
  3. If asked whether you want to continue connecting, type yes.

    You are now logged in to your instance.

What's Next

Continue to Add a Block Volume.

Connect Using PuTTY

This connection method is commonly performed from Microsoft Windows systems.

Use this procedure if the instance uses a key pair that you created using the PuTTY Key Generator. See Creating an SSH Key Pair Using PuTTY Key Generator.

  1. Open PuTTY.

  2. In the Category pane (on the left), select Session and enter the following:

    • Host Name (or IP address): username@public-ip-address

      • username is the default user name for the instance. For this tutorial, the user name is opc.

      • public-ip-address is your instance IP address.

    • Port: 22

    • Connection type: SSH

  3. In the Category pane, expand Window, and then select Translation.

  4. In the Remote character set drop-down list, select UTF-8. The default locale setting on Linux-based instances is UTF-8, and this setting configures PuTTY to use the same locale.

  5. In the Category pane, expand Connection, expand SSH, and then click Auth.

  6. Click Browse, and then select your .ppk private key file.

  7. Click Open to start the session.

    If this is your first time connecting to the instance, you might see a message that the server's host key is not cached in the registry. Click Yes or Accept to continue the connection.

Tip:

If the connection fails, you might need to update your PuTTY proxy configuration.

What's Next

Continue to Add a Block Volume.

Add a Block Volume

You can use block volumes to expand the storage capacity of your compute instances.

After a block volume is created, you attach the volume to one or more instances. You can use the volume like a regular hard drive.

Using the Compute Web UI

  1. Click Dashboard, and click the Block Storage/View Block Volumes button.

  2. Click the Create Block Volume button.

  3. In the Create Block Volume dialog, enter the following information:

    • Name: Enter a descriptive name for your block volume.

    • Create in Compartment: Select the Sandbox compartment.

    • Size: Leave the default size (1024 GB).

    • Backup Policy: Do not select a backup policy.

    • Tags: Leave blank. This tutorial does not use tags.

  4. Click Create Block Volume button in the dialog.

  5. Monitor the state of the new block volume.

    The state is displayed above the icon for the object. You can also scroll down to the Resources section and check the Work Request.

    Initially, the block volume is in the Provisioning state. When the volume changes to the Available state, you can attach it to your instance.

What's Next

Continue to Attach the Block Volume to an Instance.

Attach the Block Volume to an Instance

Using the Compute Web UI

  1. Click Dashboard, and click the Compute/View Instances button.

  2. Ensure that the Sandbox compartment is selected at the top of the page.

  3. In the Instances list, click the name of your instance to view its details.

  4. Scroll down to the Resources panel, and click Attached Block Volumes.

  5. Click the Attach Block Volume button.

  6. In the Attach Block Volume dialog, enter the following information:

    • Select from Compartment: Select the Sandbox compartment.

    • Block Volume: Select the block volume you created.

    • Access: Select Read/Write.

  7. Click the Attach to Instance button in the dialog.

    The attachment process takes about a minute. The volume is ready when the Attachment State for the volume is Attached.

    If your block volume isn't displayed, reload the web page.

When a block volume is initially attached to an instance, the instance sees the volume as a new disk. To make the volume available to the instance OS, you need to give the volume a file system and mount it to the OS.

To learn about the block volume and how to make it available to the instance OS, refer to these sections outside of this tutorial:

What's Next

Continue to (Optional) Clean Up Resources.

(Optional) Clean Up Resources

After you've finished with the resources you created for this tutorial, you can delete and release the resources you don't intend to continue working with.

Detach and Delete the Block Volume

Caution:

You cannot undo a termination. Any data on a volume will be permanently deleted once the volume is terminated.

Using the Compute Web UI

  1. Click Dashboard, and click the Compute/View Instances button.

  2. Select the Sandbox compartment.

  3. Click the name of your instance.

  4. In the Resources panel, click Attached Block Volumes.

  5. Find your volume, click the Actions menu, and then click Detach. Confirm the detachment in the dialog box.

    You might need to refresh the web page to see that the block volume is no longer attached.

  6. Click Dashboard, and click the Block Storage/View Block Volumes button.

  7. Select the Sandbox compartment.

  8. Find your volume, click the Actions menu, and then click Terminate. Confirm the termination in the dialog box.

What's Next

Continue to Terminate the Instance.

Terminate the Instance

You can permanently terminate (delete) instances that you no longer need. Any attached VNICs and volumes are automatically detached when the instance terminates. Eventually, the instance's public and private IP addresses are released and become available for other instances.

Using the Compute Web UI

  1. Click Dashboard, and click the Compute/View Instances button.

  2. Select the Sandbox compartment.

  3. Find the instance you created, click the Actions menu, and click Terminate.

  4. In the Confirm Instances termination dialog box, move the "Permanently delete the attached boot volume" selector to the right. Click the Confirm button.

    Moving the selector to the right results in the boot volume being permanently deleted, which is appropriate for this tutorial.

    In production, you can leave the selector in the left position to preserve the boot volume for use with another instance. This is convenient when you want to reuse a configured OS or data on the boot volume.

What's Next

Continue to Delete the Subnet, Internet Gateway, and VCN.

Delete the Subnet, Internet Gateway, and VCN

Using the Compute Web UI

  1. Click Dashboard, and click the Networking/View Virtual Cloud Networks button.

  2. Select the Sandbox compartment.

  3. Click the name of your VCN.

  4. Under Resources, click Route Tables.

  5. Click the name of the route table.

  6. For the route rule you created, click the Actions menu, click Delete, and confirm the deletion.

    The route rule is deleted.

  7. In the breadcrumb path at the top of the page, click the name of your VCN.

    The VCN details page is displayed.

  8. Under Resources, click Internet Gateways.

  9. For the internet gateway that you created, click the Actions menu, click Delete, and confirm the deletion.

    The internet gateway is deleted.

  10. Under Resources, click Subnets.

  11. For the subnet you created, click the Actions menu, click Delete, and confirm the deletion.

    The subnet is deleted.

  12. At the top of the VCN details page, click the Terminate button and confirm the termination.

    The VCN is deleted.

What's Next

Continue to Delete the Compartment.

Delete the Compartment

You must remove all resources from a compartment before you can delete it, otherwise, the delete action fails and the compartment returns to an Active state.

Using the Compute Web UI

  1. In the navigation menu, click Identity, then click Compartments.

  2. For the Sandbox compartment, click the Actions menu, and then click Delete.

  3. Confirm the deletion in the dialog box.