README.rst 2.22 KB
Newer Older
Rouven Czerwinski's avatar
Rouven Czerwinski committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
===================================
 Ansible for Freifunk Braunschweig
===================================

These are the ansible files for the Freifunk Braunschweig infrastructure. We are
using Vagrant and custom debian jessie images for local testing, a eployed
infrastructure is not online yet. The provider for vagrant is `libvirt`.

Requirements
============

- Ansible >= 2.4
- Vagrant >= 2.0

Installation
============
17
18
19
20

**NOTE**: To read the vault.gpg file for ansible vault, your gpg key has to be
added there. Contact Emantor, Kasalehlia or Shoragan for this.

Rouven Czerwinski's avatar
Rouven Czerwinski committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Install the vagrant libvirt plugin:

::

   vagrant plugin install vagrant-libvirt

Example `Vagrantfile` from `~/.vagrant.d/Vagrantfile`:

::

   Vagrant.configure("2") do |config|
     config.vm.synced_folder "./", "/vagrant", type: "rsync"
   
     config.vm.provider :libvirt do |libvirt|
       libvirt.driver = "kvm"
       libvirt.storage_pool_name = "Images"
       libvirt.connect_via_ssh = false
       libvirt.username = "root"
       libvirt.cpu_mode = "host-passthrough"
     end
   end

adjust `libvirt.storage_pool_name` to your pool name.

Next, download the git repository and change into it:

::

   git clone https://gitli.stratum0.org/ffbs/ffbs-ansible.git
   cd ffbs-ansible

Now you can start the machines, vagrant will download the images as necessary
and provision the machines after creating them:

::

   vagrant up

59
60
Fedora specials
---------------
oni's avatar
oni committed
61
First get vagrant > 2.0, as it is not in the repo use the CentOS `rpm <https://www.vagrantup.com/downloads.html>`_.
62
63
64
Then install it with:

::
oni's avatar
oni committed
65

66
67
68
69
70
   sudo dnf install <path/to/your/vagrant.rpm>

After that you need to install a plugin with a specified version of vagrant-spec. With vagrant-spec installed you can install vagrant-libvirt. Use the following to do both:

::
oni's avatar
oni committed
71

72
73
74
75
76
77
   vagrant plugin install vagrant-cucumber
   vagrant plugin install vagrant-libvirt

And now, let's hope it works.


78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Development
===========

**NOTE**: Pushing to the repository requires membership in the ffbs group and
permissions for the repository, ask Emantor, Shoragan or Kasalehlia for those.

Commit your changes, make sure that all changes pass

::

   vagrant provision

and commit them to your repository. Then push via

::

   git push origin master