Skip to content

Commit 7e35185

Browse files
committed
update README usage
1 parent 870671c commit 7e35185

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,66 @@ Test that things are working with the command
6767
```
6868

6969
this is equivalent to running
70+
7071
```bash
7172
ansible-playbook cvmfs.setup.stratum_0
7273
ansible-playbook cvmfs.setup.stratum_1s
7374
ansible-playbook cvmfs.setup.proxies
7475
ansible-playbook cvmfs.setup.clients
7576
```
77+
7678
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.
7779

80+
2. To ensure that the environment was set up correctly, you could try propagating a test file through all the machines, i.e. from
81+
82+
``` bash
83+
stratum-0 -> stratum-1 -> proxy -> client
84+
```
85+
86+
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+
88+
89+
1. **On the Stratum-0**
90+
91+
Set an environment variable to the name of your repository.
92+
93+
```bash
94+
MY_REPO_NAME=<repo.org.tld>
95+
```
96+
97+
Then, run these commands[^1]
98+
99+
```bash
100+
cvmfs_server transaction ${MY_REPO_NAME}
101+
echo '#!/bin/bash' > /cvmfs/${MY_REPO_NAME}/hello.sh
102+
echo 'echo hello' >> /cvmfs/${MY_REPO_NAME}/hello.sh
103+
chmod a+x /cvmfs/${MY_REPO_NAME}/hello.sh
104+
cvmfs_server publish ${MY_REPO_NAME}
105+
```
106+
107+
2. **On one of the Client machines**
108+
109+
```bash
110+
/cvmfs/<repo.org.tld>/hello.sh
111+
```
112+
again, replacing `<repo.org.tld>` with your cvmfs-repository names.
113+
114+
You can also run the following test commands on the client[^2] [^3].
115+
116+
```bash
117+
cvmfs_config chksetup # should return OK
118+
cvmfs_config stat -v <repo.org.tld>
119+
```
120+
121+
The output of the stat command should contain a line with the following
122+
123+
```bash
124+
Connection: http://<STRATUM1_IP>/cvmfs/repo.organization.tld through proxy http://<PROXY_IP>:3128 (online)
125+
```
126+
127+
128+
129+
78130

79131
## Testing
80132
This repository uses the [Ansible Molecule](https://ansible.readthedocs.io/projects/molecule/) framework for testing.
@@ -124,3 +176,8 @@ ansible-galaxy collection install . --force
124176
molecule destroy && molecule test --destroy=never
125177
```
126178

179+
[^1]: https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/#216-adding-files-to-the-repository
180+
181+
[^2]: https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/#223-mounting-the-repositories
182+
183+
[^3]: https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/03_stratum1_proxies/#333-test-the-new-configuration

0 commit comments

Comments
 (0)