Skip to content

Instantly share code, notes, and snippets.

@stephenfin
Last active November 3, 2021 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenfin/31a44d9cc40d9ce7abffadb5a6830cb1 to your computer and use it in GitHub Desktop.
Save stephenfin/31a44d9cc40d9ce7abffadb5a6830cb1 to your computer and use it in GitHub Desktop.
Sample DevStack 'local.conf's for two-node deployments

DevStack, Two Node

Overview

Nodes

2

Version

Xena

Prerequisites

  • Two hosts

Configuration

Two tweaks are necessary to use this.

  • Replace references to <controller_ip> with the IP address of your controller node.
  • Configure the various cpu_* nova flags if you're using different host hardware like I am.

Notes

A two-node variant of my sample local.conf.

Once deployed, if you wish to enabled live migration, you should follow the nova documentation for same. In summary:

  • Add host entries for each compute node to the /etc/hosts file on each node (assuming no local DNS instance). The hostname entries should exactly match the hostnames of the instance
  • On each compute node, generate an SSH keypair for both the user you will deploy DevStack with (either ubuntu or stack) and root
  • Collect the public keys for both users from each compute node and copy them all to a combined authorized_keys file, to be placed at /home/USER/.ssh/authorized_keys on each compute node, where USER is the user you deployed DevStack with

For more information, refer to the DevStack documentation.

[[local|localrc]]
#OFFLINE=True
RECLONE=True
## Passwords
ADMIN_PASSWORD=password
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
HORIZON_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=no-token-password
## Services
ENABLED_SERVICES=n-cpu,n-api-meta,c-vol,placement-client
# Needed for OVN
ENABLED_SERVICES+=,ovn-controller,ovn-northd,ovs-vswitchd,ovsdb-server
# Needed for neutron
ENABLED_SERVICES+=,q-ovn-metadata-agent
# Controller configuration
SERVICE_HOST=<controller_ip>
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
GLANCE_HOSTPORT=$SERVICE_HOST:9292
NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html"
DATABASE_TYPE=mysql
## Configure VNC, neutron
[[post-config|$NOVA_CONF]]
[vnc]
server_listen=0.0.0.0
[neutron]
region_name = RegionOne
auth_strategy = keystone
project_domain_name = Default
project_name = service
user_domain_name = Default
password = $SERVICE_PASSWORD
username = neutron
auth_url = http://<controller_ip>/identity
auth_type = password
service_metadata_proxy = True
## Configure live migration parameters
# [[post-config|$NOVA_CPU_CONF]]
# [libvirt]
# cpu_mode = custom
# cpu_model = IvyBridge-IBRS
# cpu_extra_flags = pcid
[[local|localrc]]
#OFFLINE=True
RECLONE=True
## Passwords
ADMIN_PASSWORD=password
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
HORIZON_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=no-token-password
## Configure VNC
[[post-config|$NOVA_CONF]]
[vnc]
server_listen=0.0.0.0
## Configure live migration parameters
# [[post-config|$NOVA_CPU_CONF]]
# [libvirt]
# cpu_mode = custom
# cpu_model = IvyBridge-IBRS
# cpu_extra_flags = pcid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment