$ ansible-playbook gcp-bucket-create.yml --syntax-check
$ ansible-playbook gcp-bucket-create.yml
$ cd sre_airports_api
$ vi Dockerfile
FROM golang:1.23.0
#Set the Current Working Directory inside the container
WORKDIR /app
#Copy go mod file
COPY go.mod ./
#Download all dependencies.
RUN go mod download
#Copy the source code into the container
COPY . .
#Build the Go app
RUN CGO_ENABLED=0 GOOS=linux go build -o /go-docker-app
#Expose port 8080 to the outside world
EXPOSE 8080
#Command to run the executable
CMD ["/go-docker-app"]
$ docker build -t airports_api .
$ docker tag airports_api:latest asrafbd/airports_api:v1.0
$ docker login
$ docker push asrafbd/airports_api:v1.0
$ vi newgoapp-deployment.yaml
$ kubectl apply -f newgoapp-deployment.yaml
deployment.apps/newgoapp-v1 created
$ vi newgoapp-svc.yaml
$ kubectl apply -f newgoapp-svc.yaml
service/newgoapp-v1 created
kubectl apply -f newgoapp-ingress-canary.yaml
Need to create a Pipeline project on a Jenkins server and point to the Jenkinsfile in a GitHub repository.
We can use prometheus, kiali and grafana for monitoring response times.
For tasks, checkout tasks.md