1. Home
  2. Knowledge Base
  3. OpenStack
  4. Create an OpenStack Linux instance and connect to it via internet

Create an OpenStack Linux instance and connect to it via internet

This article will teach you how to create an OpenStack virtual machine from the OpenStack control panel.

Create a Windows instance? Read our manual for Windows

  1. Click on the link to log in your OpenStack control panel. Choose your authentication method and click on ‘Connect’Log in OpenStack control panel
  2. Fill in your username and password to get access. You can use the same details with which you log into our control panelOpenStack login
  3. You have opened the OpenStack dashboard. Navigate to ‘Network’ >> ‘Security Groups’.Overview
    'Network' >> 'Security Groups'Here are your security groups. To edit the default group click on ‘Manage Rules’. Then click on ‘Add Rule’. This will open a pop-up window for your new rule.Security groups
    Manage rules
    Add ruleAt this step you will add the HTTP port to the security group so the content is accessible via a browser. In your popped-up window just leave the default settings and add ‘80’ for the port. Then click on ‘Add’ to finalize.HTTP portYou will now see your new rule in the list, with the ‘HTTP‘ tag. Make sure port 22 is always open (for SSH access). For webs access keep ports 443 (HTTPS) and 80 (HTTP) opened. To use the server as a mail server you need: 110, 143, 995, 993, 25, 465, 587 open. To use the instance as a database server open ports: 3306.
  4. Now it is time to create or import an SSH key pair in order to communicate with the server. Follow ‘Network’ >> ‘Security Groups’, then switch to the ‘Key Pairs’ tab at the top.'Network' >> 'Security Groups'
    Key Pairs
  5. To create an SSH key pair click on ‘Create Key Pair’, fill in the name of the pair and click on the ‘Create Key Pair’ button at the bottom of the pop-up window. That will start a download of a .pem file – this is your private key. Keep your file in a safe location. Make sure you edit the file’s permissions to 600.Create Key pair
    Key Pair Name
    File
  6. The third preparation step is to allocate an IP address. Follow ‘Network’ >> ‘Security Groups’, then switch to the ‘Key Floating IPs’ tab at the top.'Network' >> 'Security Groups'
    Floating IPsClick on ‘Allocate IP To Project’ to open the pop-up window. Then from the ‘Public’ pool you assign an IP by simply clicking on the ‘Allocate IP’ button at the bottom.Allocate IP to project
    Allocate floating IP

Now you can create your virtual machine.

  1. Click on ‘Compute’ >> ‘Instances’ and then on ‘Launch Instance’‘Compute’ >> ‘Instances’
    Launch instanceTip: In this section, whenever you only have one choice for your settings, it will be pre-selected for you. You do not need to click on it to add it.

    1. Select your zone and click on ‘Next’Instance Name and Zone
    2. You are now in the ‘Sources’ section. Select an OS for your instance from the ‘+’ button and click on ‘Next’ again.Select an OS
    3. In ‘Flavor’ you select the scale of the virtual machine. When you decide on the capacity you need, click on the ‘+’ button and then on ‘Next’ again.Flavor
    4. In ‘Networks’ select your default Private network.Networks
    5. In ‘Network Ports’ you can associate an IP address with a port.Network Ports
    6. In ‘Security Groups’ you can manage the group of filter rules applied to the instance. We have already prepared by adding Port 80 to the Default security group.security groups
    7. In ‘Key Pair’ make sure the key pair you want to use is under ‘Allocated’ and not under ‘Available’. WARNING: Please note this step is not optional. If you do not allocate at least one key pair, you will not be able to access the instance in any way. With the original instance you can connect to the instance and, if you need to, add extra public keys via ./ssh.Key pair
    8. In ‘Configuration’ you can keep the default settings.Configuration
    9. In ‘Metadata’ you can keep the default settings.Metadata
  2. Click on ‘Launch Instance’ at the bottom of the pop-up to create your machine. Give it a minute to process and it is ready for work.Launche instance
    Launch instance
  3. Click on the arrow to open the dropdown menu next to ‘Create Snapshot’ and click on ‘Associate Floating IP’. Select the IP address you added in the last preparation step.Create snapshot
    Manage floating IP Associations
  4. Now you can connect to your instance via SSH by typing in the following command, where:terminal
    Command

    • ‘Key-directory’ is the location of your private key file;
    • ‘private-key-name.pem’ is the name of your private key file;
    • the username is ‘debian’, ‘centos’, or ‘ubunto’ depending on your OS;
    • and 111.111.111.111 should be your floating IP:ssh -i Key-directory/private-key-name.pem debian@111.111.111.111
Updated on 8 March 2020

Was this article helpful?

Need support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact support

Couldn't find a solution?

support_bottom_contact_alt

Our specialists are available 24/7 to provide you with free support. Feel free to contact Joachim and his colleagues via e-mail or by phone.

support_bottom_contact_alt
Joachim Coessens Specialist Support