Create a cloud instance (3/4)
instance persistent ephemeral security

Create a cloud instance (3/4)

Introduction

In this tutorial, part of the getting started series, we explain how you can create an instance (virtual machine) with ephemeral storage, how you create an instance with a bootable volume and how you can add and change the security groups of an instance.

Before you create an instance, you need to know what type of storage you want to use. You can configure a new ephemeral instance or a persistent instance. If you want to know the differences between these two, click the following link: How to choose the right OpenStack Storage.

Creating a Persistent Instance

For creating a persistent instance, you need to create a bootable volume.

  1. Log on to the OpenStack dashboard and choose your project.
  2. Click Compute followed by Volumes.
  3. Select Create Volume:
    1. Specify your new volume name and optionally a description.
    2. Type: Select low, medium or high.
    3. Size: The minimum for a linux bootable volume is 10GB and for a Windows bootable volume is 30GB.
    4. Select Image from the Volume Source drop down list.
  4. Use image as a source: Choose the image you like to use.
  5. Availability Zone: Any Availability Zone will select the availability zone offering the best possible performance.
    1. If you select a specific Availability Zone, you will need to make sure that your bootable volume remains in the same availability zone as the instance you’re going to create with the bootable volume.
  6. Click on Create Volume.

Prerequisites:

Creating an Instance with a Bootable Volume

  1. Log on to the dashboard.
  2. Click on the Compute tab and select Instances.
  3. Click on the button Launch Instance
  4. You will start on the Details tab.
    1. Give your instance a name.
    2. Select an Availability Zone for your instance or leave it on Any Availability Zone. If you choose Any Availability Zone, Fuga Cloud will select an availability zone based on the most capacity.
    3. The default number of instances is 1, and you can change this number if you want to launch several of the same instances at once.
  5. Click on the Source tab.
    1. Select the Key Pair that you created earlier and select a Security Group.
      • You can add more than one key pair.
  6. Click on the Flavor tab and select the desired flavor for your instance. In this example, I will be using a c2.medium.
  7. Click on the Networks tab and select public.
  8. Click on the Security Groups and add your desired security group. If your environment only has the default security group, it will be automatically selected.
  9. Click on the Key pair tab and select your key pair that you have previously created or imported.
  10. Click on the Configuration tab and place the following script in the Customization Script field:
    #cloud-config
    hostname: instance1
    fqdn: instance1.fqdn.test
    manage_etc_hosts: true

    By adding these extra configuration rules you ensure that the operating system knows what to call itself (hostname) and what its FQDN is. It is therefore not a mandatory step, but prevents unnecessary warning messages.

  11. Click on the button Launch instance.

Your instance with bootable volume has now been created, and you should see it directly in the Instances tab. A public IP address should be assigned to your instance. The newly created volume is now visible in the Volume tab. You will see that a Regular Volume has been created with the desired size.

Creating an Ephemeral Instance

  1. Log in to the dashboard.
  2. Click on the Compute tab and select Instances.
  3. Click on the button Launch Instance
  4. You will start on the Details tab.
    1. Give your instance a name.
    2. Select an Availability Zone for your instance or leave it on Any Availability Zone. If you choose Any Availability Zone, Fuga Cloud will select an availability zone based on the most capacity.
    3. The default number of instances is 1, and you can change this number if you want to launch several of the same instances at once.
  5. Click on the Source tab.
    1. Select the Keypair that you created earlier and select a Security Group.
      • You can add more than one key pair.
  6. Click on the Flavor tab and select the desired flavor for your instance. In this example, I will be using a c2.medium.
  7. Click on the Networks tab and select public.
  8. Click on the Security Groups and add your desired security group. If your environment only has the default security group, it will be automatically selected.
  9. Click on the Key pair tab and select your key pair that you have previously created or imported.
  10. Click on the Configuration tab and place the following script in the Customization Script field:
    
        #cloud-config
        hostname: instance1
        fqdn: instance1.fqdn.test
        manage_etc_hosts: true
      

    Met het toevoegen van deze extra configuratie-regels zorg je ervoor dat het besturingssysteem weet hoe hij zichzelf moet noemen (hostname) en wat zijn FQDN is. Het is dus geen verplichte stap maar voorkomt onnodige waarschuwingsmeldingen.

  11. Click on the button Launch instance.

Your Ephemeral Instance has now been created, and you should see it directly in the Instances tab. A public IP address should be assigned to your instance.

Adjust security groups of an instance

If you did not select all security groups during the launch of your instance, or if you want to add additional security groups later, you can easily do this by performing the following steps:

  1. Log in to the dashboard.
  2. Click on the Compute tab and select Instances.
  3. Click on the down arrow right of the Create Snapshot button to view all the available options.
  4. Select edit security groups.
  5. A new tab opens, and you can see the available security groups you made earlier.
  6. Click the one you want by clicking on the + and save. You can add more than one security group.

Conclusion

You now know how to launch an instance that is booted from ephemeral storage and volume storage. In the next tutorial, we will explain step by step how to log in to your instance.

Was this article helpful?


Next article:

How to log in to your instance (4/4)

Introduction In this tutorial, part of the getting started series, we explain step by step how to log in to your instance. Prerequisites: Fuga Cloud Account A security group with SSH access Key Pair A running instance with a public IP address For most new images the username is the distribution name with lowercase, for example, Ubuntu 18.04 is ubuntu, and Fedora 27 would be fedora. Connect to a Linux instance with an imported Key Pair Open your terminal and type one of the following commands to connect to your instance.

Improved performance and more features

BRAND NEW PLATFORM

NOW IN PUBLIC BETA

Test it for FREE! More information