Skip to content

Commit

Permalink
use docker compose v2 in appropriate way
Browse files Browse the repository at this point in the history
Signed-off-by: UMEZAWA Takeshi <[email protected]>
  • Loading branch information
umezawatakeshi committed Aug 9, 2024
1 parent e36b228 commit f7c9a36
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ jobs:
working-directory: ./example
- name: Set up compose test
run: |
docker-compose build
docker-compose up -d
docker compose build
docker compose up -d
./wait-up.sh
working-directory: ./example
- name: Run compose test
run: docker-compose run setup /opt/setup/test.sh
run: docker compose run setup /opt/setup/test.sh
working-directory: ./example
- name: Clean up
run: docker-compose down
run: docker compose down
working-directory: ./example
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ GitHub Actions also creates a GitHub release automatically after running [sonobu
So, **DO NOT MANUALLY CREATE GITHUB RELEASES**. The test results will be attached to the GitHub
release that can be submitted to [cncf/k8s-conformance](https://github.com/cncf/k8s-conformance).

## Maintain docker-compose
## Maintain docker compose

After new CKE released, update cke image on docker-compose.yml.

Expand Down
9 changes: 5 additions & 4 deletions sonobuoy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bin/sonobuoy:
.PHONY: run
run: bin/cke bin/ckecli bin/kubectl
mkdir -p etcd-data
/usr/local/bin/docker-compose up -d
docker compose up -d
./wait-up.sh
$(CKECLI) vault ssh-privkey /home/cybozu/gcp_rsa
$(CKECLI) constraints set minimum-workers 2
Expand All @@ -66,13 +66,14 @@ sonobuoy: bin/sonobuoy

.PHONY: clean
clean:
-/usr/local/bin/docker-compose down
-docker compose down
$(SUDO) rm -rf bin etcd-data

.PHONY: setup
setup:
$(SUDO) $(CURL) -o /usr/local/bin/docker-compose $(DOCKER_COMPOSE_URL)
$(SUDO) chmod +x /usr/local/bin/docker-compose
$(SUDO) mkdir -p /usr/local/lib/docker/cli-plugins
$(SUDO) $(CURL) -o /usr/local/lib/docker/cli-plugins/docker-compose $(DOCKER_COMPOSE_URL)
$(SUDO) chmod +x /usr/local/lib/docker/cli-plugins/docker-compose

$(CT):
mkdir -p bin
Expand Down
2 changes: 1 addition & 1 deletion sonobuoy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ [email protected]
## Run Sonobuoy

Run `bin/run-sonobuoy.sh`.
This script creates 4 GCE VMs, runs CKE on VM #0 by using `docker-compose`, runs Kubernetes deployed by CKE on VM #1~#3, and runs [Sonobuoy][] on VM #0.
This script creates 4 GCE VMs, runs CKE on VM #0 by using `docker compose`, runs Kubernetes deployed by CKE on VM #1~#3, and runs [Sonobuoy][] on VM #0.

```console
$ env INSTANCE_NAME=sonobuoy-vm GITHUB_SHA=vX.Y.Z GITHUB_REPOSITORY=cybozu-go/cke ./bin/run-sonobuoy.sh
Expand Down

0 comments on commit f7c9a36

Please sign in to comment.