Skip to main content
Version: v4

How to Create an Instance

This guide creates a private network, a security group, a key pair, and an instance, then attaches a floating IP so the instance is reachable from outside the cloud.

Create a network and router​

Horizon creates the network and the router separately.

Go to Project -> Network -> Networks.

Networks list in Horizon

Click Create Network. The form has three tabs.

Create Network form in Horizon

  • Network tab — Network Name: Private. Leave Create Subnet checked.
  • Subnet tab — Subnet Name: private-subnet. Network Address: 192.168.0.0/24.
  • Subnet Details tab — leave Enable DHCP checked. DNS name servers and allocation pools are optional.

Click Create.

Next go to Project -> Network -> Routers.

Routers list in Horizon

Click Create Router.

Create Router form in Horizon

  • Router Name: Router.
  • External Network: External.

Click Create Router, then open the router, choose the Interfaces tab, and click Add Interface to attach private-subnet.

View the topology​

Go to Project -> Network -> Network Topology.

Network topology in Horizon

The Graph tab shows the same data as a node graph. Small and Normal change the level of detail.

Create a security group​

Security groups control traffic to and from instances. The default group allows inbound traffic only from instances in the same group, and allows all outbound traffic.

Go to Project -> Network -> Security Groups.

Security groups list in Horizon

Click Create Security Group, name it SSH, then click Create Security Group.

Create Security Group form in Horizon

Click Manage Rules on the new group.

Security group rules in Horizon

Click Add Rule.

Add Rule form in Horizon

  • Rule: SSH, which presets TCP port 22.
  • Remote: CIDR.
  • CIDR: the source allowed to connect.

Click Add.

Open only the ports you need, to the narrowest source range that works. Use the public IP you connect from, or a narrow CIDR containing it, rather than 0.0.0.0/0.

Add a key pair​

An SSH key is injected at boot. It cannot be added to a running instance.

Go to Project -> Compute -> Key Pairs.

Key pairs list in Horizon

Click Create Key Pair to generate one, or Import Public Key to upload an existing key.

Import Public Key form in Horizon

  • Key Pair Name: the name shown when launching an instance.
  • Key Type: SSH Key.
  • Public Key: paste the key, or load it from a file.

To generate a key pair on your own machine first, see Create an SSH Key Pair.

Create the instance​

Go to Project -> Compute -> Instances and click Launch Instance. This opens a wizard whose steps are listed down the left side.

Launch Instance wizard in Horizon

  • Details — Instance Name, Availability Zone, Count.
  • Source — Select Boot Source: Image. Leave Create New Volume set to Yes to boot from a Cinder volume in Ceph. Pick the image with its up arrow.
  • Flavor — pick the flavor with its up arrow.
  • Networks — select Private.
  • Security Groups — select SSH.
  • Key Pair — select the key pair, or import one here.

The remaining steps are optional. Click Launch Instance.

Attaching an instance directly to External consumes a public IP and exposes it to the Internet. Use a private network and a floating IP instead.

The instance builds in a few minutes.

Instances list in Horizon

Attach a floating IP​

A floating IP makes the instance reachable from outside the cloud.

Go to Project -> Network -> Floating IPs.

Floating IPs list in Horizon

Click Allocate IP To Project.

Allocate Floating IP form in Horizon

Select External as the Pool, then click Allocate IP.

Find the new address and click Associate, then select the instance's port.

The instance is now reachable over SSH from any source permitted by the SSH security group rule.