Create a cloud instance (3/4)

In this tutorial, part of the getting started series, we explain how you can create an instance 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.

Prerequisites:

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 Storage followed by Volume Store.
  3. Select Create Volume
    • Specify your new volume name and optionally a description.
    • Select Image from the Volume Source drop-down list.
      • Use image as a source: Choose the image you like to use.
    • Type: SSD
    • Size: The minimum for a Linux bootable volume is 10GB, and for a Windows bootable volume is 30GB.
  4. Availability Zone: AMS
  5. Click on Create Volume.

Creating an Instance with a Bootable Volume

  1. Log on to the dashboard.
  2. Click on the Storage tab and select Volume Store.
  3. Click on the button Launch Instance
  4. You will start on the Details tab.
    • Give your instance a name.
    • Availability Zone is AMS
    • 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.

  • 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 the 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

 

Note: 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.
    • Give your instance a name.
    • 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.
    • 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.

  • 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 the 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

 

Note: 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 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.