Setup of CARL
Currently, our setup is automated via Docker Compose.
If you want to use CARL and its components on a separate machine, i.e. a Raspberry PI or any other machine, this guide will show all necessary steps, to get CARL up and running.
- Install Git, if not already installed and checkout OpenDuT repository
git clone https://github.com/eclipse-opendut/opendut.git
- Install
docker.io
anddocker-compose-v2
- Optional: Change the docker image location CARL should be pulled from in
.ci/deploy/localenv/docker-compose.yml
. By default, CARL is pulled fromghcr.io
. - Set
/etc/hosts
file: Add the following lines to the/etc/hosts
file on the host system to access the services from the local network.192.168.56.9 opendut.local 192.168.56.9 auth.opendut.local 192.168.56.9 netbird.opendut.local 192.168.56.9 netbird-api.opendut.local 192.168.56.9 signal.opendut.local 192.168.56.9 carl.opendut.local 192.168.56.9 nginx-webdav.opendut.local 192.168.56.9 opentelemetry.opendut.local 192.168.56.9 monitoring.opendut.local
- Start the local test environment using docker compose.
In this step secrets are going to be created and all containers are getting started.# configure project path export OPENDUT_REPO_ROOT=$(git rev-parse --show-toplevel) # start provisioning and create .env file docker compose --file ${OPENDUT_REPO_ROOT:-.}/.ci/deploy/localenv/docker-compose.yml up --build provision-secrets # start the environment docker compose --file ${OPENDUT_REPO_ROOT:-.}/.ci/deploy/localenv/docker-compose.yml --env-file ${OPENDUT_REPO_ROOT:-.}/.ci/deploy/localenv/data/secrets/.env up --detach --build
The secrets which were created during the firstdocker compose
command can be found in.ci/deploy/localenv/data/secrets/.env
.
If everything worked and is up and running, you can follow the EDGAR Setup Guide.
Shutdown the environment
- Stop the local test environment using docker compose.
docker compose --file ${OPENDUT_REPO_ROOT:-.}/.ci/deploy/localenv/docker-compose.yml down
- Destroy the local test environment using docker compose.
docker compose --file ${OPENDUT_REPO_ROOT:-.}/.ci/deploy/localenv/docker-compose.yml down --volumes
Configuration
- If you followed the setup guide for CARL, there is no need to manually create this
carl.toml
file. - To configure CARL, you can create a configuration file under
/etc/opendut/carl.toml
.
The possible configuration values and their defaults can be seen here:
[network]
bind.host = "0.0.0.0"
bind.port = 8080
remote.host = "localhost"
remote.port = 8080
[network.tls]
enabled = true
certificate = "/etc/opendut/tls/carl.pem"
key = "/etc/opendut/tls/carl.key"
ca = "/etc/opendut/tls/ca.pem"
[network.oidc]
enabled = false
[network.oidc.client]
id = "tbd"
secret = "tbd"
# issuer url that CARL uses
issuer.url = "https://keycloak.internal/realms/opendut/"
# issuer url that CARL tells the clients to use (required in test environment)
issuer.remote.url = "https://keycloak.internal/realms/opendut/"
issuer.admin.url = "https://keycloak.internal/admin/realms/opendut/"
scopes = ""
[network.oidc.lea]
client.id = "opendut-lea-client"
issuer.url = "https://keycloak.internal/realms/opendut/"
scopes = "openid,profile,email"
[persistence]
enabled = false
[persistence.database]
url = "" # e.g. postgresql://example.com/carl
username = ""
password = ""
[peer]
disconnect.timeout.ms = 30000
can.server_port_range_start = 10000
can.server_port_range_end = 20000
ethernet.bridge.name.default = "br-opendut"
[serve]
ui.directory = "opendut-lea/"
[vpn]
enabled = true
kind = ""
[vpn.netbird]
url = ""
ca = ""
auth.type = ""
auth.secret = ""
timeout.ms = 10000
retries = 5
setup.key.expiration.ms = 86400000
[logging]
stdout = true
[opentelemetry]
enabled = false
collector.endpoint = ""
service.name = "opendut-carl"
[opentelemetry.metrics]
interval.ms = 60000
cpu.collection.interval.ms = 5000