Skip to content

Commit 9ead9d4

Browse files
committed
Merge branch 'inventory_folder' of github.com:pescobar/filesystem-layer into inventory_folder
2 parents ceb0f4f + 9cb5f1c commit 9ead9d4

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

README.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Here the option `-e @/path/to/your/config.yml` is used to include your site-spec
6868
The `-b` option means "become", i.e. run with `sudo`.
6969
If this requires a password, include `-K`, which will ask for the `sudo` password when running the playbook:
7070
```
71-
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
7272
```
7373

7474
Before you run any of the commands below, make sure that you created a `inventory/hosts` file, a site-specific configuration file,
@@ -77,20 +77,21 @@ and, if necessary, created machine-specific configuration files in `inventory/ho
7777
### Firewalls
7878
To make all communication between the CVMFS services possible, some ports have to be opened on the Stratum 0 (default: port 80),
7979
Stratum 1 (default: port 80 and 8000), and local proxy (default: port 3128).
80-
These default port numbers are listed in `roles/galaxyproject.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
81+
configuration file (`local_site_specific_vars.yml`).
8182

8283
The Ansible playbook can update your firewall rules automatically (`firewalld` on Redhat systems, `ufw` on Debian systems),
8384
but by default it will not do this. If you want to enable this functionality, set `cvmfs_manage_firewall` to `true`.
8485

8586
### Stratum 0
8687
First install the Stratum 0 server:
8788
```
88-
ansible-playbook -i hosts -b -K stratum0.yml
89+
ansible-playbook -b -K -e @inventory/local_site_specific_vars.yml stratum0.yml
8990
```
9091

9192
Then install the files for the configuration repository:
9293
```
93-
ansible-playbook -i hosts -b -K stratum0-deploy-cvmfs-config.yml
94+
ansible-playbook -b -K -e @inventory/local_site_specific_vars.yml stratum0-deploy-cvmfs-config.yml
9495
```
9596

9697
Note that there can be only one Stratum 0, so you should only run this playbook
@@ -102,50 +103,47 @@ the (geographically) closest Stratum 1 server for your client and proxies.
102103
More information on how to (freely) obtain this key is available in the CVMFS documentation:
103104
https://cvmfs.readthedocs.io/en/stable/cpt-replica.html#geo-api-setup .
104105

105-
You can put your license key in a file in `inventory/host_vars`; see `stratum1host.example` for an example.
106+
You can put your license key in the local configuration file `inventory/local_site_specific_vars.yml`.
106107

107108
Furthermore, the Stratum 1 runs a Squid server. The template configuration file can be found at
108109
`templates/eessi_stratum1_squid.conf.j2`.
109110
If you want to customize it, for instance for limiting the access to the Stratum 1,
110-
you can make your own version of this template file and point to it by overriding this setting in the `host_vars` file for your Stratum 1:
111-
```yaml
112-
cvmfs_squid_conf_src=/path/to/your_stratum1_squid.conf.j2
113-
```
111+
you can make your own version of this template file and point to it by overriding the following setting in `inventory/local_site_specific_vars.yml`.
112+
See the comments in the example file for more details.
113+
114114
Install the Stratum 1 using:
115115
```
116-
ansible-playbook -i hosts -b -K stratum1.yml
116+
ansible-playbook -b -K -e @inventory/local_site_specific_vars.yml stratum1.yml
117117
```
118118
This will automatically make replicas of all the repositories defined in `group_vars/all.yml`.
119119

120120
### Local proxies
121121
The local proxies also need a Squid configuration file; the default can be found in
122122
`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.
123125

124-
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`.
125-
You can put this, for instance, in your hosts file. See `hosts.example` for more details.
126-
127-
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.
128128

129129
Do keep in mind that you should never accept proxy request from everywhere to everywhere!
130130
Besides having a Squid configuration with the right ACLs, it is recommended to also have a firewall that limits access to your proxy.
131131

132132
Deploy your proxies using:
133133
```
134-
ansible-playbook -i hosts -b -K localproxy.yml
134+
ansible-playbook -b -K -e @inventory/local_site_specific_vars.yml localproxy.yml
135135
```
136136

137137
### Clients
138138
Make sure that your hosts file contains the list of hosts where the CVMFS client should be installed.
139-
Furthermore, you can add a vars section for the clients that contains the list of (local) proxy servers
140-
that your clients should use:
141-
```yaml
142-
[cvmfsclients:vars]
143-
cvmfs_http_proxies=["your-local.proxy:3128"]
144-
```
139+
Furthermore, you can define a list of (local) proxy servers
140+
that your clients should use in `inventory/local_site_specific_vars.yml` using the parameter `local_cvmfs_http_proxies`.
141+
See `inventory/local_site_specific_vars.yml.example` for more details.
145142
If you just want to roll out one client without a proxy, you can leave this out.
143+
146144
Finally, run the playbook:
147145
```
148-
ansible-playbook -i hosts -b -K client.yml
146+
ansible-playbook -b -K -e @inventory/local_site_specific_vars.yml client.yml
149147
```
150148

151149
## Verification and usage

0 commit comments

Comments
 (0)