This document will describe the process of launching the EdgeXFoundry services with docker-compose.
Prerequisites:
- Docker-engine v17.06.0+ to support compose file format v3.4 for Fuji release
Docker-compose version 1.25+
Unsure of minimal version, but docker-compose should be capable of using docker-compose file version 3.4 for fuji release of EdgeXFoundry
- jq command line tool to use scripts below
Setup Process
- Obtain the compose files for EdgeXFoundry
- Navigate to the compose files for the fuji release
cd developer-scripts/releases/fuji/compose-files
- Link the no-security variant to a docker-compose.yaml file for simple operation
ln -s ./docker-compose-fuji-no-secty.yml ./docker-compose.yml
- Edit the docker-compose.yml to uncomment the device-random section
- Ensure DOCKER_HOST is defined in the environment (docker-compose may fail to start if it is not defined)
export DOCKER_HOST=$HOSTNAME
- Start up the containers in background mode with docker-compose
sudo docker-compose up -d
Tips for interacting with EdgeXFoundry via docker-compose & web UI
Description | Command (preface with sudo) |
---|---|
List services from docker-compose file | docker-compose config --services |
View the logs of a particular service (add -f to follow) | docker-compose logs [-f] <serviceName> |
view status of docker-compose containers (inside the compose-files folder) | docker-compose ps |
Consul Web UI: http://localhost:8500/ui
EdgeXFoundry Web UI (admin/admin): http://localhost:4000
Script Samples for interacting with EdgeXFoundry
#!/bin/bash |
#!/bin/bash |
RAND_INT_DEVICE_JSON=$(curl -s http://localhost:${CORE_COMMAND_PORT}/api/v1/device/name/${RAND_INT_DEV}) |
"value" fields |