Express Setup¶
This setup installs the MPS and RPS microservices as Docker* containers, standardized packages containing an application's source code, libraries, environment, and dependencies.
Get the Toolkit¶
To clone the repositories:
-
Open a Terminal or Powershell and navigate to a directory of your choice for development:
git clone --recursive https://github.com/open-amt-cloud-toolkit/open-amt-cloud-toolkit --branch v1.3.0
-
Change to the cloned
open-amt-cloud-toolkit
directory.cd open-amt-cloud-toolkit
Set Environment Variables¶
The .env.template
file is used by docker to set environment variables.
To set the environment variables:
-
Copy the
.env.template
file to.env
:cp .env.template .env
copy .env.template .env
-
Set
MPS_COMMON_NAME
to your development system's IP Address. Replace YOURIPADDRESS in the command below or use a text editor to modify the.env
file.sed -i "s|MPS_COMMON_NAME=localhost|MPS_COMMON_NAME=YOURIPADDRESS|g" .env
(Get-Content -Path './.env') -replace 'MPS_COMMON_NAME=localhost', 'MPS_COMMON_NAME=YOURIPADDRESS' | Set-Content -Path './.env'
Build and Run the Docker Images¶
Build the MPS, RPS, and Sample Web UI Docker images and launch the stack.
-
Run docker-compose to start the containers.
sudo docker-compose -f "docker-compose.yml" up -d --build
docker-compose -f "docker-compose.yml" up -d --build
Important - For Windows* 10
While the
docker-compose up
command is running, you may see a pop-up ask for permission for Docker Desktop Filesharing. You must select Share It for thedocker-compose up
command to execute successfully. If the pop-up expires,docker-compose up
will fail. You must rundocker-compose down -v
and then rerundocker-compose up
to successfully start the containers. -
Check that all of the containers are running.
sudo docker ps --format "table {{.Image}}\t{{.Status}}\t{{.Names}}"
docker ps --format "table {{.Image}}\t{{.Status}}\t{{.Names}}"
Success
IMAGE STATUS NAMES webui:latest Up 6 seconds open-amt-cloud-toolkit_webui_1 rps:latest Up 6 seconds open-amt-cloud-toolkit_rps_1 vault Up 6 seconds open-amt-cloud-toolkit_vault_1 mps:latest Up 6 seconds open-amt-cloud-toolkit_mps_1 postgres Up 6 seconds open-amt-cloud-toolkit_db_1 kong:2.3 Up 6 seconds (healthy) open-amt-cloud-toolkit_kong_1
If any of the above containers are not running, walk through the steps again or file a github issue here.
Important
Because the vault is running in a dev mode, stored secrets will be lost upon a restart, and profiles and configs must be recreated. They are not persistent in this mode. Be sure to run docker-compose down -v
when bringing down the stack, which removes the volumes, and start fresh upon docker-compose up
. To run vault in production mode, follow the guide here.