Now that I have all the basic building blocks set up, I can proceed to setting up an instance.
Incidentally, packstack set most of this up already, but I actually ripped out most of the networking stuff created by packstack, and also removed the demo tenant and set all that stuff up from scratch. I’m glad I did, as I have a lot better understanding as to what is going on with that part now. Understanding of Cinder and Swift is not necessarily nearly as important on a single server cloud as far as I’m concerned, and can be looked into later.
In any case, time to get started.
Make sure that the correct tenant is selected before doing any of this – admin is not the correct one! I may address this in a later article, but you either want to make sure that admin has correct permission for the project, or log in as the project’s admin user.
Adding a Key Pair
Instances cannot be logged into over SSH if there is no key pair.
Go to Projects -> Compute -> Access and Security. Under Key Pairs, a key pair can either be created, or imported. Importing brings up this window which you can put in your own OpenSSH public key:
Creating a key pair will create a key pair, and then automatically download it.
Adding SSH Access Rules
Under Projects -> Compute -> Access and Security -> Security Groups, a firewall rule needs to be added for SSH. Click Add Rule after selecting the default security group and enter the following:
This allows SSH globally. Rules can also be made to link security groups, allowing you to create more sophisticated access schemes across different networks.
Time to create the instance.
Head to Project -> Compute -> Instances and click Launch Instance:
Note the options. I am using preconfigured flavours with the Debian Jessie image I uploaded. I am also using a test key pair, and the network I created.
Post-Creation gives you a place to add any post-installation scripts and what not, and Advanced Options allows you to set up custom partitioning if you want. I don’t need either of those, so I did not include them or modify them.
After clicking Launch, and waiting a bit of time, the instance should be visible:
I can now proceed to attaching a floating IP, so that the instance is publicly accessible.
Adding a Floating IP Address
Click the drop down box at the far right of the instance listing and select Associate Floating IP:
Since I do not have any IPs allocated, I have to request one, by clicking the + (plus) button:
I can then use the allocation given to me:
And now the IP address will be visible in the instance, after clicking Associate of course:
The Debian image’s default login at this time is debian. Most instances will NOT let you log in as root, so consult the image documentation for any specific default user that is created. Sometimes, logging in as root will give you the correct user to log in as and then disconnect you (such is the case with the Debian image).