Skip to content

Creating new servers

Once you have an account in Cleura Cloud, you can create virtual machines — henceforth simply servers — using either the Cleura Cloud Management Panel or the OpenStack CLI. Let us demonstrate the creation of a new server, following both approaches.

Prerequisites

You need to have at least one network in the region you are interested in. Additionally, if you prefer to work with the OpenStack CLI, then make sure to properly enable it first.

Creating a server

To create a server from the Cleura Cloud Management Panel, fire up your favorite web browser, navigate to the Cleura Cloud Management Panel start page, and log into your Cleura Cloud account. On the other hand, if you prefer to work with the OpenStack CLI, please do not forget to source the RC file first.

On the top right-hand side of the Cleura Cloud Management Panel, click the Create button. A new pane titled Create will slide into view from the right-hand side of the browser window.

Create new Cleura Cloud object

You will notice several rounded boxes on that pane, each for defining, configuring, and instantiating a different Cleura Cloud object. Go ahead and click the Server box. A new pane titled Create a Server will slide over. At the top, type in a name for the new server and select one of the available regions.

Type in server name and select region

Below the region selection is a drop-down menu where you must select a server profile. Currently, four profiles are available:

  • Generic,
  • High CPU, and
  • Low Latency Disk.

Selecting one of those gives you access to a subset of all available flavors.

As the profile names suggest, each profile but the Generic points to a set of flavors suitable for servers intended to run specific types of applications:

  • The Generic profile is for general-purpose cloud servers.
  • The CPU profile is for servers designed to host CPU-intensive applications.
  • The Low Latency Disk profile is for servers that boot off of a local low-latency disk.

We should point out that not all profiles may be available in any region. Choose the Generic profile for now, which is available in any of the regions.

Select server profile

In the Boot source section below, click the dropdown menu on the left and make sure you select Image, so you can choose one of the readily available OS images to boot the new server off of. To pick one of the images, click on the dropdown menu on the right. For this how-to guide, we have chosen ubuntu in general and Ubuntu 22.04 Jammy Jellyfish in particular.

Select image for the new server

Next up, notice that the Boot Target is preselected for you. Depending on the server profile you have already selected, the boot target will be either Volume or Ephemeral. More specifically…

  • for the Generic and High CPU profiles the boot target is Volume, and
  • for the Low Latency Disk profile the boot target is Ephemeral.

Regarding the server’s CPU core count and amount of memory, set the Flavor accordingly. We suggest selecting a flavor that specifies a server with 1 CPU core and 1GiB of RAM.

Please note that, depending on the chosen flavor, the estimated monthly cost of the server changes. (While a server is shut off you are still getting charged for it, but less so.) At any time, this estimated cost is displayed in the green rectangular area at the top.

Something else that affects the cost is the size of the root device. Take a look at the Volume parameter below, and notice the default (in gibibytes). You may leave the root device size unchanged or modify it to be a bit lower or higher than the default.

When, at a later time, you decide to delete the server, you can do so but keep its boot volume (you may want, for example, to attach the exact same volume to a new server). Just disable the Delete on termination option if you want this kind of flexibility. On the other hand, if you want your root volume to be automatically deleted when the server terminates, the Delete on termination option is already enabled for you. In any case, use this option with caution.

Finally, you may leave the Disaster recovery enabled. If you do, then daily server snapshots will be created, and you will have the option for easy and fast rollups to previous snapshots. Please be aware that leaving this option enabled increases the server’s monthly estimated cost (again, it is displayed in the green rectangular area at the top).

Select server flavor and set volume size

Regarding networking, select at least one of the available (local) networks to attach the new server to. If you want the server to be accessible from the Internet, enable the Connect a floating IP to the server option. Then, from the Create External IP on drop-down menu, select one of the networks the server is attached to. A typical scenario is that the server is connected to just one local network, thus the external IP will be associated with that same network. In the section below, set Security Groups to default or to a security group you have already created.

Connect floating IP, select network and security group

If you already have one or more key pairs in your Cleura Cloud account, you can now select a public key to be included in the ~/.ssh/authorized_keys file of the server’s default user (for the image you have selected, that user would be ubuntu). That way, you can securely log into the remote user’s account via SSH without typing a password. If there are no key pairs to choose from, activate the Set password option and set a password for the default user account.

Select keypair or set default user password

A configuration script is automatically prepared based on the choices you have already made. That script runs during system boot and performs housekeeping tasks like user account creation, enabling acceptable authentication methods, and configuring remote package repositories. Click on Advanced Options to see the default script.

It is now time to create your Cleura Cloud server; click the green Create button, and the new server will be readily available in a few seconds.

Initiate server creation process

Regarding the User-data propagation method above, notice that the Use metadata service is pre-selected for you. For more on what this is and why you might want to select the Use configuration drive method, please read our guide on launching a server with a configuration drive.

An openstack command for creating a server may look like this:

openstack server create \
    --flavor $FLAVOR_NAME \
    --image $IMAGE_NAME \
    --boot-from-volume $VOL_SIZE \
    --network $NETWORK_NAME \
    --security-group $SEC_GROUP_NAME \
    --key-name $KEY_NAME \
    --wait \
    $SERVER_NAME

Each variable represents a piece of information we have to look for or, in the cases of KEY_NAME and SERVER_NAME, arbitrarily define.

Let us begin with the flavors (FLAVOR_NAME), which describe combinations of CPU core count and memory size. Each server has a distinct flavor, and to see all available flavors type:

openstack flavor list

You will get a pretty long list of flavors. For our demonstration, we suggest you go with b.1c1gb. A server with this particular flavor will have one CPU core and one gibibyte of RAM. Go ahead and set FLAVOR_NAME accordingly:

FLAVOR_NAME="b.1c1gb"

Your server should have an image to boot off of (IMAGE_NAME). For a list of all available images in Cleura Cloud, type:

openstack image list

This time you get a shorter list, but you can still filter for images with the OS you prefer. For example, filter for Ubuntu:

openstack image list --tag "os:ubuntu"

Continue with the Ubuntu 22.04 Jammy Jellyfish 20220810 image:

IMAGE_NAME="Ubuntu 22.04 Jammy Jellyfish 20220810"

Before you go on, decide on the capacity (in gibibytes) of the server’s boot volume (VOL_SIZE). We suggest you start with 20 gibibytes:

VOL_SIZE="20"

You need at least one network in the region you’re about to create your new server (NETWORK_NAME). To get the names of all available (internal) networks, type:

openstack network list --internal -c Name
+----------------+
| Name           |
+----------------+
| nordostbahnhof |
+----------------+

Set the NETWORK_NAME variable accordingly:

NETWORK_NAME="nordostbahnhof"

Regarding the security group (SEC_GROUP_NAME), unless you have already created one yourself, you will find only one per region:

openstack security group list -c Name -c Description
+---------+------------------------+
| Name    | Description            |
+---------+------------------------+
| default | Default security group |
+---------+------------------------+

Go ahead and set SEC_GROUP_NAME:

SEC_GROUP_NAME="default"

You most likely want a server you can remotely connect to via SSH without typing a password. Upload one of our public keys to your Cleura Cloud account:

openstack keypair create --public-key ~/.ssh/id_ed25519.pub bahnhof

In the example above, we uploaded the public key ~/.ssh/id_ed25519.pub to our Cleura Cloud account and named it bahnhof. Follow our example, and do not forget to set the KEY_NAME:

KEY_NAME="bahnhof"

By the way, check all uploaded public keys…

openstack keypair list

…and get more information regarding the one you just uploaded:

openstack keypair show bahnhof

You are almost ready to create your new server. Decide on a name…

SERVER_NAME="zug" # just an example

…and then go ahead and create it:

openstack server create \
    --flavor b.1c1gb \
    --image $IMAGE_NAME \
    --boot-from-volume 20 \
    --network nordostbahnhof \
    --security-group default \
    --key-name bahnhof \
    --wait \
    zug

(For clarity’s sake, and with the exception of IMAGE_NAME, we used the actual values and not the variables we so meticulously set.) The --wait parameter is optional. Whenever you choose to use it, you get back control of your terminal only after the server is readily available in Cleura Cloud.

To connect to your server remotely, you need to create a floating IP for the external network in the Cleura Cloud, and then assign this IP to your server. First, create the floating IP:

openstack floating ip create ext-net

See all floating IPs…

openstack floating ip list

…and assign the one you just created to your server:

openstack server add floating ip zug 198.51.100.12

The username of the default user account in the Ubuntu image is ubuntu, so now you can connect to your remote server via SSH without typing a password:

ssh ubuntu@198.51.100.12

Alternatively, you may also use the following command, which is more flexible though slightly longer:

openstack server ssh --public zug -- -l ubuntu

Viewing information about the newly created server

At any time, from the Cleura Cloud Management Panel you may see all servers, and get detailed information regarding each one of them; expand the left-hand side vertical pane, click Compute, then Servers, and, in the central pane, select the region you want.

View server details

To see all available servers in the region, type:

openstack server list

You can always get specific information on a particular server:

openstack server show zug

Connecting to the server console

While viewing information regarding your server, you may get its public IP address (e.g., from the Addresses tab) and connect to it remotely via SSH. Alternatively, you may launch a web console and log in; click on the three-dot icon on the right of the server header, and from the pop-up menu that appears select Remote Console.

Launch remote console

A new window pops up, and that’s your web console to your Cleura Cloud server. Please note that this window cannot be resized but can be opened in a new browser window or tab.

View and use server console

You may have access to the web console of your server, and you need the corresponding URL for it:

openstack console url show zug

Usage of the web console is discouraged, though. Instead, securely connect to your server via SSH.