Skip to content

This repository contains artifacts and scripts to deploy and test the Rainbow framework. It includes example certificates for authority, provider, and consumer, a central docker-compose file, and automation scripts in Bash.

License

Notifications You must be signed in to change notification settings

EunomiaUPM/rainbow-deployment

Repository files navigation

Rainbow Deployment

Rainbow front

This repository contains artifacts and scripts to deploy and test the Rainbow framework. It includes example certificates for authority, provider, and consumer, a central docker-compose file, and automation scripts in Bash or Powershell.

Repository Contents

  • certificates/ — Certificates and keys (authority, provider, consumer).
    • authority/ — Authority certificate (CA).
      • cert.pemprivate_key.pempublic_key.pem
    • provider/ — Provider certificate.
    • consumer/ — Consumer certificate.
  • deployment/docker-compose.core.yaml — Main Docker Compose file for the core deployment.
  • scripts/bash/ — Automation scripts (setup, onboarding, start, stop).
    • auto-setup.sh — Initial environment preparation.
    • auto-onboarding.sh — Scripts for automatic entity onboarding.
    • auto-start.sh — Service startup.
    • auto-stop.sh — Service shutdown.
  • test-cases/ — Test cases (definition and implementation).

Requirements

  • Docker and docker-compose (or Docker Desktop)
  • Permissions to execute scripts (chmod +x)

External Dependencies

This project depends on walt.id as the entire authentication layer is based on the SSI paradigm. For this, it is important to download and deploy this docker-compose: https://github.com/walt-id/waltid-identity

git clone https://github.com/walt-id/waltid-identity.git
cd waltid-identity
cd docker-compose

If you are Linux user. Please, before running containers make sure they are able to communicate with host.docker.internal. For doing so, just go in the current ./waltid-identity/docker-compose folder into .env and change SERVICE_HOST environement variable. By doing that containers under a Linux host are able to resolver host.docker.internal IP alias.

#SERVICE_HOST=localhost
SERVICE_HOST=host.docker.internal

Once all is properly configured, deploy all wallet services with docker compose by running:

docker compose up -d

Quick use tutorial

Quick Use For Bash Users

Please. If you are Linux or MacOS user, you are going to use the bash scripts, make sure you have jq installed, since automation scripts relay on it.

sudo apt install jq -y # for Linux users
brew install jq        # for MacOS user

Grant execution permissions to the scripts (if they don't have them):

chmod +x scripts/bash/*.sh

Prepare the environment (executes initial configurations):

./scripts/bash/auto-setup.sh

Use the start script:

./scripts/bash/auto-start.sh

If you need it, stop the services.

./scripts/bash/auto-stop.sh

Run the automatic onboarding to have the actors authenticated and ready:

./scripts/bash/auto-onboarding.sh

Quick Use For Powershell Users

If you are Windows user, you’ll likely use Powershell. Just go ahead and run:

./scripts/powershell/auto-setup.ps1
./scripts/powershell/auto-start.ps1
./scripts/powershell/auto-onboarding.ps1

Testing flow with notebook

For testing purposes, there is a notebook available with the whole flow defined. This is a jupyter notebook. For using it, please make sure you have Python 3.10 or newer installed.

If you are a Linux user install also python3-venv

sudo apt install python3-venv -y

After, you can create a virtual environment and install dependencies. For Linux or MacOS users:

python3 -m venv .venv
source ./.venv/bin/activate
pip install -r requirements.txt

For Windows users:

python -m venv .venv
.venv\Scripts\activate.ps1
pip install -r requirements.txt

Once that is done, the jupyter notebook is ready. If you are working in a IDE such as VSCode or IntelliJ, please select the python kernel in the root and play with the notebook.

Development and Contribution

Create a branch for your change:

git checkout -b feature/my-change

Make clear and descriptive commits.

Open a pull request against main.

About

This repository contains artifacts and scripts to deploy and test the Rainbow framework. It includes example certificates for authority, provider, and consumer, a central docker-compose file, and automation scripts in Bash.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •