From 8465319586c1db5da3c2be36e685570eaa375576 Mon Sep 17 00:00:00 2001 From: k-37 <60838818+k-37@users.noreply.github.com> Date: Fri, 18 Oct 2024 21:39:31 +0200 Subject: [PATCH 01/10] Update minikube.md --- deployment/minikube.md | 43 +++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index 9e669799c28..9fe394f34b6 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -12,40 +12,49 @@ minikube start --addons registry --addons dashboard The previous command starts Minikube with a Docker registry (we'll use it in the next step) and with the Kubernetes dashboard. -If you use Mac or Windows, [refer to the documentation](https://minikube.sigs.k8s.io/docs/handbook/registry/#docker-on-macos) to learn how to expose the Docker registry installed as an addon on the port 5000 of the host. - Finally, [install Helm](https://helm.sh/docs/intro/install/). We'll use it to deploy the application in the cluster thanks to the chart provided in the API Platform distribution. ## Building and Pushing Docker Images -First, build the images: +On GNU/Linux and macOS, to point your terminal to use the docker daemon inside minikube run this: ```console -docker build -t localhost:5000/php api --target api_platform_php -docker build -t localhost:5000/caddy api --target api_platform_caddy -docker build -t localhost:5000/pwa pwa --target api_platform_pwa_prod + eval $(minikube docker-env) ``` -Then push the images in the registry installed in Minikube: +Now any `docker` command you run in this current terminal will run against the docker inside minikube cluster. For detailed explanation and instructions for Windows [visit official minikube documentation](https://minikube.sigs.k8s.io/docs/handbook/pushing/#1-pushing-directly-to-the-in-cluster-docker-daemon-docker-env). + +Build the images in minikube: ```console -docker push localhost:5000/php -docker push localhost:5000/caddy -docker push localhost:5000/pwa + docker build -t localhost:5000/php api --target frankenphp_prod + docker build -t localhost:5000/pwa pwa --target prod ``` + +Then push the images in the registry installed in Minikube: +```console + docker push localhost:5000/php + docker push localhost:5000/pwa +``` + ## Deploying +Fetch Helm chart dependencies: + +```console + helm repo add postgresql https://charts.bitnami.com/bitnami/ + helm dependency build helm/api-platform +``` + Finally, deploy the project using the Helm chart: ```console -$ helm install my-project helm/api-platform \ - --set php.image.repository=localhost:5000/php \ - --set php.image.tag=latest \ - --set caddy.image.repository=localhost:5000/caddy \ - --set caddy.image.tag=latest \ - --set pwa.image.repository=localhost:5000/pwa \ - --set pwa.image.tag=latest + helm install my-project helm/api-platform \ + --set php.image.repository=localhost:5000/php \ + --set php.image.tag=latest \ + --set pwa.image.repository=localhost:5000/pwa \ + --set pwa.image.tag=latest ``` Copy and paste the commands displayed in the terminal to enable the port forwarding then go to `http://localhost:8080` to access your application! From de091d3ff42a100366f63a1864cc3e7fec01617c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:46:49 +0200 Subject: [PATCH 02/10] Update deployment/minikube.md --- deployment/minikube.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index 9fe394f34b6..d75c60d297f 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -16,7 +16,7 @@ Finally, [install Helm](https://helm.sh/docs/intro/install/). We'll use it to de ## Building and Pushing Docker Images -On GNU/Linux and macOS, to point your terminal to use the docker daemon inside minikube run this: +On GNU/Linux and macOS, run the following command following command to point your terminal’s docker-cli to the Docker Engine inside minikube: ```console eval $(minikube docker-env) From a0e70089b849ae673807ae2592f59a415e42f239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:46:55 +0200 Subject: [PATCH 03/10] Update deployment/minikube.md --- deployment/minikube.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index d75c60d297f..5487749f388 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -19,7 +19,7 @@ Finally, [install Helm](https://helm.sh/docs/intro/install/). We'll use it to de On GNU/Linux and macOS, run the following command following command to point your terminal’s docker-cli to the Docker Engine inside minikube: ```console - eval $(minikube docker-env) +eval $(minikube docker-env) ``` Now any `docker` command you run in this current terminal will run against the docker inside minikube cluster. For detailed explanation and instructions for Windows [visit official minikube documentation](https://minikube.sigs.k8s.io/docs/handbook/pushing/#1-pushing-directly-to-the-in-cluster-docker-daemon-docker-env). From 03369eac1d6bec84a95869fbb53d1a076955ec40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:47:02 +0200 Subject: [PATCH 04/10] Update deployment/minikube.md --- deployment/minikube.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index 5487749f388..6fcabf7cbf0 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -22,7 +22,7 @@ On GNU/Linux and macOS, run the following command following command to point you eval $(minikube docker-env) ``` -Now any `docker` command you run in this current terminal will run against the docker inside minikube cluster. For detailed explanation and instructions for Windows [visit official minikube documentation](https://minikube.sigs.k8s.io/docs/handbook/pushing/#1-pushing-directly-to-the-in-cluster-docker-daemon-docker-env). +Now any `docker` command you run in this current terminal will run against the Docker Engine inside the minikube cluster. For detailed explanation and instructions for Windows [visit official minikube documentation](https://minikube.sigs.k8s.io/docs/handbook/pushing/#1-pushing-directly-to-the-in-cluster-docker-daemon-docker-env). Build the images in minikube: From bf8043fcce8928fe6f764d58227fb408187b0b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:47:08 +0200 Subject: [PATCH 05/10] Update deployment/minikube.md --- deployment/minikube.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index 6fcabf7cbf0..f9189298dc5 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -27,8 +27,8 @@ Now any `docker` command you run in this current terminal will run against the D Build the images in minikube: ```console - docker build -t localhost:5000/php api --target frankenphp_prod - docker build -t localhost:5000/pwa pwa --target prod +docker build -t localhost:5000/php api --target frankenphp_prod +docker build -t localhost:5000/pwa pwa --target prod ``` Then push the images in the registry installed in Minikube: From a8d81edadd144230bbd892120cb161ecd5e93bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:47:14 +0200 Subject: [PATCH 06/10] Update deployment/minikube.md --- deployment/minikube.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index f9189298dc5..8136f13cdc2 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -31,7 +31,7 @@ docker build -t localhost:5000/php api --target frankenphp_prod docker build -t localhost:5000/pwa pwa --target prod ``` -Then push the images in the registry installed in Minikube: +Then push the images in the registry available in minikube: ```console docker push localhost:5000/php From 52c0f8fb48bbc8a100bfeb1181b1c93b37c50528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:47:20 +0200 Subject: [PATCH 07/10] Update deployment/minikube.md --- deployment/minikube.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index 8136f13cdc2..d233675d7b1 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -34,8 +34,8 @@ docker build -t localhost:5000/pwa pwa --target prod Then push the images in the registry available in minikube: ```console - docker push localhost:5000/php - docker push localhost:5000/pwa +docker push localhost:5000/php +docker push localhost:5000/pwa ``` ## Deploying From 8c6a0d3d0becd67ac1d3833c8e5ddab738db23c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:47:26 +0200 Subject: [PATCH 08/10] Update deployment/minikube.md --- deployment/minikube.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index d233675d7b1..49e0d9de2b7 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -43,8 +43,8 @@ docker push localhost:5000/pwa Fetch Helm chart dependencies: ```console - helm repo add postgresql https://charts.bitnami.com/bitnami/ - helm dependency build helm/api-platform +helm repo add postgresql https://charts.bitnami.com/bitnami/ +helm dependency build helm/api-platform ``` Finally, deploy the project using the Helm chart: From 4f3ea24726ed8a62d9ccfadcb075f1eed75b6b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:47:31 +0200 Subject: [PATCH 09/10] Update deployment/minikube.md --- deployment/minikube.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index 49e0d9de2b7..060456fbee4 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -50,11 +50,11 @@ helm dependency build helm/api-platform Finally, deploy the project using the Helm chart: ```console - helm install my-project helm/api-platform \ - --set php.image.repository=localhost:5000/php \ - --set php.image.tag=latest \ - --set pwa.image.repository=localhost:5000/pwa \ - --set pwa.image.tag=latest +helm install my-project helm/api-platform \ + --set php.image.repository=localhost:5000/php \ + --set php.image.tag=latest \ + --set pwa.image.repository=localhost:5000/pwa \ + --set pwa.image.tag=latest ``` Copy and paste the commands displayed in the terminal to enable the port forwarding then go to `http://localhost:8080` to access your application! From f1398ee91f04b17f7c00361a2e17ede6e59c4f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 23 Oct 2024 15:55:17 +0200 Subject: [PATCH 10/10] Update minikube.md --- deployment/minikube.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deployment/minikube.md b/deployment/minikube.md index 060456fbee4..b571d9e83d6 100644 --- a/deployment/minikube.md +++ b/deployment/minikube.md @@ -1,8 +1,8 @@ -# Deploying to Minikube +# Deploying to minikube -## Install Minikube +## Install minikube -If you have no existing installation of Minikube on your computer, [follow the official tutorial](https://minikube.sigs.k8s.io/docs/start/). +If you have no existing installation of minikube on your computer, [follow the official tutorial](https://minikube.sigs.k8s.io/docs/start/). When Minikube is installed, start the cluster: @@ -10,7 +10,7 @@ When Minikube is installed, start the cluster: minikube start --addons registry --addons dashboard ``` -The previous command starts Minikube with a Docker registry (we'll use it in the next step) and with the Kubernetes dashboard. +The previous command starts minikube with a Docker registry (we'll use it in the next step) and with the Kubernetes dashboard. Finally, [install Helm](https://helm.sh/docs/intro/install/). We'll use it to deploy the application in the cluster thanks to the chart provided in the API Platform distribution. @@ -30,14 +30,14 @@ Build the images in minikube: docker build -t localhost:5000/php api --target frankenphp_prod docker build -t localhost:5000/pwa pwa --target prod ``` - + Then push the images in the registry available in minikube: ```console docker push localhost:5000/php docker push localhost:5000/pwa ``` - + ## Deploying Fetch Helm chart dependencies: @@ -46,7 +46,7 @@ Fetch Helm chart dependencies: helm repo add postgresql https://charts.bitnami.com/bitnami/ helm dependency build helm/api-platform ``` - + Finally, deploy the project using the Helm chart: ```console