Ansible roles and playbooks to support the Freifunk Dortmund Infrastructure

Till Klocke afba644b09 Made configuration of multiple nodes a little bit easier with introduction of local_node variable há 9 anos atrás
galaxy-roles 2b49769673 Added third party role to install and configure unbound há 9 anos atrás
group_vars fff2a57224 Fixed small typos in group vars há 9 anos atrás
host_vars afba644b09 Made configuration of multiple nodes a little bit easier with introduction of local_node variable há 9 anos atrás
roles 5960f47c2a Updated meta information for role ff-unbound há 9 anos atrás
test dde00061e7 Added group vars for testing há 9 anos atrás
.gitignore 8ddc629e3c Better hide all custom kitchen configs há 9 anos atrás
.kitchen.yml 16d8b675f0 We decide now in the kitchen config if ansible uses sudo or not há 9 anos atrás
Gemfile 16405ad501 Added Gemfile so test-kitchen all necessary gems can easily be installed via bundler há 9 anos atrás
Gemfile.lock 16405ad501 Added Gemfile so test-kitchen all necessary gems can easily be installed via bundler há 9 anos atrás
README.md b2120d2069 It could now be possible to create two supernodes há 9 anos atrás
Vagrantfile 6cf332b6c8 Now provisioning all machines há 9 anos atrás
ansible.cfg 3cc0f37f0c Added ansible.cfg which can be found by vagrant so galaxy roles should be found by ansible when doing vagrant up/provision há 9 anos atrás
playbook.yml 5419c8a490 Added example to provision two supernodes há 9 anos atrás
requirements.yml 2b49769673 Added third party role to install and configure unbound há 9 anos atrás
update-third-party-roles.sh 76e5ef8c47 Added very small script to make updating third party roles more abvious há 9 anos atrás

README.md

Ansible roles for Freifunk Dortmund

This repo contains roles which should ease the creation of supernodes and other services for Freifunk Dortmund (and eventually for other Communities)

Since some software components like fastd and B.A.T.M.A.N. are not always easily available via a packet manager on all platforms, the basic idea in this repo is to create roles for this software and eventually fall back to building from source.

Getting started

This project is based on ansible, vagrant, VirtualBox and test kitchen. Although it is possible to get all this working on windows, it is easier to do on Linux or Mac OS

Prerequesites

  • Install ansible for your operating system
  • Install VirtualBox for your operating system (Version 5 seems to work)
  • Also install the extension pack for USB support etc. in VirtualBox. Some machines depend on this.
  • Install vagrant for your operating system
  • Install test kitchen for your operating system
  • Install ansible for test kitchen: sudo gem install kitchen-ansiblepush kitchen-ansible
  • Install vagrant driver for test kitchen: sudo gem install kitchen-vagrant

Alternative to the last three steps you can also just use bundler to bundle install all necessary ruby gems.

First steps

After you installed all necessary tools and gems you change in the checked out directory of this project and simply type kitchen test. This will create multiple virtual machines execute the ansible roles and test everything via serverspec. After all tests are successfull the machines are destroyed again.

Simple development workflow

Since creating the machines can take some time (several minutes) is doesn't make sense to destroy them after each run. You can call kitchen setup to create all defined machines and keep them running. Then you can start editing roles or creating roles and if you want to check your changes you can execute kitchen converge && kitchen verify to execute the roles on all machines and run the serverspec tests on all machines. All commands can be combined with the machine name (available via kitchen list) if you want to manipulate only one machine. If you need to analyse problems on one machine you can login with kitchen login [machine name]

The Vagrantfile

The Vagrantfile and the host and group vars in this repo should be used to quickly create a "test community" in the future. Ideally if you type vagrant up you should get a working test community, but currently without uplinks.

TODO

  • batman role needs to enable build from source
  • we need a way to get batman compatibility mode as a fact and be able to configure it
  • Add support for more platforms (don't force a linux distro to others)
  • Everything else I forgot
  • Add CI via travis: