diff --git a/examples/envoy/1-start-services.sh b/examples/envoy/1-start-services.sh index ec3db79..f651080 100755 --- a/examples/envoy/1-start-services.sh +++ b/examples/envoy/1-start-services.sh @@ -6,8 +6,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Start up the web server echo "Starting web server..." -docker-compose -f "${DIR}"/docker-compose.yml exec -d web web-server -log /tmp/web-server.log +docker compose -f "${DIR}"/docker-compose.yml exec -d web web-server -log /tmp/web-server.log # Start up the echo server echo "Starting echo server..." -docker-compose -f "${DIR}"/docker-compose.yml exec -d echo echo-server -log /tmp/echo-server.log +docker compose -f "${DIR}"/docker-compose.yml exec -d echo echo-server -log /tmp/echo-server.log diff --git a/examples/envoy/2-start-spire-agents.sh b/examples/envoy/2-start-spire-agents.sh index bf02fd3..70f0a71 100755 --- a/examples/envoy/2-start-spire-agents.sh +++ b/examples/envoy/2-start-spire-agents.sh @@ -10,15 +10,15 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # trust bundle (see UpstreamAuthority under # https://github.com/spiffe/spire/blob/main/doc/spire_server.md#plugin-types) echo "Bootstrapping trust between SPIRE agents and SPIRE server..." -docker-compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server bundle show | - docker-compose -f "${DIR}"/docker-compose.yml exec -T web tee conf/agent/bootstrap.crt > /dev/null -docker-compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server bundle show | - docker-compose -f "${DIR}"/docker-compose.yml exec -T echo tee conf/agent/bootstrap.crt > /dev/null +docker compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server bundle show | + docker compose -f "${DIR}"/docker-compose.yml exec -T web tee conf/agent/bootstrap.crt > /dev/null +docker compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server bundle show | + docker compose -f "${DIR}"/docker-compose.yml exec -T echo tee conf/agent/bootstrap.crt > /dev/null # Start up the web server SPIRE agent. echo "Starting web server SPIRE agent..." -docker-compose -f "${DIR}"/docker-compose.yml exec -d web bin/spire-agent run +docker compose -f "${DIR}"/docker-compose.yml exec -d web bin/spire-agent run # Start up the echo server SPIRE agent. echo "Starting echo server SPIRE agent..." -docker-compose -f "${DIR}"/docker-compose.yml exec -d echo bin/spire-agent run +docker compose -f "${DIR}"/docker-compose.yml exec -d echo bin/spire-agent run diff --git a/examples/envoy/3-create-registration-entries.sh b/examples/envoy/3-create-registration-entries.sh index 96131d0..953ff5f 100755 --- a/examples/envoy/3-create-registration-entries.sh +++ b/examples/envoy/3-create-registration-entries.sh @@ -15,13 +15,13 @@ WEB_AGENT_FINGERPRINT=$(fingerprint "${DIR}"/docker/web/conf/agent.crt.pem) ECHO_AGENT_FINGERPRINT=$(fingerprint "${DIR}"/docker/echo/conf/agent.crt.pem) echo "Creating registration entry for the web server..." -docker-compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server entry create \ +docker compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server entry create \ -parentID spiffe://domain.test/spire/agent/x509pop/${WEB_AGENT_FINGERPRINT} \ -spiffeID spiffe://domain.test/web-server \ -selector unix:user:envoy echo "Creating registration entry for the echo server..." -docker-compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server entry create \ +docker compose -f "${DIR}"/docker-compose.yml exec -T spire-server bin/spire-server entry create \ -parentID spiffe://domain.test/spire/agent/x509pop/${ECHO_AGENT_FINGERPRINT} \ -spiffeID spiffe://domain.test/echo-server \ -selector unix:user:envoy diff --git a/examples/envoy/README.md b/examples/envoy/README.md index 372cb05..a7e18e8 100644 --- a/examples/envoy/README.md +++ b/examples/envoy/README.md @@ -3,7 +3,7 @@ ## Requirements - Go 1.14+ -- docker-compose +- docker compose ## Build @@ -14,7 +14,7 @@ $ ./build.sh ## Run ``` -$ docker-compose up -d +$ docker compose up -d ``` ## Start Web and Echo Servers @@ -49,7 +49,7 @@ after the registration entries are created. ## Clean up ``` -$ docker-compose down +$ docker compose down ``` ## Miscellaneous diff --git a/examples/envoy/test.sh b/examples/envoy/test.sh index d0b71ec..46d9ab9 100755 --- a/examples/envoy/test.sh +++ b/examples/envoy/test.sh @@ -13,12 +13,12 @@ search_occurrences() { cleanup() { echo "${bold}Cleaning up...${norm}" - docker-compose -f "${DIR}"/docker-compose.yml down + docker compose -f "${DIR}"/docker-compose.yml down } set_env() { "${DIR}"/build.sh > /dev/null - docker-compose -f "${DIR}"/docker-compose.yml up -d + docker compose -f "${DIR}"/docker-compose.yml up -d "${DIR}"/1-start-services.sh "${DIR}"/2-start-spire-agents.sh "${DIR}"/3-create-registration-entries.sh > /dev/null