/CM

Primary LanguageJavaScript

Configuration Management Workshop

In this workshop, we'll cover the basics of setting up a simple configuration server, enabling ssh access, and using ansible to configure a simple web server.

Part 1. Configuration Management Workshop ⬅️
Part 2. Building a Configuration Server
Part 3. Ansible Playbooks

Workshop setup

We will be using two VMs, one will be called the 🎛️ config-server, and the other called the 🌍 web-srv.

  1. Make sure you already have a focal image, pulled locally.
bakerx pull focal cloud-images.ubuntu.com

Config-server VM

  1. Create the Virtual Machine for the 🎛️ config-server.
bakerx run config-server focal --ip 192.168.56.10 --sync

📝 There are two interesting things to note about this VM.

    1. You should see a second NIC created with a host-only network and assigned a static ip address.
    1. Because the --sync option was provided, the VM will also mount your current directory on your host computer, which is accessible via /bakerx (like a volume in docker).

Web-server VM

  1. Create the Virtual Machine for the 🌍 web-srv.
bakerx run web-srv focal --ip 192.168.56.100

Verifying setup is correct

  1. Using the terminal, run a couple of checks to make sure everything is okay.

First, from our host computer, let's make sure we can run ping 192.168.56.10 and ping 192.168.56.100. If this works, this should mean both our VM's correctly have host-only networking setup, and they both have an ip address you can use to connect to them. You can manually check the ip address inside the VMs by running ip -c a.

Second, run bakerx ssh config-server to access your 🎛️ config-server. Then make sure your VM has properly mounted your host's computer's directory.

You should see something like:

vagrant@ubuntu-focal:~$ ls /bakerx
CM.md  Playbooks.md  README.md  examples  img  opunit_inventory.yml  test  yaml

Moving on

If everything looks good, then time to move on to the next step:

Part 2. Building a Configuration Server