Skip to content

Commit 03e6913

Browse files
committed
Update general README and LICENSE file
This commit updates general README with requirements installation instructions and adds the LICENSE information which wasn't present before.
1 parent ea46f7e commit 03e6913

File tree

2 files changed

+110
-9
lines changed

2 files changed

+110
-9
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 MMUL
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+89-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,97 @@
11
# MMUL Ansible roles
22

3-
This collection of roles can be used to implement various cloud oriented
4-
solutions.
3+
This collection of roles can be used to implement various cloud native
4+
solutions:
55

6-
* [Graylog](roles/graylog-server): a clustered Graylog/MongoDB/Elasticsearch
7-
solution;
86
* [Kubernetes](roles/kubernetes): a Kubernetes cluster;
9-
* [MaxScale](roles/maxscale): a MariaDB MaxScale instance (suitable also for
10-
Azure MaxScale);
11-
* [Redis](roles/redis): a Redis cluster implementation;
127
* [Terraform](roles/terraform): based on the passed inventory, it generates
138
all the Terraform files needed to implement a cloud (today just Azure)
149
datacenter;
1510
* [Azure](roles/azure): automate tasks on Azure;
16-
17-
A specific README will be available for each role.
11+
* [Graylog](roles/graylog-server): a clustered Graylog/MongoDB/Elasticsearch
12+
solution;
13+
* [MaxScale](roles/maxscale): a MariaDB MaxScale instance (suitable also for
14+
Azure MaxScale);
15+
* [Redis](roles/redis): a Redis cluster implementation;
16+
17+
A specific README will be (soon, if not present) available for each role.
18+
19+
## Using the roles
20+
21+
For each of the role there is an Ansible plugin that will invoke everything that is needed to accomplish its scope.
22+
23+
### Preparing the environment
24+
25+
The best way to run everything is by using Python virtual environments and Ansible Collections.
26+
27+
First of all you need to clone this repository:
28+
29+
```
30+
user@lab ~ # git clone https://github.com/mmul-it/ansible
31+
Cloning into 'ansible'...
32+
remote: Enumerating objects: 2572, done.
33+
remote: Counting objects: 100% (449/449), done.
34+
remote: Compressing objects: 100% (199/199), done.
35+
remote: Total 2572 (delta 269), reused 363 (delta 222), pack-reused 2123
36+
Receiving objects: 100% (2572/2572), 9.10 MiB | 8.77 MiB/s, done.
37+
Resolving deltas: 100% (1345/1345), done.
38+
```
39+
40+
Then you will create your Python virtual environment:
41+
42+
```
43+
user@lab ~ # python3 -m virtualenv ansible-env
44+
Running virtualenv with interpreter /usr/bin/python2
45+
New python executable in /root/ansible-env/bin/python2
46+
Also creating executable in /root/ansible-env/bin/python
47+
Installing setuptools, pkg_resources, pip, wheel...done.
48+
49+
# source ansible-env/bin/activate
50+
(ansible-env) user@lab ~ #
51+
52+
(ansible-env) user@lab ~ # python3 -m pip install --upgrade pip
53+
```
54+
55+
And then you'll be ready to install the Python requirements:
56+
57+
```
58+
(ansible-env) user@lab ~ # pip3 install -r ansible/requirements.txt
59+
Requirement already satisfied: ansible in /usr/lib/python3.6/site-packages (from -r ansible/requirements.txt (line 1)) (2.10.7)
60+
Requirement already satisfied: ansible-vault in /usr/lib/python3.6/site-packages (from -r ansible/requirements.txt (line 2)) (1.2.0)
61+
Requirement already satisfied: azure-cli in /usr/lib/python3.6/site-packages (from -r ansible/requirements.txt (line 3)) (2.25.0)
62+
...
63+
...
64+
Installing collected packages: rsa, cachetools, google-auth, kubernetes
65+
Successfully installed cachetools-4.2.4 google-auth-2.13.0 kubernetes-24.2.0 rsa-4.9
66+
```
67+
68+
And finally the Ansible collections:
69+
70+
```
71+
(ansible-env) user@lab ~ # ansible-galaxy install -r ansible/collections/requirements.yml
72+
Starting galaxy collection install process
73+
Process install dependency map
74+
...
75+
...
76+
kubernetes.core (2.3.2) was installed successfully
77+
```
78+
79+
Now you should be ready to use `ansible-playbook` to execute the desired playbooks.
80+
81+
### Launching the playbooks
82+
83+
Supposing that you want to install a Kubernetes environment, you'll need to pass an inventory (we will rely on `lab`) like this:
84+
85+
```
86+
$ ansible-playbook \
87+
-i $HOME/ansible/inventory/lab \
88+
$HOME/ansible/kubernetes.yml
89+
```
90+
91+
## Authors
92+
93+
This project was created and is maintained by [Raoul Scarazzini](https://github.com/rascasoft) and has contributions from other users. Thanks to everyone who will contribute in the future, you're more than welcome!
94+
95+
## License
96+
97+
MIT License

0 commit comments

Comments
 (0)