Skip to content

horiondreher/go-parking-lot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Parking Lot Design

Deploy services in Kubernetes

Store a .env in both services /deployments/kubernetes/users/.env and /deployments/kubernetes/parkings/.env:

Users Service

ENVIRONMENT=development

HTTP_SERVER_ADDRESS=0.0.0.0:8080
QUEUE_SERVER_ADDRESS=amqp://guest:guest@rabbitmq:5672/

POSTGRES_DB=go_parking_lot_user_service
POSTGRES_USER=pguser
POSTGRES_PASSWORD=pgpassword

MIGRATION_URL=

TOKEN_SYMMETRIC_KEY=
ACCESS_TOKEN_DURATION=
REFRESH_TOKEN_DURATION=

Parkings Service

HTTP_SERVER_ADDRESS=0.0.0.0:8080
GRPC_SERVER_ADDRESS=0.0.0.0:50051
QUEUE_SERVER_ADDRESS=amqp://guest:guest@rabbitmq:5672/

Start minikube

minikube start

Create the RabbitMQ service

kubectl apply -f deployments/kubernetes/rabbitmq/rabbitmq-deployment.yaml

Build the service image and set variables for minikube in each folder (/users and /parkings):

eval $(minikube docker-env)
docker build -t go-parking-lot-users-service .
docker build -t go-parking-lot-parkings-service .

Apply the k8s specs files for users-service

make create_configmap
kubectl apply -f deployments/kubernetes/users/persistent-volume.yaml
kubectl apply -f deployments/kubernetes/users/postgres-deployment.yaml
kubectl apply -f deployments/kubernetes/users/users-service-deployment.yaml

Apply the k8s specs files for parkings-service

make create_configmap
kubectl apply -f deployments/kubernetes/parkings/parkings-service-deployment.yaml

Deploy the ingress to access users-service externally

kubectl apply -f deployments/kubernetes/parkings-log-ingress.yaml

Other commands

Delete configmaps

kubectl delete configmaps

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors