OCI Compute Instances

Launch Compute Instances

Navigate to OCI console and click Compute which will render Compute list. There many ways to create Compute Instance as mentioned below

Using Create Instance

The simplest way to launch compute instance from OCI Console. Click the Compute instance and fill the details.

  • Shape : Choose Ampere with VM.Standard.A1.Flex to avail free tier
  • Image: You can either choose Custom Image or default image provided
  • Networking: Select an existing or new VCN and Subnet. If you want this instance to be public facing ensure subnet is public
  • Always check the box for assigning Public IPv4 addressed
  • For ssh keys, there 3 options, preferred option is to always generate new key-pair
  • You can also attach block volume.
  • Click the create button, which in turns generated work request and changes the state of Instance to creating
  • Once Instance is provisioned the state changes to Running

Using Instance Configuration

Navigate to Compute-> Instance configurations and click Create instance configurations. Below is snippet for same. This is will help to launch Compute instances from the config and advantage is that we can write cloud init script to install some default software and tools.

Once configured, the instance configuration list page will show the newly created config.

Click the instance config which navigates to instance config details page. Now we can launch an Instance or we can also create a instance pool. The suggested approach is to always create an Instance pool.

Instance Pool

Launch an instance pool from instance config details.

  • Choose the compartment
  • Choose number of instances from the pool
  • Instance configurations details (pre-populates from the selected instance config)
  • Configure pool such as AD’s, FD’s and Primary VNIC and subnet. All the instances will be provisioned in mentioned subnet
  • Review and Create.

SSH to Instance

Cloud Shell

  • Launch the cloud shell and it will prompt for username and password: The password will be Auth token and username will be based on OS, for ex for debian custom image username is debian, for ubuntu it will be ubuntu and oracle linux it will be OPC.
  • Navigate -> Identity ->Domains -> Default domain – >Users.
  • In the resources section there is option to generate token

Using Local Machine

Use the public IP and generated key to SSH, ensure below network setting are in place

  • SSH port in ingress rule is open in Security List (default)
  • TCP port 80 in ingress rule is open in Security List (default)

Leave a Reply