You’ve signed up for an Oracle Cloud Free Tier at https://www.oracle.com/cloud/free/ and now you want to deploy an app to a virtual machine compute instance.
You will need an SSH key pair. You can use an existing key or you can generate a new one.
Create a new Compute instance
After you log into your Oracle Cloud Dashboard.
- Click on the “Create a VM instance” box
- In the form that opens, you can give your new instance a name that makes sense for your project or use the default name
- Click “Show Shape, Network and Storage Options”
- Make sure that the Always Free options are selected for:
- Availability Domain
- Instance Type
- Instance Shape
- Choose the compartment you want to use for your cloud network objects for both:
(If you have not created a Virtual cloud network in your selected compartment, the system will create it for you.)
- Virtual cloud network compartment
- Subnet compartment
- If you would like a public IP assigned when the instance is created select the option “Assign a public IP address”
- In the “Add SSH key” section you can add your SSH public key using one of these methods:
- Uploading the file with the “Choose File” button
- Copying and pasting the key into the text field
- Drag the public key file into the “Drop Files Here” box
- Click “Show Advanced Options”
- Select the Compartment you would like to use for your new Compute instance
- Click the “Create” button
Your new Compute instance will be provisioned. The Orange box will turn Green when it has been provisioned and is available to use.
Look in the “Instance Information” tab, in the “Primary VNIC Information” section and get your assigned “Public IP Address”.
Test with SSH
You will want to look up the best way to open an SSH connection for your operating system.
The default user that you will connect as is “OPC”.
On Linux you can test your connection using the following command:
ssh opc@<your Public IP Address from above>
You should see the following question asking if you are sure you want to connect to this new instance. This should only happen the first time you establish a connection to this instance from this machine.
The authenticity of host '220.127.116.11 (18.104.22.168)' can't be established.
ECDSA key fingerprint is SHA256:dFbBXVRCtiwagDB4L+B3s36LJ7/P+VA1DHsegAAXGAM.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type “yes” and hit enter.
You should now be connected to your new instance and can start setting it up to deploy your application.