21 - Operational Test


2 min read

This post is part of the Manual Deployment Openstack HA and Ceph series.

Create External Network

# Create external network with type flat
openstack network create --share --external \
  --provider-physical-network physpro1 \
  --provider-network-type flat provider1-net

openstack network create --share --external \
  --provider-physical-network physpro2 \
  --provider-network-type flat provider2-net

openstack subnet create --network provider1-net \
  --gateway --no-dhcp \
  --subnet-range provider1-subnet

openstack subnet create --network provider2-net \
  --gateway --no-dhcp \
  --subnet-range provider2-subnet

Create Internal Network

openstack network create test-internal-net

openstack subnet create --network test-internal-net \
  --allocation-pool start=,end= \
  --dns-nameserver --gateway \
  --subnet-range test-internal-subnet

Create Router

openstack router create router-test

openstack router set --external-gateway provider1-net router-test

openstack router add subnet router-test test-internal-subnet

openstack router show router-test

Create Image

wget <https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img>

openstack image create --disk-format qcow2 --container-format bare \
  --public --file ./bionic-server-cloudimg-amd64.img ubuntu-bionic

Create Flavor

openstack flavor create --ram 2048 --disk 10 --vcpus 2 --public ram2-cpu2

Create Keypair

openstack keypair create --public-key ~/.ssh/id_rsa.pub controller-key

Create Security Group

openstack security group create allow-all-traffic --description 'Allow All Ingress Traffic'
openstack security group rule create --protocol icmp allow-all-traffic
openstack security group rule create --protocol tcp  allow-all-traffic
openstack security group rule create --protocol udp  allow-all-traffic

Create Instance

openstack server create --flavor ram2-cpu2 \
  --image ubuntu-bionic \
  --key-name controller-key \
  --security-group allow-all-traffic \
  --network test-internal-net \

Create Floating IP

openstack floating ip create provider1-net --floating-ip-address
openstack server add floating ip ubuntu-test

List Server

openstack server list

Test SSH to Instance

ssh -l ubuntu