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

version

parent c15c09c7
No related branches found
No related tags found
No related merge requests found
......@@ -7,16 +7,16 @@ mkdir -p /usr/local/share/accessGitFS
cd /usr/local/share/accessGitFS
curl --silent --insecure --output - \
https://a75436.berlin.ptb.de/rolf.niepraschk/accessGitFS/-/archive/master/accessGitFS-master.tar \
| tar xf - --strip-components=1 # only once
sudo zypper in python3-pip # Ubuntu: sudo apt install python3-pip
| tar xf - --strip-components=1 # only once
sudo apt install python3-pip # openSUSE: sudo zypper in python3-pip
python3 -m venv .
source bin/activate
pip3 install pip-tools
pip-compile --output-file=requirements.txt requirements.in
pip3 install -r requirements.txt
chown -R nobody.nobody $PWD # Ubuntu: chown -R nobody.nogroup $PWD
chown -R nobody.nogroup $PWD # openSUSE: chown -R nobody.nobody $PWD
systemctl daemon-reload # if already exist
systemctl daemon-reload # if already exist
systemctl link $PWD/accessGitFS.service
systemctl enable accessGitFS.service # make permanent
systemctl start accessGitFS.service
......@@ -32,7 +32,7 @@ Returns a JSON file with an array of all date directories within the GitFS
mount area.
```
curl -s http://localhost:5301/accessGitFS/dates > theDates.json
curl -s http://a75436:5301/accessGitFS/dates > theDates.json
```
### accessGitFS/times/YYYY-mm-dd (GET)
......@@ -41,7 +41,7 @@ Returns a JSON file with an array of all time directories within the GitFS
mount area matching the specified date.
```
curl -s http://localhost:5301/accessGitFS/times/2020-02-05 > theTimes.json
curl -s http://a75436:5301/accessGitFS/times/2020-02-05 > theTimes.json
```
### accessGitFS/file/YYYY-mm-dd/HH-MM-SS-XXXXXXXXXX/xyz.json (GET)
......@@ -49,7 +49,7 @@ curl -s http://localhost:5301/accessGitFS/times/2020-02-05 > theTimes.json
Returns the version of a file with the specified commit date.
```
curl -s http://localhost:5301/accessGitFS/file/2020-02-05/09-49-04-9da869dfa9/000_SERVERS.json \
curl -s http://a75436:5301/accessGitFS/file/2020-02-05/09-49-04-9da869dfa9/000_SERVERS.json \
> 000_SERVERS.json
```
......
......@@ -5,6 +5,7 @@
"host":"0.0.0.0",
"port":5301
},
"version":"1.0.0",
"gitfs_dir":"/var/run/mount/vl-gitfs/history/",
"gitfs_dir_DUMMY":"/etc/"
}
......@@ -25,6 +25,10 @@ def getDirs(root):
pass
return dirs
@app.route('/accessGitFS/version', methods=['GET'])
def getVersion():
return jsonify({'version':config['version'])
@app.route('/accessGitFS/dates', methods=['GET'])
def getDates():
dirs = getDirs(gitfs_dir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment