Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Cloud #25

Open
krainboltgreene opened this issue Jun 4, 2017 · 2 comments
Open

Google Cloud #25

krainboltgreene opened this issue Jun 4, 2017 · 2 comments
Assignees

Comments

@krainboltgreene
Copy link
Member

Google Cloud potentially offers greater cost reduction and a significant increase in performance.

We're currently using Google Cloud for

  • Storing artifacts (assets, images, etc)
  • Building new images
  • Lambdas

We theoretically want to use it for:

  • Hosting the servers
  • Caching
  • Secrets
@krainboltgreene
Copy link
Member Author

krainboltgreene commented Jun 4, 2017

While heroku and gcloud are similar, one missing piece is environment variables. Heroku lets us create key/values that are available on the servers. gcloud has no such feature and instead encourages you to use KMS (Key Management Server, a secrets handler). Right now that's far beyond our ability to do so the alternative is to use Metadata. Metadata is a key/value system accessible from instances. It sounds just like Heroku's environments, but different enough to cause issue. Here's some sample code:

JSON.parse(HTTP.get("http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=true", headers: {"Metadata-Flavor: Google"}).body).each do |(key, value)|
  ENV[key] = value
end

@krainboltgreene
Copy link
Member Author

Right now while a push triggers a new build, it actually fails because it's missing our secrets file:

Create a build task for the docker to google stuff
  docker tag universe_www us.gcr.io/lacqueristas/www
  gcloud docker -- push us.gcr.io/lacqueristas/www
  staging postgres password nFvM3O3wAx78iNBx
  Step 15/18 : COPY googleCloud.secret.json $APPLICATION/
  lstat googleCloud.secret.json: no such file or directory
  ERROR
  ERROR: build step "gcr.io/cloud-builders/docker@sha256:fce1af538beb95a225fb841ccbecf6fa064e639a64f6ae8352337992e9e01d4a" failed: exit status 1

@krainboltgreene krainboltgreene self-assigned this Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant