Hetzner - DokuWiki

Private cloud extra host/en


Private Cloud adding additional Hosts

Server Installation

After you have set up a fresh installation of Ubuntu (16.04, minimal) on your server, this guide should help you to install and configure the required software:

apt update && apt install -y openvswitch-switch nova-compute neutron-openvswitch-agent

Setting up networking

You'll need to create a simple script (e.g. create_network.sh) and make it executable (chmod +x create_network.sh) with the following contents:

MY_IP=$(ifconfig eth0 | grep 'inet ' | cut -d: -f2 | awk '{ print $1}')
MY_NETMASK=$(ifconfig eth0 | grep 'Mask' | cut -d: -f4)
MY_GW=$(ip route list 0/0 | awk '/default/ {print$3}')
ovs-vsctl add-br br0
ovs-vsctl add-br br1
ovs-vsctl add-port br0 eth0
ifconfig eth0 up
ifconfig br0 $MY_IP netmask $MY_NETMASK up
route add default gw $MY_GW br0
ifconfig br1 mtu 1450
sed -i 's/eth0/br0/g' /etc/network/interfaces
printf '\n\nauto eth0\niface eth0 inet static\n  address' >>

Then, execute that script:

nohup ./create_network.sh &

This may cause problems with any running SSH connections, requiring you to reconnect to your server.

Configuration of networking-bridges

ovs-vsctl add-port br1 'vx{Controller-Main-IP}' -- set interface
'vx{Controller-Main-IP}' type=vxlan
options:remote_ip='{Controller-Main-IP}' options:in_key=7
options:out_key=7 options:df_default='true'
ifconfig br1 172.16.0.{Nächste-freie-Tunnel-IP} up

Extending static hosts entries in `/etc/hosts`

{Controller-Main-IP} controller.mycloud.de
{Controller-Intern-IP} controller.mycloud.de.internal


The Controller has self-signed SSL-Certificates located at `/deploy/cert.pem` and `/deploy/intcert.pem`. Copy these to your new Compute-Node to `/usr/local/share/ca-certificates/controller/cert.crt` and `intcert.pem`.

Then execute `update-ca-certificates`. This adds the self-signed certificate to the compute-node's trusted store and allows us to use encrypted communication between the servers.

Setting up Neutron-OpenVSwitch-Agent

Copy these files from your existing compute-node:

/etc/neutron/neutron.conf, /etc/neutron/plugins/ml2/ml2_conf.ini, /etc/neutron/plugins/ml2/openvswitch_agent.ini (update "local_ip"!)

If `/etc/nova/nova.conf` is being copied, do not forget to change the configured IP addresses, especially at the `VNC`-directive. (please check all files you are copying from existing nodes).

Register the Compute-Node with the controller

Finally, we need to allow the new Compute-Node to access our controller:

ovs-vsctl add-port br1 'vx{New-Compute-Main-IP}' -- set interface
'vx{New-Compute-Main-IP}' type=vxlan
options:remote_ip='{New-Compute-Main-IP}' options:in_key=7
options:out_key=7 options:df_default='true'

© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.