Skip to content
Snippets Groups Projects
Commit 7b87d16a authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

adapt the install section

parent dff0985f
No related branches found
No related tags found
No related merge requests found
# vl-dcc
DCC generation for the vacumm laboratory.
## install & activate
Create a file `.git/hooks/pre-push` in the GIT repository with the following
content:
```shell
#!/bin/bash
# In the case of "git push --tags", writes the short tag value to the
# VERSION file in the top level directory of the Git repository
toplevel=$(git rev-parse --show-toplevel)
f=${toplevel}/VERSION
touch $f
old_version=$(cat $f)
new_version=$(git describe --tags --abbrev=0)
if [ "$old_version" != "$new_version" ]; then
echo "$new_version" > $f
git commit -am "update version to '"$new_version"'"
git push origin # Is required because normal push does not necessarily happen
fi
exit 0
```
Then make this file executable:
```shell
chmod 755 .git/hooks/pre-push
```
Do the following steps with root permission on the server installation:
```shell
mkdir -p /usr/local/share/vl-dcc
cd /usr/local/share/vl-dcc
curl --silent --output - \
https://gitlab1.ptb.de/niepra01/vl-dcc/-/archive/master/vl-dcc-master.tar \
| tar xf - --strip-components=1 # only once
python3 -m venv .
source bin/activate
pip3 install pip-tools
pip-compile
chown -R nobody.nobody ../vl-dcc
systemctl daemon-reload # if already exist
systemctl link $PWD/vl-dcc.service
systemctl enable vl-dcc.service # make permanent
systemctl start vl-dcc.service
systemctl status vl-dcc.service # running?
journalctl -f --unit vl-dcc.service # run-time check
```
## api
### vl-dcc/<cer_doc_id> (GET)
......@@ -56,34 +109,6 @@ via the requested tar stream:
```
curl -s http://localhost:5006/version
```
## init & run server
```
./server
```
## install & activate
Do the following with root permission:
```bash
mkdir -p /usr/local/share/vl-dcc
cd /usr/local/share/vl-dcc
curl --insecure --silent --output - \
https://a75436.berlin.ptb.de/vaclab/vl-dcc/-/archive/master/vl-dcc-master.tar \
| tar xf - --strip-components 1 # only once
python3 -m venv . # only once
source bin/activate # only once
pip3 install pip-tools # only once
pip-compile # only once
chown -R nobody.nobody ../vl-dcc
systemctl daemon-reload # if already exist
systemctl link $PWD/vl-dcc.service # make permanent
systemctl restart vl-dcc.service
systemctl status vl-dcc.service # running?
journalctl -f --unit vl-dcc.service # run-time check
```
## More hints
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment