Skip to content

Getting started

Greg Harvey edited this page Dec 16, 2024 · 7 revisions

Choose a controller

Firstly, decide where you want your Ansible "control node" to be - this could be anywhere, even your desktop machine or a container! This "control node" will be the machine that will carry out all of your Ansible orchestration against other "managed nodes" or "targets". So think carefully before deciding where your "control node" will be - it will need access to all the servers you expect it to manage, and access to the Internet if it needs to make calls to cloud provider APIs.

Install Debian

As previously noted, Debian Linux is not essential for the controller server, however it is recommended as any other operating system will be untested for the foreseeable. Therefore, having selected a controller server, we recommend you install Debian - if you want to get going fast, you will install Debian 12 on your "control node" (controller).

Debian on physical or local virtual machines

The Debian documentation is somewhat convoluted, so our recommended quick setup instructions for Debian are as follows:

  • Download the Fedora Media Writer for your platform:
  • Download the Debian 12 ISO file (click the ISO link in the first line of the page)
  • Open Fedora Media Writer and select "Select .iso file", then click Next
  • Click the Select button and pick your downloaded Debian ISO file
  • IMPORTANT, this process will completely wipe your USB key! - plug in a USB key that you don't mind being wiped!
  • Click Write

After a few minutes the Fedora Media Writer will tell you it has completed creating your bootable USB key. You can select this USB key as the boot device on any physical or virtual machine you decide to use as your controller, and you will find the Debian 12 installer pops up and leads you through the process.

Debian on a Docker container

If you want to use a container as your controller, pull the latest Debian 12 image from Docker Hub. This command should always get you the latest Debian 12 image:

docker pull debian:12

Debian in a cloud account

Most major cloud providers will have a Debian 12 base image for their servers, simply select the official Debian 12 image as the starting image for your cloud server and it should contain everything you need to continue.

Installing ce-provision

Once you have your Debian 12 machine up and running, open a Terminal by pressing the "Super" (aka Windows) key, typing Terminal and pressing enter. Then run these commands to download and execute our one-time install script for ce-provision, with or without GitLab Community Edition for managing your infrastructure code:

curl -LO https://raw.githubusercontent.com/codeenigma/ce-provision/2.x/install.sh
chmod +x ./install.sh
sudo ./install.sh -h # for usage information
# Default installation (ce-provision only)
sudo ./install.sh
# Installation with GitLab CE using a self-signed SSL certificate
sudo ./install.sh --gitlab gitlab.example.com
# Installation with GitLab CE using a LetsEncrypt SSL certificate (requires DNS to be set up in advance)
sudo ./install.sh --letsencrypt --gitlab gitlab.example.com

Configuring ce-provision

You can configure ce-provision by providing a Git repository with Ansible settings, customised playbooks, default variables, extra plugins and so forth. By default ce-provision will take its initial config from our example repo which is also a good one to copy to get started. Your options are pretty limitless, so we will focus on two main areas:

  • How to build your first remote server using ce-provision
  • How to configure ce-provision to manage your AWS account(s)

Building your first server

TODO