Janus DTNaaS Controller
Project description
Janus Controller
A container (Portainer Docker) controller with profiles for common Data Transfer Node (DTN) capabilities. Support DTN-as-a-Service deployments.
Build Instructions
python -m build
Upload to PyPi using
twine upload dist/*
Install Instructions
git clone https://github.com/esnet/janus.git
cd janus
pip3 install -e .
Development quick-start
Without installing any of the dependencies locally, you can use an existing Docker compose stack to run the controller and supporting services. From within the clone Janus repository:
cd janus/config
cp janus.conf.example janus.conf <-- edit as needed
cd ../scripts
docker compose -f local-dev-compose.yml up -d
This will start the Janus controller in a development context along with supporting container images. The janus/config directory along with the relative source tree will be mounted inside the container.
volumes:
- ./..:/opt/janus
- ./../janus/config:/etc/janus
Edits to the source code will invoke a controller reload. Additional configuration files can be placed in the config/ subdirectory as needed, for example a kubecfg.
Adding Kubernetes config
Bind mount your K8s config file into the $HOME of the Janus controller container.
For example:
volumes:
- ./../janus/config/nrp.config:/home/janus/.kube/config
Then, when you access the Janus Web interface Endpoints view, the controller should list the resources queried from all the contexts in your K8s config.
Configuring container registry authentication
The Janus controller supports authentication to private container registries using tokens passed via the X-Registry-Auth HTTP header. The tokens are in the form of a base64 encoded dictionary containing the following attributes:
{ "username": "",
"password": "",
"serveraddress": ""
}
As an example, Harbor registries allow for the creation of robot accounts with secret keys. Using one of these robot accounts, a valid token for Janus/Portainer can be created as follows:
echo '{"username": "robot+dtnaas+deployer", "password": "SECRET_KEY", "serveraddress": "wharf.es.net"}' | base64 -w 0
For a single authenticated registry, this token can be passed as an environment variable when launching the controller process. In a Janus controller Docker compose file, include the following:
...
environment:
- REGISTRY_AUTH=<TOKEN>
...
Within the Janus settings.py file is where the registry auth
dictionary is maintained to map registry servers to authentication
tokens. Additional registries with their associated auth tokens may be
defined as needed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file janus_dtnaas-0.3rc1.post12.tar.gz.
File metadata
- Download URL: janus_dtnaas-0.3rc1.post12.tar.gz
- Upload date:
- Size: 59.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.9.6 requests/2.31.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.66.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d720d8c11db5b8aa76dbb639496bd25f3cda097eaee66045e7e8b13b4b901f9
|
|
| MD5 |
29ae8dd128fb977cf5152afb9a104b2b
|
|
| BLAKE2b-256 |
4e0003379947a5a18460c1e32e1880dcc5e208783713825c316dbee370d92333
|
File details
Details for the file janus_dtnaas-0.3rc1.post12-py3-none-any.whl.
File metadata
- Download URL: janus_dtnaas-0.3rc1.post12-py3-none-any.whl
- Upload date:
- Size: 67.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.9.6 requests/2.31.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.66.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa4d2073d1d5fb060913d693e1942bb77f1faaa7f3f32470e0c4392805ac965
|
|
| MD5 |
7ea534b97972c5be85f9d1b6b4f314b9
|
|
| BLAKE2b-256 |
dba4d81d4504be476fe32acc6f256d9882c6e8c4fbc23c8c5107e1ff84269f61
|