You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EESSI specific settings can be found in `group_vars/all.yml`, and in `templates` we added our own templates
40
+
The EESSI specific settings can be found in `inventory/group_vars/all.yml`, and in `templates` we added our own templates
41
41
of Squid configurations for the Stratum 1 and local proxy servers.
42
-
For all playbooks you will also need to have an appropriate Ansible `hosts` file;
43
-
see the supplied `hosts.example` for the structure and host groups that you need for these playbooks.
42
+
For all playbooks you will also need to have an appropriate Ansible `hosts` file in the `inventory` folder;
43
+
see the supplied `inventory/hosts.example` for the structure and host groups that you need for these playbooks.
44
+
45
+
Ansible offers several ways to override any configuration parameters. Of course you can edit a playbook or the `all.yml` file,
46
+
but it is best to keep these files unmodified.
47
+
48
+
#### Machine-specific configuration
49
+
If the setting is for one specific machine (e.g. your Stratum 1 machine), it is recommended to make a file in the `inventory/host_vars` directory and use the machine name as name of the file.
50
+
This file can contain any settings that should be overridden for this particular machine. See `stratum0host.example` in that directory for an example.
51
+
Any other files that you will create in this directory will be ignored by git.
52
+
53
+
54
+
#### Site-specific configuration
55
+
Any other site-specific configuration items can go into a file `inventory/local_site_specific_vars.yml` (which will be ignored by git).
56
+
We provided an example file that shows the kind of configuration that you should minimally provide.
57
+
You can also add more items that you would like to override to this file. See the next section for instructions about passing
58
+
your configuration file to the playbook.
59
+
44
60
45
61
## Running the playbooks
46
62
47
63
In general, all the playbooks can be run like this:
48
64
```
49
-
ansible-playbook -i hosts -b <name of playbook>.yml
65
+
ansible-playbook -b -e @inventory/local_site_specific_vars.yml <name of playbook>.yml
50
66
```
51
-
where `-i` allows you to specify the path to your hosts file, and `-b` means "become", i.e. run with `sudo`.
67
+
Here the option `-e @/path/to/your/config.yml` is used to include your site-specific configuration file.
68
+
The `-b` option means "become", i.e. run with `sudo`.
52
69
If this requires a password, include `-K`, which will ask for the `sudo` password when running the playbook:
53
70
```
54
-
ansible-playbook -i hosts -b -K <name of playbook>.yml
71
+
ansible-playbook -b -K -e @inventory/local_site_specific_vars.yml <name of playbook>.yml
55
72
```
56
73
57
-
Before you run any of the commands below, make sure that you updated the file `group_vars/all.yml`
58
-
and include the new/extra URLs of any server you want to change/add (e.g. add your Stratum 1).
74
+
Before you run any of the commands below, make sure that you created a `inventory/hosts` file, a site-specific configuration file,
75
+
and, if necessary, created machine-specific configuration files in `inventory/host_vars`.
59
76
60
77
### Firewalls
61
78
To make all communication between the CVMFS services possible, some ports have to be opened on the Stratum 0 (default: port 80),
62
79
Stratum 1 (default: port 80 and 8000), and local proxy (default: port 3128).
63
-
These default port numbers are listed in `roles/cvmfs/defaults/main.yml`, but can be overridden elsewhere.
80
+
These default port numbers are listed in `roles/galaxyproject.cvmfs/defaults/main.yml`, but can be overridden in your local
This will automatically make replicas of all the repositories defined in `group_vars/all.yml`.
109
119
110
120
### Local proxies
111
121
The local proxies also need a Squid configuration file; the default can be found in
112
122
`templates/localproxy_squid.conf.j2`.
123
+
If you want to customize the Squid configuration more, you can also make your own file, and point to in `inventory/local_site_specific_vars.yml`.
124
+
See the comments in the example file for more details.
113
125
114
-
You have to define the lists of IP addresses / ranges (using CIDR notation) that are allowed to use the proxy using the variable `cvmfs_localproxy_allowed_clients`.
115
-
You can put this, for instance, in your hosts file. See `hosts.example` for more details.
116
-
117
-
If you want to customize the Squid configuration more, you can also make your own file, and point to it using `cvmfs_squid_conf_src` (see the Stratum 1 section).
126
+
Furthermore, you have to define the lists of IP addresses / ranges (using CIDR notation) that are allowed to use the proxy using the variable `local_cvmfs_http_proxies_allowed_clients`.
127
+
Again, see `inventory/local_site_specific_vars.yml.example` for more details.
118
128
119
129
Do keep in mind that you should never accept proxy request from everywhere to everywhere!
120
130
Besides having a Squid configuration with the right ACLs, it is recommended to also have a firewall that limits access to your proxy.
0 commit comments