-
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 pull request #48 from KNPhilip/deployment
Deployment
- Loading branch information
Showing
18 changed files
with
389 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Apply Kubernetes | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'infrastructure/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v3 | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save bidwheels | ||
- name: Apply Kubernetes manifests | ||
run: kubectl apply -f infrastructure/K8S && kubectl apply -f infrastructure/prod-k8s |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy Bidding Service | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/BiddingService/**' | ||
|
||
env: | ||
REGISTRY_IMAGE: knphilip/bidwheels-bid-svc | ||
DOCKERFILE: src/BiddingService/Dockerfile | ||
DEPLOYMENT_NAME: bid-svc | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build and push the Docker image | ||
uses: knphilip/actions/dockerfile-push@main | ||
with: | ||
context: "{{defaultContext}}" | ||
tags: ${{ env.REGISTRY_IMAGE }}:latest | ||
file: ${{ env.DOCKERFILE }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save bidwheels | ||
- name: Restart Kubernetes deployment | ||
run: kubectl rollout restart deployment ${{ secrets.DEPLOYMENT_NAME }} |
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,35 @@ | ||
name: Deploy Gateway Service | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/GatewayService/**' | ||
|
||
env: | ||
REGISTRY_IMAGE: knphilip/bidwheels-gateway-svc | ||
DOCKERFILE: src/GatewayService/Dockerfile | ||
DEPLOYMENT_NAME: gateway-svc | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build and push the Docker image | ||
uses: knphilip/actions/dockerfile-push@main | ||
with: | ||
context: "{{defaultContext}}" | ||
tags: ${{ env.REGISTRY_IMAGE }}:latest | ||
file: ${{ env.DOCKERFILE }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save bidwheels | ||
- name: Restart Kubernetes deployment | ||
run: kubectl rollout restart deployment ${{ secrets.DEPLOYMENT_NAME }} |
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,35 @@ | ||
name: Deploy Notification Service | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/NotificationService/**' | ||
|
||
env: | ||
REGISTRY_IMAGE: knphilip/bidwheels-notify-svc | ||
DOCKERFILE: src/NotificationService/Dockerfile | ||
DEPLOYMENT_NAME: notify-svc | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build and push the Docker image | ||
uses: knphilip/actions/dockerfile-push@main | ||
with: | ||
context: "{{defaultContext}}" | ||
tags: ${{ env.REGISTRY_IMAGE }}:latest | ||
file: ${{ env.DOCKERFILE }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save bidwheels | ||
- name: Restart Kubernetes deployment | ||
run: kubectl rollout restart deployment ${{ secrets.DEPLOYMENT_NAME }} |
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,35 @@ | ||
name: Deploy Search Service | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/SearchService/**' | ||
|
||
env: | ||
REGISTRY_IMAGE: knphilip/bidwheels-search-svc | ||
DOCKERFILE: src/SearchService/Dockerfile | ||
DEPLOYMENT_NAME: search-svc | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build and push the Docker image | ||
uses: knphilip/actions/dockerfile-push@main | ||
with: | ||
context: "{{defaultContext}}" | ||
tags: ${{ env.REGISTRY_IMAGE }}:latest | ||
file: ${{ env.DOCKERFILE }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save bidwheels | ||
- name: Restart Kubernetes deployment | ||
run: kubectl rollout restart deployment ${{ secrets.DEPLOYMENT_NAME }} |
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,35 @@ | ||
name: Deploy Web Application | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'frontend/web-app/**' | ||
|
||
env: | ||
REGISTRY_IMAGE: knphilip/bidwheels-web-app | ||
DOCKERFILE: frontend/web-app/Dockerfile | ||
DEPLOYMENT_NAME: webapp | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build and push the Docker image | ||
uses: knphilip/actions/dockerfile-push@main | ||
with: | ||
context: "{{defaultContext}}" | ||
tags: ${{ env.REGISTRY_IMAGE }}:latest | ||
file: ${{ env.DOCKERFILE }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save bidwheels | ||
- name: Restart Kubernetes deployment | ||
run: kubectl rollout restart deployment ${{ secrets.DEPLOYMENT_NAME }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
File renamed without changes.
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,47 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: postgres-lb | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: postgres | ||
ports: | ||
- port: 5432 | ||
targetPort: 5432 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: rabbitmq-lb | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: rabbitmq | ||
ports: | ||
- port: 15672 | ||
targetPort: 15672 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: webapp-lb | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: webapp | ||
ports: | ||
- port: 3000 | ||
targetPort: 3000 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mongo-lb | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: mongo | ||
ports: | ||
- port: 27017 | ||
targetPort: 27017 |
Oops, something went wrong.