-
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 #285 from alwinsimon/v1
V1
- Loading branch information
Showing
18 changed files
with
314 additions
and
7 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,31 @@ | ||
# ========================================= CD - Deploy - Auth Service ========================================= | ||
|
||
name: CD - Deploy - Auth Service | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
paths: | ||
- "auth/**" | ||
|
||
jobs: | ||
Auth-Service-CD-Pipeline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Build Image and push to Docker registry | ||
- run: cd auth && docker build -t alwinsimon/bookmyseat-auth . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- run: docker push alwinsimon/bookmyseat-auth | ||
|
||
# Restart Deployment in K8s cluster deployed in Digital Ocean | ||
- uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} | ||
- run: kubectl rollout restart deployment auth-depl |
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,31 @@ | ||
# ========================================= CD - Deploy - Client Service ========================================= | ||
|
||
name: CD - Deploy - Client Service | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
paths: | ||
- "client/**" | ||
|
||
jobs: | ||
Client-Service-CD-Pipeline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Build Image and push to Docker registry | ||
- run: cd client && docker build -t alwinsimon/bookmyseat-client . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- run: docker push alwinsimon/bookmyseat-client | ||
|
||
# Restart Deployment in K8s cluster deployed in Digital Ocean | ||
- uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} | ||
- run: kubectl rollout restart deployment client-depl |
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,31 @@ | ||
# ========================================= CD - Deploy - Expiration Service ========================================= | ||
|
||
name: CD - Deploy - Expiration Service | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
paths: | ||
- "expiration/**" | ||
|
||
jobs: | ||
Expiration-Service-CD-Pipeline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Build Image and push to Docker registry | ||
- run: cd expiration && docker build -t alwinsimon/bookmyseat-expiration . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- run: docker push alwinsimon/bookmyseat-expiration | ||
|
||
# Restart Deployment in K8s cluster deployed in Digital Ocean | ||
- uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} | ||
- run: kubectl rollout restart deployment expiration-depl |
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,22 @@ | ||
# ========================================= CD - Deploy - Manifests ========================================= | ||
|
||
name: CD - Deploy - Manifests | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
paths: | ||
- "infra/**" | ||
|
||
jobs: | ||
Deploy-Manifests-CD-Pipeline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} | ||
- run: kubectl apply -f infra/k8s && kubectl apply -f infra/k8s-prod |
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,31 @@ | ||
# ========================================= CD - Deploy - Orders Service ========================================= | ||
|
||
name: CD - Deploy - Orders Service | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
paths: | ||
- "orders/**" | ||
|
||
jobs: | ||
Orders-Service-CD-Pipeline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Build Image and push to Docker registry | ||
- run: cd orders && docker build -t alwinsimon/bookmyseat-orders . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- run: docker push alwinsimon/bookmyseat-orders | ||
|
||
# Restart Deployment in K8s cluster deployed in Digital Ocean | ||
- uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} | ||
- run: kubectl rollout restart deployment orders-depl |
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,31 @@ | ||
# ========================================= CD - Deploy - Payments Service ========================================= | ||
|
||
name: CD - Deploy - Payments Service | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
paths: | ||
- "payments/**" | ||
|
||
jobs: | ||
Payments-Service-CD-Pipeline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Build Image and push to Docker registry | ||
- run: cd payments && docker build -t alwinsimon/bookmyseat-payments . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- run: docker push alwinsimon/bookmyseat-payments | ||
|
||
# Restart Deployment in K8s cluster deployed in Digital Ocean | ||
- uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} | ||
- run: kubectl rollout restart deployment payments-depl |
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,31 @@ | ||
# ========================================= CD - Deploy - Tickets Service ========================================= | ||
|
||
name: CD - Deploy - Tickets Service | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
paths: | ||
- "tickets/**" | ||
|
||
jobs: | ||
Tickets-Service-CD-Pipeline: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Build Image and push to Docker registry | ||
- run: cd tickets && docker build -t alwinsimon/bookmyseat-tickets . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- run: docker push alwinsimon/bookmyseat-tickets | ||
|
||
# Restart Deployment in K8s cluster deployed in Digital Ocean | ||
- uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} | ||
- run: kubectl rollout restart deployment tickets-depl |
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,16 @@ | ||
# ========================================= CI - Tests - Orders Service ========================================= | ||
|
||
name: CI - Tests - Orders Service | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "orders/**" | ||
|
||
jobs: | ||
Orders-Service-Pre-Integration-Tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: cd orders && npm install && npm run test:ci |
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,16 @@ | ||
# ========================================= CI - Tests - Payments Service ========================================= | ||
|
||
name: CI - Tests - Payments Service | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "payments/**" | ||
|
||
jobs: | ||
Payments-Service-Pre-Integration-Tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: cd payments && npm install && npm run test:ci |
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,16 @@ | ||
# ========================================= CI - Tests - Tickets Service ========================================= | ||
|
||
name: CI - Tests - Tickets Service | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "tickets/**" | ||
|
||
jobs: | ||
Tickets-Service-Pre-Integration-Tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: cd tickets && npm install && npm run test:ci |
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: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: ingress-service | ||
annotations: | ||
kubernetes.io/ingress.class: nginx | ||
nginx.ingress.kubernetes.io/use-regex: "true" | ||
spec: | ||
rules: | ||
- host: bookmyseat.dev | ||
http: | ||
paths: | ||
- path: /api/users/?(.*) | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: auth-srv | ||
port: | ||
number: 3000 | ||
- path: /api/tickets/?(.*) | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: tickets-srv | ||
port: | ||
number: 3000 | ||
- path: /api/orders/?(.*) | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: orders-srv | ||
port: | ||
number: 3000 | ||
- path: /api/payments/?(.*) | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: payments-srv | ||
port: | ||
number: 3000 | ||
- path: /?(.*) | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: client-srv | ||
port: | ||
number: 3000 |
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,6 +4,7 @@ deploy: | |
kubectl: | ||
manifests: | ||
- ./infra/k8s/* | ||
- ./infra/k8s-dev/* | ||
build: | ||
local: | ||
push: true | ||
|
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