Skip to content
Snippets Groups Projects
Verified Commit 648fa303 authored by Martin Weise's avatar Martin Weise
Browse files

Update the docker image docs

parent 78862b71
No related branches found
No related tags found
3 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0
# License
View [license information](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/master/LICENSE)
for the software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies
with any relevant licenses for all software contained within.
\ No newline at end of file
# Quick Reference
* **Maintained by**:
[the DBRepo Maintainers](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/graphs/dev)
* **Where to get help**:
[the official documentation](https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/),
# Supported tags
* [`1.3`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/master/dbrepo-DIR/Dockerfile/)
* [`latest`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/dev/dbrepo-DIR/Dockerfile/)
# Non-supported tags
* `1.2`
* `1.1`
# Quick reference (cont.)
* **Where to file issues**:
Send us an [email](https://tiss.tuwien.ac.at/person/287722.html)
* **Supported architectures:**
`amd64`
* **Source of this description:**
[docs repo's `.docs/docker` directory](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tree/dev/.docs/docker)
([history](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/commits/dev/.docs/docker))
# What is DBRepo?
We present a database repository system that allows researchers to ingest data into a central, versioned repository
through common interfaces, provides efficient access to arbitrary subsets of data even when the underlying data store is
evolving, allows reproducing of query results and supports findable-, accessible-, interoperable- and reusable (FAIR)
data.
## FRIENDLY_NAME
More documentation can be found on
the [system description](https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/DOC/).
\ No newline at end of file
import requests as rq
import os
class Dockerhub:
"""A simple Dockerhub client"""
baseurl = "https://hub.docker.com"
username = ""
registry = os.getenv("CI_REGISTRY_URL", "docker.io")
workpath = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
headers = {
"Content-Type": "application/json",
"Authorization": None
}
def __init__(self):
self.username = os.getenv("CI_REGISTRY_USER", "mweise")
print("docker username: %s" % self.username)
response = rq.post(self.baseurl + "/v2/users/login", {
"username": self.username,
"password": os.getenv("CI_REGISTRY_PASSWORD", "rMC7ysaYZJbPqi8vSUM5AzTJsuPH4U")
})
if response.status_code == 200:
self.headers["Authorization"] = "Bearer " + response.json()["token"]
else:
raise "Failed to authenticate"
def modify_description(self, component: {}):
header = self.__read__(self.workpath + "/_header.md", component)
footer = self.__read__(self.workpath + "/_footer.md", component)
body = self.__read__(self.workpath + "/body.md", component)
url = self.baseurl + "/v2/repositories/dbrepo/" + component["dir"] + "/"
print("dispatch update: %s" % url)
response = rq.patch(url, headers=self.headers,
json={
"description": f"Official DBRepo {component['name']} image",
"full_description": header + "\n\n" + body + "\n\n" + footer,
"registry": self.registry
})
if response.status_code == 200:
return response.json()
else:
print(response)
def __read__(self, path, component):
with open(path, "r") as f:
return ' '.join([line for line in f.readlines()]).replace(
"DIR", component["dir"]).replace(
"DOC", component["doc"]).replace(
"FRIENDLY_NAME", component["name"]
)
#!/bin/env python3
from client.Dockerhub import Dockerhub
from dotenv import load_dotenv
load_dotenv()
dockerhub = Dockerhub()
components = [
{
"name": "Analyse Service",
"doc": "system-services-analyse",
"dir": "analyse-service"
},
{
"name": "Authentication Service",
"doc": "system-services-authentication",
"dir": "authentication-service"
},
{
"name": "Broker Service",
"doc": "system-services-broker",
"dir": "broker-service"
},
{
"name": "Data Service",
"doc": "system-services-data",
"dir": "data-service"
},
{
"name": "Metadata Service",
"doc": "system-services-metadata",
"dir": "metadata-service"
},
{
"name": "Metadata Database",
"doc": "system-metadata-db",
"dir": "metadata-db"
},
{
"name": "User Interface",
"doc": "system-other-ui",
"dir": "ui"
}
]
if __name__ == "__main__":
for component in components:
response = dockerhub.modify_description(component)
print(response)
from distutils.core import setup
setup(name='dockerhub-client',
version='1.0',
description='Dockerhub Maintenance Client',
author='Martin Weise',
author_email='martin.weise@tuwien.ac.at',
url='https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/',
packages=['dockerhub-client'],
)
......@@ -561,11 +561,12 @@ docs-latest:
script:
- apt-get update && apt-get install -y git make
- git fetch && git checkout dev
- pip install -r ./.docs/requirements.txt
- pip install -r ./requirements.txt
- mkdir -p ./final
- mkdocs build && cp -r ./site ./final/latest
- cp ./.docs/redirect.html ./final/index.html
- cp -r ./swagger/latest ./final/latest/swagger
- python3 .docs/docker/release.py
cache:
paths:
- ./final
......@@ -592,6 +593,7 @@ docs-version:
- mkdir -p ./final
- mkdocs build && cp -r ./site ./final/1.3
- cp -r ./swagger/1.3 ./final/1.3/swagger
- python3 .docs/docker/release.py
cache:
paths:
- ./final
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment