Skip to content
Open
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
6 changes: 3 additions & 3 deletions Day-1/demo-traefik-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You will use traefik to show what a service discovery does.
```sh
cd traefik

docker-compose up -d
docker compose up -d
cd -
```

Expand All @@ -30,7 +30,7 @@ npm run build

cd ../infra
# Start the application
docker-compose up -d
docker compose up -d
```

Now, if you consult the Traefik HTTP services[http://BASTION_IP:8080/dashboard/#/http/services](http://BASTION_IP:8080/dashboard/#/http/services), you should see two more entries: **front-infra** and **webservice-infra**.
Expand All @@ -51,7 +51,7 @@ Then open a browser on [http://front-infra:8000](http://front-infra:8000)
### Scale some services

```sh
docker-compose up --scale webservice=2 -d
docker compose up --scale webservice=2 -d
```

You should see the additional containers in the Traefik admin UI.
Expand Down
18,055 changes: 10,585 additions & 7,470 deletions Day-1/demo-traefik-docker/front-test/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Day-1/demo-traefik-docker/front-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"react-dom": "^15.5.4"
},
"devDependencies": {
"react-scripts": "0.9.5"
"react-scripts": "5.0.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
3 changes: 1 addition & 2 deletions Day-1/demo-traefik-docker/infra/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ services:

networks:
web:
external:
name: traefik_webgateway
name: traefik_webgateway
6 changes: 3 additions & 3 deletions Day-1/demo-traefik-docker/launch-infra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

cd traefik

docker-compose up -d
docker compose up -d

cd ../front-test
npm install
npm run build

cd ../infra

docker-compose up -d
docker compose up -d

docker-compose scale webservice=2
docker compose scale webservice=2

cd ..

Expand Down
4 changes: 2 additions & 2 deletions Day-1/demo-traefik-docker/terminate-infra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

cd infra

docker-compose down
docker compose down


cd ../traefik

docker-compose down
docker compose down
22 changes: 22 additions & 0 deletions Day-1/demo-traefik-docker/webservice-test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module wescale.fr/webservice-test

go 1.18

require (
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/prometheus/client_golang v1.14.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
484 changes: 484 additions & 0 deletions Day-1/demo-traefik-docker/webservice-test/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Day-1/exercise-1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.15.0-alpine
FROM node:19.1.0-alpine

LABEL maintainer="Wescale Formation <training@wescale.fr>"

Expand Down
2 changes: 1 addition & 1 deletion Day-1/exercise-4/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
db:
image: mariadb:10
image: mariadb:10.9
volumes:
##
# Add volume mount to persist MariaDB data (répertoire /var/lib/mysql)
Expand Down
1 change: 1 addition & 0 deletions kubernetes-ressources/terraform/modules/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ resource "google_project_iam_member" "project-viewer" {
role = "roles/viewer"
member = "serviceAccount:${google_service_account.k8s_fundamentals.email}"
}

2 changes: 1 addition & 1 deletion kubernetes-ressources/terraform/tf-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

NB_PROJECTS=1 # can go to the value defined in https://gitlab.com/wescalefr/bootstrap-gcp-kube-training
NB_PROJECTS=11 # can go to the value defined in https://gitlab.com/wescalefr/bootstrap-gcp-kube-training

ACTION=$1 # Action à lancer, passée en option

Expand Down
13 changes: 13 additions & 0 deletions solutions/Day-1/exercise-1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:19.1.0-alpine

LABEL maintainer="Wescale Formation <training@wescale.fr>"

RUN mkdir -p /usr/src/my-app
WORKDIR /usr/src/my-app
COPY app.js .
COPY package.json .
RUN npm install

EXPOSE 8080

CMD ["node", "app.js"]
35 changes: 35 additions & 0 deletions solutions/Day-1/exercise-4/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: '3'
services:
db:
image: mariadb:10.9
volumes:
- "./.data/db:/var/lib/mysql"
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress

dbadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8080:80"
environment:
MYSQL_USERNAME: wordpress
MYSQL_PASSWORD: wordpress
depends_on:
- db

wordpress:
image: wordpress:latest
depends_on:
- db
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_NAME: wordpress