BACKGROUND IMAGE: iSTOCK/GETTY IMAGES
Anyone who has built more than a sandbox version of OpenStack knows that the administrative work is tough. Anything from scripting to deploying specific apps can be a challenge.
Fortunately, automation and templates minimize these challenges, while reducing repetitive tasks and errors. These benefits are the aim of Red Hat's Ansible tool.
Ansible provides a management and automation framework for OpenStack installation and operation. The tool uses playbooks to script workflows and manage configurations. Admins can use these Ansible playbooks to set up the boot process for a bare-iron install of OpenStack, which traditionally is a time-consuming and complicated process. Ansible playbooks are valuable, however, at any stage of an OpenStack deployment -- from early sandbox to scaled-out production.
Bare-metal OpenStack installation, provisioning options
With Ansible -- which is coupled with OpenStack's Ironic module -- the PXE-booting process to load back-end server images can be parallelized, with files being pulled from back-ends that are already loaded, rather than from a single front-end unit. This saves a tremendous amount of time, especially for a larger OpenStack installation.
Another option for more advanced users, which was outlined at the 2017 OpenStack Summit in Boston, is to mash up Excel worksheets that contain configuration details specific to the install with a VB app to translate the worksheets to the required .yml files. This creates an Ansible configuration file, which the playbooks then use. Other tools admins can use to prepare OpenStack installation include Jinja templating and Packer and Vagrant to deploy automation server images.
Another approach is to couple Ansible and Stacki from StackIO. There's also the OpenStack-Ansible installer, which installs databases, load balancers and other tools.
Ansible automation and other useful features
Ansible aims to automate the whole cloud stack, from software down to the bare-iron install. Once OpenStack is booted, admins can use Ansible to set up both VMs and containers.
Ansible allows an admin to define virtual resources, such as VMs, and specify size, memory and storage resources, as well as networking. Currently, Red Hat's OpenStack Platform uses Heat and Puppet for these tasks, but is migrating to Ansible. There is also an Ansible API to VMware's vSphere that allows for the creation and management of guest VMs, and supports APIs to the larger public cloud platforms.
In addition to the basic Ansible programs, there are other useful features. Galaxy, for instance, is the repository for Ansible playbooks. It acts almost like a cookbook, which admins can use to more quickly deploy the most popular apps.
Ansible Dynamic Inventory identifies which images are installed -- a feature that's useful for organizations that run auto-scaling. There is an API to web infrastructure such as JBoss, which permits Ansible to control how apps deploy in the app server.
Alternatives to Ansible
Ansible is somewhat competitive to Heat, the OpenStack module for orchestration. Since admins would need to learn new syntax to transition away from Heat, Ansible uses Shade, the official OpenStack library, to interface to all the key OpenStack modules -- including Keystone, Neutron, the storage modules and the Glance image library. Ansible does have a downside in that any resources created have to be deleted in reverse order, as they are no longer needed.
Other alternatives to Ansible include the manual OpenStack command-line interface, but that's only recommended for small sandbox installations -- Kolla for a bare-metal OpenStack installation using containers; Ironic, also for bare-metal; and Heat for VM orchestration. Ansible faces competition from Kubernetes, as well, in terms of container orchestration.
With the growing interest in containers, Ansible does, however, now link up with Kolla and Magnum to provide management control. Ansible, with Kolla, allows OpenStack modules to be installed in containers with repeatability.
Answer these five questions before you choose OpenStack
Personalize the OpenStack Horizon Dashboard
Overcome common OpenStack scalability challenges