Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github removed docker-compose #69

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading