Let’s take a closer look at Minimal OpenStack deployment with Ansible. At Bobcares, with our Server Management Services, we can handle your OpenStack issues.
Minimal OpenStack Deployment With Ansible
Host Config
We can use the below code to create a basic host setup for a typical deployment.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br-mgmt
iface br-mgmt inet static
### flat veth
pre-up ip link add flat-veth1 type veth peer name flat-veth2 || true # Create veth pair
pre-up ip link set flat-veth1 up # Set the veth UP
pre-up ip link set flat-veth2 up # Set the veth UP
post-down ip link del flat-veth1 || true # Delete veth pair on DOWN
### flat veth
bridge_stp off
bridge_waitport 10
bridge_fd 0
bridge_ports eth0 flat-veth1
offload-sg off
address 172.16.24.53/22
gateway 172.16.24.2
Here, we’ve got eth0
plugged into br-mgmt
with a veth-pair
hanging off of it so that we can use flat networking.
OpenStack Ansible Config
We need to change the /etc/openstack_deploy/openstack_user_config.yml
file so that only ONE bridge is present for all of the host machines and containers. This is to make the process easier. The data that follows assumes that the installation is minimal. Edit the file /etc/openstack_deploy/openstack_user_config.yml
with a text editor to customize the sections to the needs.
Let’s see each section of the user config file that is changed to make the process easier.
Networking: We have to minimize the cidr_networks
. The only ONE bridge here is the container bridge. The user config file will only contain one network CIDR as a result. Both VLAN and FLAT network-type examples are as follows:
VLAN
---
cidr_networks:
container: "172.16.26.0/24"
used_ips:
- "172.16.26.1,172.16.26.2"
global_overrides:
internal_lb_vip_address: "172.16.26.1"
external_lb_vip_address: "172.16.26.2"
tunnel_bridge: "br-mgmt"
management_bridge: "br-mgmt"
provider_networks:
- network:
container_bridge: "br-mgmt"
container_type: "veth"
container_interface: "eth1"
ip_from_q: "container"
type: "vlan"
net_name: "vlan"
range: "10:10"
group_binds:
- all_containers
- hosts
is_container_address: true
is_ssh_address: true
FLAT
---
cidr_networks:
container: "172.16.26.0/24"
used_ips:
- "172.16.26.1,172.16.26.2"
global_overrides:
internal_lb_vip_address: "172.16.26.1"
external_lb_vip_address: "172.16.26.2"
tunnel_bridge: "br-mgmt"
management_bridge: "br-mgmt"
provider_networks:
- network:
container_bridge: "br-mgmt"
container_type: "veth"
container_interface: "eth1"
ip_from_q: "container"
host_bind_override: "flat-veth2"
type: "flat"
net_name: "flat"
group_binds:
- all_containers
- hosts
is_container_address: true
is_ssh_address: true
Swift setup: Two changes are necessary for replication_network and storage_network options when deploying Swift. Since the simplified deployment will only have one bridge, we must update these settings to use the proper network interface. Normally, these are set to a storage and replication network to separate the traffic. The basic swift config from the OSA example config is in the following example:
global_overrides:
swift:
part_power: 8
storage_network: 'br-mgmt'
replication_network: 'br-mgmt'
drives:
- name: disk1
- name: disk2
- name: disk3
mount_point: /srv
storage_policies:
- policy:
name: default
index: 0
default: True
Running The Setup
Run it as normal after everything is set up in the user config files. Everything inside these files is fully supported and won’t prevent future updates.
Only the two network interfaces within the containers – one network connected to lxcbr0
and br-mgmt
, will be seen as the process starts building and running containers.
# lxc-ls -f NAME STATE AUTOSTART GROUPS IPV4 compute1_aodh_container-f08d2204 RUNNING 1 onboot, openstack 10.0.3.118, 172.16.26.75
# brctl show bridge name bridge id STP enabled interfaces br-mgmt 8000.0cc47aab5e70 no 219f00f7_eth1 2a4faa2c_eth1 2c0c6061_eth1 4148c753_eth1
[Looking for a solution to another query? We’re here to assist.]
Conclusion
This article provides some basic setups when running a Minimal OpenStack deployment with Ansible.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments