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
27 changes: 27 additions & 0 deletions .github/workflows/auth-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# name: auth-deployment

# on:
# push:
# branches:
# - master
# paths:
# - "auth/**"

# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - run: cd auth && docker build . -t jesusz0r/auth
# - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
# env:
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# - run: docker push jesusz0r/auth
# - uses: digitalocean/action-doctl@v2
# with:
# token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
# - run: doctl kubernetes cluster kubeconfig save $DIGITAL_OCEAN_KUBERNETES_CLUSTER
# env:
# DIGITAL_OCEAN_KUBERNETES_CLUSTER: ${{ secrets.DIGITAL_OCEAN_KUBERNETES_CLUSTER }}
# - run: kubectl rollout restart deployment auth-deployment
21 changes: 21 additions & 0 deletions .github/workflows/deploy-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# name: deploy-manifest

# on:
# push:
# branches:
# - master
# paths:
# - "infra/**"

# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: digitalocean/action-doctl@v2
# with:
# token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
# - run: doctl kubernetes cluster kubeconfig save $DIGITAL_OCEAN_KUBERNETES_CLUSTER
# env:
# DIGITAL_OCEAN_KUBERNETES_CLUSTER: ${{ secrets.DIGITAL_OCEAN_KUBERNETES_CLUSTER }}
# - run: kubectl apply -f infra/k8s -f infra/k8s-prod
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## How to setup DigitalOcean Kubernetes Cluster

- Go to DigitalOcean and create the cluster.
- Install doctl https://github.com/digitalocean/doctl into our local machine.
- Authenticate using doctl auth init
- doctl kubernetes
- Change context to our DigitalOcean cluster context
- Setup ingress-nginx, create secrets, etc.
File renamed without changes.
32 changes: 32 additions & 0 deletions infra/k8s-prod/ingress-srv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-service
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- host: local.ticketing.com
http:
paths:
- path: /api/users/?(.*)
backend:
serviceName: auth-service
servicePort: 8000
- path: /api/tickets/?(.*)
backend:
serviceName: tickets-service
servicePort: 8000
- path: /api/orders/?(.*)
backend:
serviceName: orders-service
servicePort: 8000
- path: /api/payments/?(.*)
backend:
serviceName: payments-service
servicePort: 8000
- path: /?(.*)
backend:
serviceName: client-service
servicePort: 3000
1 change: 1 addition & 0 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ deploy:
kubectl:
manifests:
- ./infra/k8s/*
- ./infra/k8s-dev/*
build:
local:
push: false
Expand Down