Your First Instance
With the background out of the way, let's work on bringing up your first instance.
You'll bring online an instance running Linux (specifically, Ubuntu 18.04), and connect to it over SSH.
Login to the dashboard
Login to the Melbourne Research Cloud dashboard using your university account.
If you haven't used the dashboard before, you'll have to agree to the conditions; after that, you'll be allocated a trial project, which you can use for this demo.
Your trial project will have a name of the form
pt- denotes project trial.
Create a keypair
Navigate to Compute -> Key Pairs and click
+ Create Key Pair.
Give it a name, and you'll then download the private half of the key pair (a file ending in
Keep this file secret, keep it safe.
Anyone with access to it can log into your instances.
There is a guide if you would like more information on SSH. The public half of the keypair will be kept in the cloud to inject into any instances you launch.
Launch an instance
Navigate to 'Instances' and click 'Launch Instance'. This will open a dialog, which we will walk through next.
The first tab that will open in the Launch Instance dialog is Details:
You must give an instance name; the other fields can be left as their default values. (Contrary to popular belief, instance names do not need to be unique.)
It isn't possible to create a "blank" instance; all instances are based on a source containing software such as an operating system. For this tutorial, we will base our instance on Ubuntu Bionic.
Go to the Source tab.
- Ensure that the Select Boot Source drop down is set to
- You might want to search for
ubuntuin the Available search box
- Select the image named
NeCTAR Ubuntu 18.04 LTS (Bionic) amd64by clicking on the 'up' arrow next to it.
Once selected you should see it appear in the section titled Allocated.
Go to the Flavor tab.
- Select the
uom.general.1c4gflavor by clicking on the 'up' arrow next to it in the 'Available' list.
Add security groups
On the Security Groups tab:
- Enable the
- The 'default' security group allows outgoing connections from the instance (e.g. for downloading software), while the 'ssh' group allows incoming connections on the port used for SSH (22) so you can connect to your instance.
- N.B. If you don't enable the SSH Security Group, you will not be able to manage your instance until you do.
- Enable the
Add public key
Under the Key Pair tab
- Make sure your new key pair is selected from the 'Available' list.
Click on Launch Instance at the bottom of the dialog.
Your instance will now be created. It will take a couple minutes to come online, when it does you should see an IP address listed in your list of instances. If anything does go wrong, delete the resultant instance and do the above steps again.
Open your SSH client, and connect to your instance using the IP address listed in the previous step. The username will be
ubuntu, and instead of using a password, you should select the key you created in step 2. Setup of your SSH client was described in the pre-requisites, you can find the details here.
MobaXTerm: the necesssary fields are circled. You will most likely need to hit "Advanced SSH settings" to make those settings appear.
OS X Terminal: Here you can see a user move (mv) their mykey.pem into .ssh, change the permissions accordingly, then login to the server. Note that the yes/no challenge will only happen the first time you try to connect.
Try some commands
You're now connected to your instance! Try running a command; type the following into the command prompt and hit enter:
$ echo hello world! > hello.txt
This will write
hello world!to a text file called
If you type the command
lsyou'll see the file in your current directory, and if you type
cat hello.txtit will display its contents.
If you struggle with this step, don't forget the command line tutorial!
Congratulations, you've created your first instance in the Research Cloud!
The cloud is a shared resource. As a result, if you are running an instance, that may very prevent someone else from being able to run their instance. This is one of the reasons why each project has a limit on the set of resources they can use.
To be a good neighbour, and to safeguard your project limits, you should only use resources when you need them. When you are finished with them, you should release them so others can use them. So now exit your SSH client by pressing ctrl-d or closing the window or by typing
Then delete your instance by clicking on the checkbox next to it and selecting the 'Delete Instance' button.
You will make mistakes and get frustrated at the Dashboard - we know because we do too. For me, it's always forgetting to allow access for the appropriate ports in Security Groups. Always. Don't panic. If you can, just delete the instance and start again. If you can't, try turning it off and on again. Or contact us for support.
If you have technical questions, or would like to discuss your needs with us, you may request help or further hands on training here:
Alternatively you may contact us at firstname.lastname@example.org.