Skip to content

Commit a90af51

Browse files
authored
Follow Docker Compose convention and practice (#379)
* Rename docker-compose.yml to compose.yml * Remove deprecated "version" in compose.yml * Reorganize compose.local.yml using compose files merge * Replace docker-compose.yml with compose.yml in docs
1 parent cbfcdc3 commit a90af51

File tree

9 files changed

+16
-55
lines changed

9 files changed

+16
-55
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ docker_up:
6363

6464
.PHONY: docker_up_local
6565
docker_up_local:
66-
docker compose -f docker-compose-local.yml up -d
66+
docker compose -f compose.yml -f compose.local.yml up -d
6767

6868
.PHONY: docker_build_and_up
6969
docker_build_and_up: docker_build docker_up_local
@@ -74,4 +74,4 @@ docker_down:
7474

7575
.PHONY: docker_down_local
7676
docker_down_local:
77-
docker compose -f docker-compose-local.yml down
77+
docker compose -f compose.yml -f compose.local.yml down

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
2. Make sure your repo is clean by git's standards.
55
3. Tag the repository from the `master` branch (from the `release-1.19` branch for a patch release) and push the tag `VERSION=v0.19.0 git tag -m $VERSION $VERSION; git push origin $VERSION`.
66
4. An [OWNER](OWNERS) creates a release branch `git checkout -b release-1.19`. (not required for patch releases)
7-
5. Add the prow-job settings for the new release branch [here](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/kube-scheduler-simulator).
7+
5. Add the prow-job settings for the new release branch [here](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/kube-scheduler-simulator).
88
6. Push the release branch to the kube-scheduler-simulator repo and ensure branch protection is enabled. (not required for patch releases)
99
7. Publish a draft release using the tag you created in 3.
1010
8. Perform the [image promotion process](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-sched-simulator/images.yaml).
1111
9. Publish release.
1212
10. Make sure the new version's image can be pulled and we can run the simulator correctly.
13-
11. Create a PR to update [docker-compose.yml](./docker-compose.yml) specifies the new release.
13+
11. Create a PR to update [compose.yml](./compose.yml) specifies the new release.
1414
12. Email `kubernetes-sig-scheduling@googlegroups.com` to announce the release.
1515

1616
## Notes
Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.7"
21
services:
32
simulator-scheduler:
43
image: simulator-scheduler
@@ -14,48 +13,15 @@ services:
1413
- simulator-internal-network
1514
simulator-server:
1615
image: simulator-server
17-
container_name: simulator-server
18-
environment:
19-
- PORT=1212
20-
- KUBE_SCHEDULER_SIMULATOR_ETCD_URL=http://simulator-cluster:2379
21-
- KUBE_APISERVER_URL=http://simulator-cluster:3131
2216
volumes:
23-
- ./simulator/config.yaml:/config.yaml
2417
- ./simulator/kubeconfig.yaml:/kubeconfig.yaml
25-
ports:
26-
- "1212:1212"
27-
restart: always
28-
tty: true
29-
networks:
30-
- simulator-internal-network
3118
depends_on:
3219
fake-source-cluster:
3320
condition: "service_healthy"
3421
required: false
3522
simulator-frontend:
3623
image: simulator-frontend
37-
restart: always
38-
container_name: simulator-frontend
39-
environment:
40-
- HOST=0.0.0.0
41-
- BASE_URL=http://${SIMULATOR_EXTERNAL_IP:-localhost}:1212
42-
- KUBE_API_SERVER_URL=http://${SIMULATOR_EXTERNAL_IP:-localhost}:3131
43-
ports:
44-
- "3000:3000"
45-
tty: true
4624
simulator-cluster:
47-
image: registry.k8s.io/kwok/cluster:v0.6.0-k8s.v1.30.2
48-
container_name: simulator-cluster
49-
restart: always
50-
ports:
51-
- "3131:3131"
52-
volumes:
53-
- simulator-etcd-data:/var/lib/etcd
54-
- ./kwok.yaml:/root/.kwok/kwok.yaml
55-
environment:
56-
- KWOK_KUBE_APISERVER_PORT=3131
57-
networks:
58-
- simulator-internal-network
5925
fake-source-cluster:
6026
image: registry.k8s.io/kwok/cluster:v0.6.0-k8s.v1.30.2
6127
container_name: fake-source-cluster
@@ -73,8 +39,3 @@ services:
7339
- simulator-internal-network
7440
profiles:
7541
- externalImportEnabled
76-
networks:
77-
simulator-internal-network:
78-
driver: bridge
79-
volumes:
80-
simulator-etcd-data:

docker-compose.yml renamed to compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.7"
21
services:
32
simulator-server:
43
image: registry.k8s.io/scheduler-simulator/simulator-backend:v0.3.0

simulator/.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
web/*
22
submodules/kubernetes/*
3-
docker-compose.yml
3+
compose.yml
4+
compose.local.yml

simulator/docs/environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For config file, please refer to the simulator [config.yaml](./../config.yaml).
99

1010
This page describes the environment variables that are used to configure the simulator.
1111

12-
Please refer to [docker-compose.yml](./../../docker-compose.yml) as an example use.
12+
Please refer to [compose.yml](./../../compose.yml) as an example use.
1313

1414
### For Simulator
1515

@@ -24,7 +24,7 @@ kube-apiserver uses this etcd.
2424
started. The simulator and internal kube-apiserver set the allowed
2525
origin for `CORS_ALLOWED_ORIGIN_LIST`.
2626

27-
`KUBECONFIG`: This is for the beta feature "Importing cluster's
27+
`KUBECONFIG`: This is for the beta feature "Importing cluster's
2828
resources". This variable is used to find Kubeconfig required to
2929
access your cluster for importing resources to scheduler simulator.
3030

simulator/docs/how-it-works.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ This page describes how the simulator works.
66

77
The simulator server works with the following:
88
- scheduler
9-
- [HTTP server](api.md)
9+
- [HTTP server](api.md)
1010

1111
In advance, the simulator needs to launch etcd, controller-manager and kube-apiserver outside.
12-
We recommend using [KWOK](https://github.com/kubernetes-sigs/kwok), see [docker-compose.yml](../../docker-compose.yml) to know how we wire things up.
12+
We recommend using [KWOK](https://github.com/kubernetes-sigs/kwok), see [compose.yml](../../compose.yml) to know how we wire things up.
1313

1414
### 1. users request creating resource.
1515

simulator/docs/running-simulator.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
## Running simulator
22

3-
The simulator requires docker installed in your laptop.
4-
We have [docker-compose.yml](../../docker-compose.yml) to run the simulator easily.
3+
The simulator requires Docker installed in your laptop.
4+
We have [compose.yml](../../compose.yml) to run the simulator easily.
55

66
### Run simulator with Docker
77

8-
We have [docker-compose.yml](../../docker-compose.yml) to run the simulator easily.
9-
You should install [docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) at first.
8+
We have [compose.yml](../../compose.yml) to run the simulator easily.
9+
You should install [Docker](https://docs.docker.com/engine/install/) at first.
1010

1111
You can use either of following commands.
1212

1313
```bash
14-
# pull docker images from the registry and run them.
14+
# pull docker images from the registry and run them.
1515
# It's the easiest way to run up the simulator and web UI.
1616
make docker_up
1717

web/docs/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Environment Variables
22
These describe the environment variables that are used to configure the simulator's frontend.
33

4-
Please refer [docker-compose.yml](./../docker-compose.yml) as an example use.
4+
Please refer [compose.yml](./../compose.yml) as an example use.
55

66
`KUBE_API_SERVER_URL`: This is the kube-apiserver URL. Its default
77
value is `http://localhost:3131`.

0 commit comments

Comments
 (0)