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
const cdk = require('@aws-cdk/core'); | |
const ec2 = require('@aws-cdk/aws-ec2'); | |
const ecs = require('@aws-cdk/aws-ecs'); | |
const ecs_patterns = require ('@aws-cdk/aws-ecs-patterns'); | |
class Cdk1Stack extends cdk.Stack { | |
constructor(scope, id, props) { | |
super(scope, id, props); |
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
//create AWS provider | |
provider "aws" { | |
//aws profile defined in aws cli | |
profile = "amplifyAdmin-1" | |
//aws region selection | |
region = "ap-southeast-1" | |
} | |
//create VPC |
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
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
python: 3.7 | |
commands: | |
- "cd /usr/bin" | |
- "curl -O https://releases.hashicorp.com/terraform/0.12.6/terraform_0.12.6_linux_amd64.zip" | |
- "unzip terraform_0.12.6_linux_amd64.zip" |
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
FROM php:apache | |
RUN apt-get update \ | |
&& apt-get install -y curl wget unzip | |
RUN wget https://us-west-2-tcprod.s3.amazonaws.com/courses/ILT-TF-100-ARCHIT/v6.4.1/lab-2-webapp/scripts/inventory-app.zip | |
RUN unzip inventory-app.zip -d /var/www/html/ | |
RUN wget https://github.com/aws/aws-sdk-php/releases/download/3.62.3/aws.zip | |
RUN unzip aws -d /var/www/html |
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
//create AWS provider | |
provider "aws" { | |
//aws profile defined in aws cli | |
profile = "amplifyAdmin-1" | |
//aws region selection | |
region = "ap-southeast-1" | |
} | |
//create s3 tfstate location cl |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: eksworkshop-php | |
labels: | |
app: eksworkshop-php | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: eksworkshop-php | |
spec: | |
selector: | |
app: eksworkshop-php | |
type: LoadBalancer | |
ports: | |
- protocol: TCP |
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
--- | |
version: 0.2 | |
phases: | |
install: | |
commands: | |
- curl -sS -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/aws-iam-authenticator | |
- curl -sS -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/linux/amd64/kubectl | |
- chmod +x ./kubectl ./aws-iam-authenticator | |
- export PATH=$PWD/:$PATH | |
- apt-get update && apt-get -y install jq python3-pip python3-dev && pip3 install --upgrade awscli |
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
FROM golang:1.11.1 as builder | |
RUN mkdir -p /go/src/test | |
WORKDIR /go/src/test | |
RUN useradd -u 10001 app | |
COPY . . | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . | |
EXPOSE 8080 | |
CMD ["/go/src/test/main"] |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hello-k8s | |
spec: | |
type: LoadBalancer | |
ports: | |
- port: 80 | |
targetPort: 8080 | |
selector: |
OlderNewer