Skip to content

Technical

Greg Harvey edited this page Dec 2, 2024 · 1 revision

To all intents and purposes ce-provision is just a set of Ansible roles and some ready to use playbooks. If you're not familiar with Ansible and what roles and playbooks are, start by reading the Ansible introductory documentation. For specific explanations of what Ansible roles and playbooks are, these pages from Ansible owner, Red Hat, might be useful:

There is a lot more background reading on the components of Ansible in the Ansible documentation and we can provide Ansible training if required.

With the CE tools we have devised a way to manage the configuration of an Ansible "control node", the modules, plugins and roles available to it, the variables for those roles and the centralisation of playbooks, so you can centrally manage a complex infrastructure from a single code repository.

ce-provision consists of three main pieces:

  1. an Ansible installation
  2. the ce-provision project itself
  3. a "config" repository that contains all the custom configurations and variables for your infrastructure

When you execute an Ansible playbook in the context of ce-provision, it loads in your Ansible configuration, all the roles, modules and plugins for Ansible contained within the ce-provision project and the contents of your ce-provision "config" repository (your customisations). Once it has loaded all that information, it can connect to the target host(s) of the playbook you wish to run and execute commands against that host using your specific settings.

For example, you might want to add a Linux user to all your servers. This would normally require you to write your own Ansible playbook that would go through all the steps needed to add and configure a Linux user, but with ce-provision we have a provided role for that. So all you need to do is provide some custom variables defining your Linux user and create a simple playbook that targets all servers and loads in (imports) the ce-provision role with the variables defining the user you want to create. Run it and job done!

ce-provision ships with an example ce-provision-config repository to use as a base for your customisations. It also ships with a bash script called provision.sh and, although it's completely possible to call your ce-provision playbooks directly with Ansible, this script is the best way to execute an action with ce-provision. It makes building a complex Ansible CLI command simpler by providing easy to follow and well documented CLI parameters you can just pass to the script.

Each role in ce-provision is documented inline, for example, the Apache role has all the variables available and notes for usage in its own README. These instructions are also compiled together and published separately using GitHub Pages. The fully compiled ce-provision roles documentation is here:

Product support

As stated on the front page, ce-provision itself can run on any machine that can run Ansible and bash. However, we currently only support Debian Linux "targets", or managed nodes. It may well work with Debian derivatives such as Ubuntu, but this is untested.

We intend to build out more and more integrations with cloud providers, but for now AWS is the only supported cloud provider. (Patches welcome!)