Testing Openstack with Ansible and all-in-one install on Hyper-V
I installed Openstack recently in order to get my head around some aspects. I used my desktop (16GB RAM, decent chunk of SSD & i7-2600 @ 3.4GHz).
After looking at the 50 ways to install Openstack, I went with the developer ansible automation. Installation proceeded as follows.
Install Deployment Host
This contains the ansible configuration and drives the process.
- Install Ubuntu as per requirements
- Installed 14.04 (yes, it’s old. They may fix that soon.)
apt-get install aptitude build-essential git ntp ntpdate \ openssh-server python-dev sudo
git clone -b stable/mitaka \ https://github.com/openstack/openstack-ansible.git \ /opt/openstack-ansible scripts/bootstrap-ansible.sh
|Container Management Network||172.29.236.0/22||10|
|Tunnel (VXLAN) Network||172.29.240.0/22||20|
My numbering was
|Host||Host mgmt||Container mgmt||Tunnel||Storage|
Making Hyper-V connect up VLAN trunks that are run as bonded Ethernets
Hyper-v manager can’t set trunk mode on adapters so doing this with powershell run as administrator
Get-VM Deployment | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList 1-100 -NativeVlanId 0 Get-VM Node1 | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList 1-100 -NativeVlanId 0
Note – the NativeVlanId 0 is required to bridge this into the untagged management domain for the external network.
Also need to configure (Network Adapter | Advanced Features | MAC Address) to enable mac address spoofing (which the active/backup bonding will do)
Install Target Host
As per the docs and above. Could be improved by using MAAS but I won’t go there yet.
Did this by hand, but probably able to be skipped now that the ansible stuff generates this?
Deployment configuration questions – while configuring the yml and friends
- Unsure that the network for neutron_linuxbridge_agent br-vlan has host_bind_override: “eth12” that is accurate. This is meant to be a physical interface as per http://docs.openstack.org/developer/openstack-ansible/mitaka/install-guide/configure-networking.html
- Had to uncomment at least one thing in the user_variable.yml
- Used the AIO templates for this all-in-one install.
Aged APT repo & keys… and figuring out that
Initially AOI failed in deployment due to untrusted packages; like a fool I tried hand-deploying the broken ones
apt-get install libasan0 libatomic1 libgomp1 libitm1 libc-dev-bin \ linux-libc-dev libc6-dev libexpat1-dev libpython2.7-dev \ libquadmath0 libtsan0 python3-libapparmor python3-pkg-resources \ python3-apparmor apparmor-utils binutils cpp-4.8 libgcc-4.8-dev \ gcc-4.8 libstdc++-4.8-dev g++-4.8 libdpkg-perl dpkg-dev \ python2.7-dev python-software-properties
Running openstack-ansible setup-hosts.yml didn’t get me much further – failed again with security hardening – postfix install – so added added a no-authenticate in the yml files; not the right place though.
Stopped, thought, learnt and instead tried
apt-key update apt-get update
Which (after agreeing to a key update from recollection) resolved the issues
Continuing on to manually run playbooks
openstack-ansible setup-hosts.yml openstack-ansible setup-infrastructure.yml
Note the formating of the output of Ansible running the playbooks – should be no errors.
ansible galera_container -m shell -a \ "mysql -h localhost -e 'show status like \"%wsrep_cluster_%\";'"
Then finally installing openstack
Wait something like an hour
Login at https://10.2.0.50/ with admin / 5f915721a645bf38735ff099
Everything appeared to be running – but for Cinder volume block storage is down, probably because I my just have skipped some necessary LVM prep steps.