The purpose of this quickstart is to help you launch a compute instance that you can test and experiment with, in order to get a better understanding of how the compute service works.
To achieve this, we will provide a simple, single instance example using some of the most common methods that are being used by our customers. These are:
The Catalyst Cloud web dashboard.
The Openstack command line tools.
The Openstack Heat orchestration tool.
The Hashicorp Terraform orchestration tool.
The first thing we need to do is to make sure we have a way to access the instances we create. We use SSH to allow access to our instances. You can either import an existing public key or have the Catalyst Cloud create a key pair for you. We document both below:
If you haven’t generated a SSH key pair before, Catalyst Cloud can create one for you.
Navigate to the Key Pairs tab.
Select the Create Key Pair button.
Name and create the key pair.
Click Copy Private Key to Clipboard and paste it into a text file in a secure location. Make sure the file is saved as plain text.
If you already have an SSH key pair, you can import the public key onto the Catalyst Cloud.
Navigate to the Key Pairs tab.
Select the Import Key Pair button.
Name the key pair, and paste your public key into the box.
Now that you’ve either imported or created an SSH key pair, we can continue.
By default, instances are inaccessible from all external IP addresses on all ports. So we’ll need to create an extra security group to let us SSH into the instance we’re about to create.
Navigate to the Security Groups tab.
Now we’ll create a new security group, allowing SSH access. Select Create Security Group , give it a name, and create it.
Now select manage rules for your new security group.
As you can tell, by default, security rules allow egress of all traffic and allow no ingress of traffic. By adding additional rules we can whitelist new types of traffic coming from new IP addresses. Note that you can assign more than one security group to an instance.
Select add rule.
Here we can see the add rule screen. Many options are available to us.
Change the Rule dropdown to SSH. Here you can customize what CIDR range you allow access to your instance from. I’ve left it as 0.0.0.0/0, to allow SSH access from all IP addresses. This would be an insecure thing to do when working in a real production environment, but I’m leaving it like this for convenience.
When you’re happy, select Add to add the rule to the security group.
We now have a security group that will allow SSH access to our soon to be created instance.
We are now ready to launch our first instance! Navigate to the Instances page.
Select launch instance.
Name your instance.
Navigate to the Source tab.
There are many types of sources you can use for your instance. In this case, we’ll use an Image to create a standard Ubuntu installation.
Search for Ubuntu.
Select the image for Ubuntu 20.
By default the volume will just be large enough to hold the image’s files. We’ll increase it to 100GB so we have enough space for later.
Navigate to the Flavor tab. This is where we select the compute resources we want to assign to our compute instance.
Order the flavors by VCPUS, and select an appropriate size.
Navigate to the Security Groups tab. Add your new security group.
Navigate to the Key Pair tab. Your key pair should already be assigned, but if it’s not, do it now. This will inject your public key into the new instance, so that your private key will be accepted for SSH connections.
All the other tabs are for advanced features, and we can safely ignore them for now.
Select Launch Instance.
Finally, to make your instance accessible, we need to give it a publicly available, static IP address, because currently the instance only has an internal IP address from instance’s subnet. These are Floating IPs.
Use the instance’s dropdown to find the Associate Floating IP option and select it.
Select the + to create a new floating IP address.
Select Allocate IP to provision yourself a floating IP address.
The new floating IP should already be assigned.
Select Associate to associate it to your instance.
Congratulations, you’ve now booted an instance. Now we’ll connect to it with an SSH tunnel so you can start using it.
Before we SSH in, we should give the private SSH key the correct, more secure permissions.
$ chmod 600 <path to private key>
You can now connect to the SSH service using the floating IP that you associated with your instance. This address is visible in the Instances list, or under the Floating IPs window.
$ ssh -i <path to private key> ubuntu@<your floating ip>
You should be able to SSH into, and interact with this instance as you would any Ubuntu server.
The configuration we will use for these examples is based on the settings that would be found in a brand new cloud project; which will have been provisioned with a single network.
We will launch a compute instance using an Ubuntu 20.04 image and connect it to the default network mentioned above. We will also create a security group to allow inbound SSH traffic
The configuration details are as follows:
region name : nz-hlz-1
external network name : public-net
internal network name : private-net
image name: ubuntu-20.04-x86_64
flavor name : c1.c1r1
These examples assume the following:
You have whitelisted the public facing IP address that you will be using to access the Catalyst Cloud APIs. Alternatively you can work from or via an instance based in your cloud project, as it will have API access by default.
You have implemented an appropriate authentication method to allow you to interact with your Catalyst Cloud project. There are several options available to you depending on your tool of choice, some of these are:
Using an openrc file
Using a clouds.yaml file
You have uploaded or created an SSH key.
The following is a set of different templates that you can use to create your own compute instances. These instances will be the same as if you followed the instructions from the first instance section of the documents.
This documentation refers to values using place holders (such as <PRIVATE_SUBNET_ID>) You will need to change these to whichever UUID fits your project before you run any of these templates.