This file contains hidden or 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
| # Usage: | |
| # aws cloudformation --region <region> create-stack --stack-name <stack name> --template-body file://vpc-fargate.yaml | |
| # This template will: | |
| # Create a VPC with: | |
| # 2 Public Subnets | |
| # 2 Private Subnets | |
| # An Internet Gateway (with routes to it for Public Subnets) | |
| # A NAT Gateway for outbound access (with routes from Private Subnets set to use it) | |
| # |
This file contains hidden or 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
| In order to build docker image with params: | |
| ` docker build . --build-arg APP_HOST=8082 --build-arg NGINX_HOST_VALUE=8000 -t sso-nginx:0.0.1` |
This file contains hidden or 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
| 1. Set project ID | |
| export PROJECT_ID=**** | |
| 2. Configure gke remote registries | |
| gcloud auth configure-docker | |
| 3. Tag an image that you want to build for remote GCR repository. Pattern is: gcr.io/<project_id>/<image_name> , for instances | |
| docker tag sample-app-backend:0.0.5 gcr.io/$PROJECT_ID/sample-app-backend:0.0.5 | |
| 4. Push image to remote container registry | |
| docker push gcr.io/$PROJECT_ID/sample-app-backend:0.0.5 | |
| 5. Create container registry: | |
| gcloud container clusters create nbgkesample --num-nodes 2 --machine-type e2-medium |
This file contains hidden or 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
| 1. Create a resource group | |
| az group create --name aks-demo --location westeurope | |
| 2. Create container registry | |
| az acr create --name nbaksdemocr --location westeurope --resource-group aks-demo --sku basic | |
| 3. Build an image and publish it to the container registry | |
| az acr build --image nb-dummy-backend:0.0.5 --registry nbaksdemocr --file Dockerfile . | |
| Or as an alternative use combination of commands docker build/docker tag. Actually docker build and docker tag is preferred, since the command above doesn't create an image on you local machine. | |
| 4. Create cluster | |
| az aks create -g aks-demo -n nbaksdemo --node-vm-size Standard_B2s --node-count 2 | |
| 5. Allow access to container registry from the cluster |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |