- Extending OpenStack
- Omar Khedher
- 397字
- 2021-06-24 18:51:47
Setting up the Ansible environment
In this section, we will need to ensure that we have the proper hardware requirements to set up a complete development environment for testing the OpenStack infrastructure code, as the follows:
- Cloud controller:
-
- Memory: At least 3 GB RAM
- Processor: At least 2 CPUs 64-bit x86
- Disk space: At least 30 GB free disk space
- Network: At least 2 NICs
- Compute node:
- Memory: At least 4 GB RAM
- Processor: At least 4 CPUs 64-bit x86
- Disk space: At least 40 GB free disk space
- Network: At least 2 NICs
- Ansible deployment host:
- Memory: At least 1 GB RAM
- Processor: At least 1 CPUs 64-bit x86
- Disk space: At least 10 GB free disk space
- Network: At least 1 NIC
OSA also requires the following software versions for all machines:
- Ubuntu LTS 14.04 LTS or later
- Linux kernel version 3.10.0.34—generic or later
- Python support 2.7 or later
- Network Time Protocol client installed
- Secure Shell server and client for Ansible to run
Another key testing tool for a successful automated test is the usage of virtualization technology. Instead of running the OSA installation in a bare metal machine, we can install any hypervisor on top of it and be able to harness more tests in an isolated environment. For this purpose, we will use VirtualBox to create the required virtual machines and couple it with Vagrant to build a reproducible development environment.
Setting up all the required networks in our test environment might be confusing. To mimic a real production setup, many virtual network interfaces should exist per virtual machine.
For the sake of simplicity, we will use two network interfaces per cloud controller and compute node as physical interfaces as follows:
- eth0: This is connected to LXC internal virtual network. It is dedicated to Ansible deployment and to SSH to the containers per each virtual machine. It also allows you to download packages from the internet.
- eth1: This enables internal communication between different OpenStack components, including compute, networking, and infrastructure services.
Make sure you enable internal communication for each virtual machine by setting each adapter device in VirtualBox to Allow All, as follows:
The next section will guide us through a complete setup of our test environment using Ansible.