Skip to main content

Janus Controller

Lightweight, profile-based container orchestration with various backends, including Kubernetes and Portainer support. Janus also supports DTN-as-a-Service deployments with Agent host tuning.

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 .

Project Setup

This guide provides step-by-step instructions for setting up the Janus Controller environment.

Prerequisites

  • Docker
  • Docker Compose

Setup Instructions

  • Copy Configuration Files:

    sudo mkdir -p /etc/janus
    sudo cp janus/config/* /etc/janus/
    cp janus.conf.example janus.conf   <-- edit as needed
    cd ../scripts
    docker compose -f local-dev-compose.yml up -d
    
    • Set the Portainer user and password in the janus.conf file.
  • Create the db.json File and Set Permissions:

    sudo touch /etc/janus/db.json
    sudo chown 1000:1000 /etc/janus/db.json
    
  • Create a Docker Volume:

    docker volume create portainer_data
    
  • Update and Run Docker Compose:

    • Navigate to the /scripts directory in the cloned repository:
    cd /path/to/janus/scripts
    
    • Edit the local-dev-compose.yml file to update the controller’s volume path to the location of the code on your local machine.
     volumes:
       - /path/to/local/janus:/opt/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.
  • Run the Docker Compose file:

     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.
  • Access Portainer:

    • Open a web browser and navigate to https://localhost:<port#> (replace <port#> with the actual port number specified in the janus.conf file).
    • Log in using the credentials you set earlier.

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.

Metadata

Release files for janus-dtnaas 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for janus-dtnaas 1.1
File Size Uploaded Provenance Actions
janus_dtnaas-1.1.tar.gz 82.6 kB Without provenance Details for janus_dtnaas-1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for janus-dtnaas 1.1
File Interpreter ABI Platform Actions
janus_dtnaas-1.1-py3-none-any.whl Python 3 none any Details for janus_dtnaas-1.1-py3-none-any.whl

Total release size: 173.7 kB

Release files / janus_dtnaas-1.1.tar.gz

Download URL janus_dtnaas-1.1.tar.gz
Size 82.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a7cd3cf4872048d79553edf9607853d975b4033474bb3cbd6c8a90a349a1543d
BLAKE2b-256 checksum
How to use checksums
1adc6e002ce55c0dbd938604703fe23b38546867add1d1abc55a15c2b916eb52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / janus_dtnaas-1.1-py3-none-any.whl

Download URL janus_dtnaas-1.1-py3-none-any.whl
Size 91.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bc5086ae60eeb4fea90e16aace7c18138bd80cc47a65db67a03ef2d04f961bb
BLAKE2b-256 checksum
How to use checksums
07552c0f3bf11f93f2a804d6f2a58c87756b82cb3c8970cf44832912ef0d1afb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for janus-dtnaas 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page