Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

OCI + Singularity Container Registry

License

NotificationsYou must be signed in to change notification settings

csf-ngs/hinkskalle

Repository files navigation

Build Status

On-Premises Container Registry for OCI/docker andsingularity

What Am I

(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.

Documentation

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).

Development

Clone Current HEAD

git clone https://github.com/csf-ngs/hinkskalle.git

Docker development environment

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.

First Setup

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

Running Development Instances

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:

api: Local Backend Instance at port 7660

Usingscript/start-dev.sh. Restarts on changes in backend/

build_frontend: Continuous Frontend Build

Usingscript/start-dev-frontend.sh, basically ayarn build --watch

hinkdb: Postgres database

rq_scheduler,rq_worker,redis: Backend async job queue (optional)

ldap: for testing LDAP authentication (optional)

hockeypuck,hockeypuck_db: PGP keyserver (optional)

Side Notes

  • uploaded images are stored in./tmp

Development Install

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

Patch Singularity

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

Start Development Server

script/start-dev.sh# continuous build of frontendscript/start-dev-frontend.sh# (optional: start rq worker)# script/start-dev-worker.sh

Backend Tests

cd backendnose2

Frontend Tests

cd frontendyarn test:unit

OCI Conformance Tests

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

Generate Typescript Classes for models

pip3 install git+https://github.com/csf-ngs/swagspotta# make sure your local dev server is running at localhost:7660share/generate-models.sh

Built With

Contributing

Please do!

Authors

License

This project is licensed under the MIT License - see theLICENSE.md file for details


[8]ページ先頭

©2009-2025 Movatter.jp