When we last checked in our our struggling hero, me, I was struggling with the Jungle that is AWS and it's layers and layers of AIM roles, services accounts, interwoven services, and endless dependencies. Step one. Oh snap. After a long hard slog, and what felt like death by a thousand tiny cuts, it's working. I now have a deployed Elixir Phoenix App, building, running, rolling updating, all by git commits.
When to set config
AWS is a jungle
So.. I guess I need docker 🙄
GCP cloud_sql connection
Creating docker image
Can I test this image?
Debug in prod?
SQL Admin API access
Docker build is gonna need more
docker build -t gcr.io/post-it-243617/postit:v0.4.0 . Sending build context to Docker daemon 523.8kB Error response from daemon: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
$DB_NAMENO CURLY BRACES
Google KMS (Cloud Key Management)
gcloud kms key XXXXXmanual add keys one by one
args: [ '-c', 'docker build -t gcr.io/post-it-243617/postit:$REVISION_ID --build-arg DB_PASSWORD=$$db_password --build-arg DB_NAME=$$db_name --build-arg DB_SOCKET_DIR=$$db_socket_dir --build-arg DB_USERNAME=$$db_username --build-arg SECRET_KEY_BASE=$$secret_key_base .' ] secretEnv: ['db_password', 'db_name', 'db_socket_dir', 'db_username', 'secret_key_base']
"Unusable Erlang runtime system! This is likely due to being compiled for another system than the host is running"
alpine-elixir:1.7.1and then serve with
alpine:3.9Both having the erlang version
Loadbalance and HTTPS
kubectl expose deployment DEPLOYMENT --type=LoadBalancer
The key thing here is to specify the
typeand your deployment’s name. This will expose your deployment through a service and set up a Load Balancer on Google Cloud Platform.