Skip to content

Commit dd0e001

Browse files
authored
Merge pull request #1 from clelange/fixes
Fix MD linting errors
2 parents 3bb66fd + 3cb75f0 commit dd0e001

File tree

1 file changed

+38
-31
lines changed

1 file changed

+38
-31
lines changed

README.md

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The setup is based on the following documentation:
88
2. [CVMFS tutorial](https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/)
99

1010
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
11-
**Table of Contents**
11+
**Table of Contents:**
1212

1313
- [CVMFS Server Setup (using Ansible)](#cvmfs-server-setup-using-ansible)
1414
- [Initial Steps](#initial-steps)
@@ -17,51 +17,57 @@ The setup is based on the following documentation:
1717
- [Usage](#usage)
1818
- [Testing](#testing)
1919
- [Installation / Setup](#installation--setup)
20-
- [Usage](#usage-1)
20+
- [Test execution](#test-execution)
2121

2222
<!-- markdown-toc end -->
2323

24-
25-
2624
## Initial Steps
25+
2726
### Installation
2827

2928
Install this collection with
29+
3030
```bash
3131
ansible-galaxy collection install git+https://github.com/max-fatouros/cvmfs-ansible-setup.git
3232
```
3333

3434
### Setup
35-
1. Copy the [`hosts.yml`](hosts.yml) file.
36-
Replace the hosts under the stratum-0, stratum-1, proxy, client, and cvmfs groups with the ones you want to use.
35+
36+
1. Copy the [`hosts.yml`](hosts.yml) file.
37+
Replace the hosts under the stratum-0, stratum-1, proxy, client, and cvmfs groups with the ones you want to use.
3738
If you would like to not use stratum-1s and/or proxies, leave the values of their `host:` key blank, but do not remove the `stratum-1:` or `proxies:` keys entirely.
38-
The format of this file is described [here](https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html).
39+
The format of this file is described in
40+
[How to build your inventory](https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html).
3941
This file is also where the parameters for the setup are configured.
4042

4143
2. Create a copy of this [`ansible.cfg`](ansible.cfg) file.
4244

43-
4445
3. With both the `hosts.yml` and `ansible.cfg` files in your working directory.
4546
Test that things are working with the command
47+
4648
```bash
4749
ansible-playbook cvmfs.setup.ping
4850
```
4951

50-
4. Many of the ansible commands require `sudo` privileges on the remote machines.
51-
If you would like to disable the sudo password on the remote machines so that the playbooks in this collection can be ran without a password, first run the following command, enter the sudo password for the machine which will have its sudo password removed, then press enter.
52+
4. Many of the ansible commands require `sudo` privileges on the remote machines.
53+
If you would like to disable the sudo password on the remote machines so that the playbooks in this collection can be run without a password, first run the following command, enter the sudo password for the machine which will have its sudo password removed, then press enter.
54+
5255
```bash
5356
read -s PASS
5457
```
58+
5559
After this, run
60+
5661
```bash
5762
ansible-playbook -l <host> -e "ansible_sudo_pass=$PASS" cvmfs.setup.remove_sudo-pass
5863
```
59-
where `<hosts>` is the hostname (specified in `hosts.yaml`) of the machine whose sudo password we are removing.
60-
6164

65+
where `<hosts>` is the hostname (specified in `hosts.yaml`) of the machine whose sudo password we are removing.
6266

6367
## Usage
68+
6469
1. Run
70+
6571
```bash
6672
ansible-playbook cvmfs.setup.all
6773
```
@@ -75,19 +81,18 @@ Test that things are working with the command
7581
ansible-playbook cvmfs.setup.clients
7682
```
7783

78-
after running `cvmfs.setup.all`, any of the individual playbooks above case be re-ran if needed. However, they all rely on `cvmfs.setup.stratum_0` having been ran once in order for the stratum-0 public keys to be copied over properly.
84+
after running `cvmfs.setup.all`, any of the individual playbooks above case be re-run if needed. However, they all rely on `cvmfs.setup.stratum_0` having been run once in order for the stratum-0 public keys to be copied over properly.
7985

8086
2. To ensure that the environment was set up correctly, you could try propagating a test file through all the machines. i.e. from
8187

8288
``` bash
8389
stratum-0 -> stratum-1 -> proxy -> client
8490
```
85-
91+
8692
By following [these](https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/#216-adding-files-to-the-repository) instructions, we can do this with the following commands
87-
8893

8994
1. **On the Stratum-0**
90-
95+
9196
Set an environment variable to the name of your repository.
9297

9398
```bash
@@ -107,18 +112,20 @@ Test that things are working with the command
107112
2. **On a Stratum-1**
108113

109114
Synchronize the file with[^2]
115+
110116
```bash
111117
cvmfs_server snapshot repo.org.tld>
112118
```
119+
113120
again, replacing `<repo.org.tld>` with your cvmfs-repository name.
114121

115122
3. **On one of the Client machines**
116-
123+
117124
Test that you can access the file with the command
118125

119126
```bash
120127
/cvmfs/<repo.org.tld>/hello.sh
121-
```
128+
```
122129

123130
You can also run the following test commands on the client[^3] [^4].
124131

@@ -132,14 +139,10 @@ Test that things are working with the command
132139
```bash
133140
Connection: http://<STRATUM1_IP>/cvmfs/repo.organization.tld through proxy http://<PROXY_IP>:3128 (online)
134141
```
135-
136-
137-
138-
139142

140143
## Testing
141-
This repository uses the [Ansible Molecule](https://ansible.readthedocs.io/projects/molecule/) framework for testing.
142144

145+
This repository uses the [Ansible Molecule](https://ansible.readthedocs.io/projects/molecule/) framework for testing.
143146

144147
### Installation / Setup
145148

@@ -152,8 +155,8 @@ This repository uses the [Ansible Molecule](https://ansible.readthedocs.io/proje
152155
```
153156

154157
Otherwise, follow these instructions to install podman and molecule
155-
- podman: https://podman.io/docs/installation
156-
- molecule: https://ansible.readthedocs.io/projects/molecule/installation/
158+
- podman: <https://podman.io/docs/installation>
159+
- molecule: <https://ansible.readthedocs.io/projects/molecule/installation/>
157160

158161
2. Create a python environment that you can use from root.
159162

@@ -170,26 +173,30 @@ This repository uses the [Ansible Molecule](https://ansible.readthedocs.io/proje
170173
ansible-galaxy collection install . --force
171174
```
172175

176+
### Test execution
173177

174-
175-
### Usage
176178
1. Move into the [`extensions`](extensions/) directory
179+
177180
``` bash
178181
cd extensions/
179182
```
183+
180184
2. Then, still as root, run
185+
181186
``` bash
182187
molecule test
183188
```
189+
184190
to keep the test environment around after the tests are complete, you can instead run
191+
185192
```bash
186193
molecule destroy && molecule test --destroy=never
187194
```
188195

189-
[^1]: https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/#216-adding-files-to-the-repository
196+
[^1]: <https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/#216-adding-files-to-the-repository>
190197

191-
[^2]: https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/03_stratum1_proxies/#316-manually-synchronize-the-stratum-1
198+
[^2]: <https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/03_stratum1_proxies/#316-manually-synchronize-the-stratum-1>
192199

193-
[^3]: https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/#223-mounting-the-repositories
200+
[^3]: <https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/#223-mounting-the-repositories>
194201

195-
[^4]: https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/03_stratum1_proxies/#333-test-the-new-configuration
202+
[^4]: <https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/03_stratum1_proxies/#333-test-the-new-configuration>

0 commit comments

Comments
 (0)