- Notifications
You must be signed in to change notification settings - Fork1
OCI + Singularity Container Registry
License
csf-ngs/hinkskalle
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
On-Premises Container Registry for OCI/docker andsingularity
(buckethead) - I can store, retrieve and manageOCI andsingularity containers in a central library.
Compatible with/re-implementation of thesingularity library protocol and theOCI distribution spec.
Installation + Usage instructions can be found here:
https://csf-ngs.github.io/hinkskalle/
Continue to read here if you are interested in mucking around in the sourcecode (and maybe helping out with the odd PR or two).
git clone https://github.com/csf-ngs/hinkskalle.git
Achieve the best development experience with continuous reloads and frontendbuilds! No need to set up/mess up your computer!
Hinkskalle comes with a development environment based ondocker-compose.
Theghcr.io/csf-ngs/hinkskalle-dev image contains a complete development environment.
Initial setup (or maybe you want to reset your dev environment):
# (of course you can use your own favorite dummy secrets)cat<<_EOF > conf/db_secrets.envPOSTGRES_PASSWORD=supersecret_EOFcat<<_EOF > conf/secrets.envHINKSKALLE_SECRET_KEY=superdupersecretDB_PASSWORD=supersecretHINKSKALLE_LDAP_BIND_PASSWORD=superldapsecret_EOFcat<<_EOF > conf/slapd_secrets.envLDAP_ROOT_PASSWORD=superrootsecretLDAP_LOGIN_PASSWORD=superldapsecret_EOF# start hinkdb first to set up base databasedocker-compose up -d hinkdb# give it a second# install current database schemadocker-compose run --rm api flask db upgrade# set up first admin userdocker-compose run --rm api flask localdb add-user \ -u admin.hase \ -p oink \ -e'admin.hase@testha.se' \ -f Admin \ -l Hase \ --admin# set up a normal userdocker-compose run --rm api flask localdb add-user \ -u test.hase \ -p oink \ -e'test.hase@testha.se' \ -f Test \ -l Hase# ONLY when you need to reset the dev env: clean everythingdocker-compose downdocker-compose config --volumes| xargs docker volume rm
Dev server:http://localhost:7660
# WARNING: On first startup we need to install node modules and build the frontend# this might take a few minutes and the dev server will show# The requested URL was not found on the server. until that's done.## Whole stack (rarely needed)docker-compose up -d# bare minimumdocker-compose up -d api build_frontend# log outputdocker-compose logs -f
The current working directory (base) is mounted into the relevant containers.You can edit the source files with your favorite editor/IDE directly. Serviceswill automatically rebuild and/or restart on changes.
This starts the following services:
Usingscript/start-dev.sh. Restarts on changes in backend/
Usingscript/start-dev-frontend.sh, basically ayarn build --watch
- uploaded images are stored in
./tmp
Needs postgresql dev libraries! Install according to your OS instructions, e.g.:
# mac os xbrew install postgresql# ubuntu/debianapt install postgresql-dev# etc.
cd backend/python3 -m venv venvsource venv/bin/activatepip install -e'.[dev]'
This will also install nose2, Jinja2, fakeredis and psycopg2 for running testsand generating typescript classes.
You also need to set upNode,Vue andvue-cli for testing andcompiling the frontend:
# install node according to your OScd frontend/yarn install
Not necessary for singularity v3.9.0 or newer, use --insecure and --no-https params instead
Singularity absolutely required that the library server is reachable via https.While you can set this up for your development server, it's much easier topatch the source code and recompile your own.
The necessary patch is provided inshare/singularity-plain-http.patch andshould work an all versions.
ORAS requires a similar patch. If you want to play around with that, applyshare/oras-plain-http.patch.
Follow the instructions onhttps://sylabs.io/guides/3.7/admin-guide/installation.html(adjust for the version you would like) and apply the patch between the steps"Checkout Code from Git" and "Compile Singularity":
cd${GOPATH}/src/github.com/sylabs/singularitypatch -p1< /path/to/singularity-plain-http.patchpatch -p1< /path/to/oras-plain-http.patch
script/start-dev.sh# continuous build of frontendscript/start-dev-frontend.sh# (optional: start rq worker)# script/start-dev-worker.sh
cd backendnose2
cd frontendyarn test:unit
Requires a docker image built fromhttps://github.com/opencontainers/distribution-spec/tree/main/conformance.
cd share/oci./conformance-test.sh
Your backend should be available at localhost:7660
pip3 install git+https://github.com/csf-ngs/swagspotta# make sure your local dev server is running at localhost:7660share/generate-models.sh
Please do!
- Heinz Axelsson-Ekker -initial work -VBCF Next Generation Sequencing
This project is licensed under the MIT License - see theLICENSE.md file for details
About
OCI + Singularity Container Registry