Skip to content

Commit

Permalink
Github removed docker-compose (#69)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
  • Loading branch information
kfox1111 authored Nov 17, 2024
1 parent a60ceaa commit e030917
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions examples/envoy/1-start-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions examples/envoy/2-start-spire-agents.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions examples/envoy/3-create-registration-entries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions examples/envoy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Requirements

- Go 1.14+
- docker-compose
- docker compose

## Build

Expand All @@ -14,7 +14,7 @@ $ ./build.sh
## Run

```
$ docker-compose up -d
$ docker compose up -d
```

## Start Web and Echo Servers
Expand Down Expand Up @@ -49,7 +49,7 @@ after the registration entries are created.
## Clean up

```
$ docker-compose down
$ docker compose down
```

## Miscellaneous
Expand Down
4 changes: 2 additions & 2 deletions examples/envoy/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e030917

Please sign in to comment.