User Guide

Summary
In this guide you are going to learn how to start a virtual machine instance from the P2C dashboard then connect to the instance using SSH. We assume that you already have an account in P2C, otherwise you need to request for one.

Steps

1. Go to main portal of P2C at http://10.0.3.101/horizon. Enter your username and password.
2. The main dashboard interface after successful login is shown below.

3. Generate a key pair that you will use to connect to instances. Click the Access & Security tab on the left then choose Key Pairs. Click Create Key Pair.

4. Enter the name of the key pair. In the example below, the format is <person>-<login>-p2c, thus jachermocilla-guest-p2c. Click Create Key Pair. A file with a .pem extension will be downloaded. Store this file in a secure location. You will need this later.


5. Configure what type of network data will be allowed in the instances. For testing purposes, you should allow ICMP, TCP, and UDP. Click Access & Security on the left then Security Groups at the top. Click Manage Rules under the default security group. Click Add Rule. A dialog box will appear. From the Rule drop-down, select All ICMP then click Add. Similarly, add rules for All TCP and All UDP.


This is how the default security group settings should look after.

6. You are now ready to launch an instance. Click Images on the left. Click the Launch button on the row of Ubuntu-14.04-server-amd64. A dialog box will appear. Enter the Instance Name (mywebsite in the example) and select the Flavor. Flavor refers to the characteristics of the virtual machine which includes number of virtual CPUs, amount of RAM, size of root partition, etc. Also check if the key pair you created earlier is allowed access to this instance. Do this by clicking Access & Security and selecting the key pair you created. Finally, click the Launch button.



7. Click Instances on the left and you will see the details of the instance. On the right you will see a drop-down list of additional operations/actions for the instance, such as View Log and Console access. If you are done with your work, you  can destroy the instance by clicking Terminate Instance.

8. Associate a floating IP address to the instance to make it accessible to the external network. You will observe that there is an IP address (192.168.0.9 in the example) assigned. This IP address is used internally only. In order for you to connect to the instance from your current network, you need to assign a floating IP address. Click Access & Security on the left then Floating IPs at the top. You will see a list of IP addresses (These are designated by the P2C administrator). Click Associate on the floating IP you want to use for your instance(10.0.3.247 in the example), a dialog box will appear.

Select from the drop-down list your instance(mywebsite in the example) . Click Associate. If you now click Instances on the leftyou will see that your instance now has two IP addresses.



9. Congratulations! At this point your instance is now up and running. Open a terminal and start testing. First ping your instance using the floating IP you associated earlier.
$ping 10.0.3.247

To login to your instance, first make sure that the key is accessible only to you.
$chmod 600 jachermocilla-guest-p2c.pem

Then login using SSH.
$ssh -oUserKnownHostsFile=/dev/null -i jachermocilla-guest-p2c.pem ubuntu@10.0.3.247


10. You are now successfully logged-in. Next is to learn how to use screen, then create a new user with SSH access so that you can connect using a username and password to your instance. After which you can try configuring a LAMP Stack.