Oracle’s Infrastructure as a Service (IaaS) public cloud provides raw compute and storage capabilities that can be used for almost any workload. This blog series will outline the process used to migrate existing workload from our on-premises data center to instances running on Oracle IaaS public cloud compute and storage services. The first part of this series will cover the process to manually create the components needed to start an instance using Oracle provided Enterprise Linux image on the Oracle public cloud.
The basic process to provision an instance on the IaaS public cloud is as follows:
- Generate an SSH key pair
- Upload the SSH public key to the compute cloud service
- Reserve a public IP address
- Create a bootable storage volume using an Oracle provided OS image
- Create the instance, associating it to the public IP address, bootable storage volume, and SSH public key
Generate SSH key pair
On an on-premise linux server, use the ssh-keygen command to generate a public and private key pair:
ssh-keygen -b 2048 -t rsa
When prompted, enter the path to the file to save the key:
Enter the passphrase and confirm it by entering it again.
There will now be two files generated:
/home/oracle/.ssh/id_rsa ß SSH private key
/home/oracle/.ssh/id_rsa.pub ß SSH public key
*** Note: make sure these files are stored securely to prevent exposing your cloud instances.
Upload the SSH public key
Sign in in to the Oracle Cloud My Services application for the security domain containing your Oracle Compute and Storage Cloud Services.
Click on the Service Console link in the Oracle Compute Cloud Service tile.
In the overview tile, select the Menu drop down and select Manage SSH keys:
From the SSH Public Keys tile, click on the Add SSH Public Key button:
Provide a name for your public key and paste the contents of your SSH public key file generated in the previous step:
Reserve a public IP Address
Click on the Network link in the Oracle Compute Cloud Services overview box:
Click on the IP Reservations tile and Click on the Create IP Reservation button:
Provide a Name (for clarity, the recommendation is to use the name of the target instance as the name), leave the For Instance set to None, and click Create:
Create a bootable storage volume
Click on the Overview link in the Oracle Compute Cloud Services overview box, click on the Storage tile, and click on the Create Storage Volume button:
Enter the name of the storage volume. To make it easier, name the volume to be similar or match the name of the target instance.
Enter a Size (minimum has to be the size of the boot image, but it can be larger).
Select a boot image from the drop down list that is closest to the use of the target instance. This example is using a generic OEL 6.4 60GB image with no additional software on it.
For storage property, select the Default storage property.
Select None for the Attach Instance, and then click Next.
If everything looks correct on the review page, click on Create:
In the list of Storage volumes, you see the newly created storage volume in the list under a status of Initializing.
The storage volume is not usable until the status is Online.
Create an Instance
Select the Instances tile and select the Create Instance button:
Enter the Name and Label of the instance.
Select image to use for the instance from the dropdown. This should be the same image selected on the building of the storage volume.
Select the Shape (which assigns the CPUs and memory to the instance), and click Next:
Next, assign a DNS Hostname Prefix (for ease of use, I set to the same as the instance name).
Make sure the Configure Instance for Public SSH Access is checked if you want the ability to SSH to the instance.
Select Persistent Public IP Reservation.
Finally, associate the instance to the Public IP address created earlier by selecting the name (IP address) from the drop down and click Next.
From the list of Available Storage Volumes shuttle the storage volume created earlier to the Selected Storage Volumes.
Select that same storage volume from the Boot Volume drop down and click Next.
Click the Select Existing SSH Public Key(s).
Shuttle the public SSH key uploaded earlier from the Available SSH Public Keys to the Selected SSH Pubic Keys.
Note*** The same public key can be used for multiple servers.
If everything is correct on the Review screen, click Create.
The instance will now go into a Preparing status.
When the status switches to Running, the instance is ready for use.
The steps list above are the basic operations needed to create a functioning Linux instance on the Oracle Iaas Public Cloud. There are mechanisms to automate the process further and some of those will be covered in future blog posts. But, this will give the basics for getting started using the Oracle Iaas Public Cloud compute and storage services.
Stay tuned for the next part in this blog series:
Oracle IaaS Public Cloud: Securing Instances