Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
accessGitFS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
accessGitFS
Commits
d00971bf
Commit
d00971bf
authored
4 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
version
parent
c15c09c7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+7
-7
7 additions, 7 deletions
README.md
config.json
+1
-0
1 addition, 0 deletions
config.json
server.py
+4
-0
4 additions, 0 deletions
server.py
with
12 additions
and
7 deletions
README.md
+
7
−
7
View file @
d00971bf
...
...
@@ -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.no
body
$PWD
# Ubuntu
: chown -R nobody.no
group
$PWD
chown
-R
nobody.no
group
$PWD
# openSUSE
: chown -R nobody.no
body
$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
```
...
...
This diff is collapsed.
Click to expand it.
config.json
+
1
−
0
View file @
d00971bf
...
...
@@ -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/"
}
This diff is collapsed.
Click to expand it.
server.py
+
4
−
0
View file @
d00971bf
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment