This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into feature/add-swagger-ro…
…utes
- Loading branch information
Showing
44 changed files
with
288 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
push: | ||
branches: [product-service] | ||
pull_request: | ||
branches: [main] | ||
branches: [main, dev] | ||
|
||
jobs: | ||
build: | ||
|
@@ -80,4 +80,27 @@ jobs: | |
context: ./services/ | ||
file: ./services/product/Dockerfile | ||
push: true | ||
tags: floriaaan/goodfood-product:latest | ||
tags: floriaaan/goodfood-product:latest | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [build, test, publish] | ||
|
||
steps: | ||
- name: Install Kubectl | ||
uses: azure/setup-kubectl@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.3 | ||
- name: Install Podman | ||
run: sudo apt-get -y install podman | ||
- name: Install Kind | ||
run: go install sigs.k8s.io/[email protected] | ||
- name: Setup Cluster Authentication | ||
env: | ||
KUBECONFIG_DATA: ${{ secrets.KUBECONFIG }} | ||
run: | | ||
echo "$KUBECONFIG_DATA" | base64 --decode > /tmp/kubeconfig | ||
- name: Deploying product | ||
run: kubectl --kubeconfig=/tmp/kubeconfig rollout restart deployment product-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,7 +122,7 @@ kind create cluster --config kind-config.yaml | |
You can use Kubernetes to run the microservices and the gateway. | ||
For that create the secret for the docker registry (take care of replacing the placeholders): | ||
```shell | ||
kubectl create secret docker-registry registry-credential --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-password> --docker-email=<your-email> | ||
kubectl create secret docker-registry registry-credential --docker-server=https://hub.docker.com --docker-username=PierreLbg --docker-password=3o6gzWTiA#Vc%3 --docker-email=[email protected] | ||
``` | ||
|
||
Then make the secret usable by the service account: | ||
|
@@ -136,11 +136,6 @@ cd kubernetes | |
kubectl apply -f ./basket,./delivery,./gateway,./generic,./log,./notification,./order,./payment,./product,./promotion,./restaurant,./stock,./user | ||
``` | ||
|
||
To request the gateway you need to port-forward it: | ||
```shell | ||
kubectl port-forward <gateway-pode-name> 50000:50000 | ||
``` | ||
|
||
Then you can run your web application. Make sure to change the URL in the web application environment file to http://localhost:50000. | ||
If you need to redeploy your services after merge a new version of a services use | ||
```shell | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
data: | ||
AMQP_URL: "amqp://guest:guest@event-broker" | ||
PORT: "50002" | ||
REDIS_URL: "redis://basket-redis:6379" | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
service: basket-service-basket--env-docker | ||
name: basket--env-docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: goodfood-basket | ||
name: basket-service | ||
spec: | ||
ports: | ||
- name: "50002" | ||
|
Oops, something went wrong.