We’re migrating our whole infrastructure from AWS to Google Cloud.
Because of that, we wanted a simple way to deploy our Meteor apps on App Engine Flexible.
We created this package to be as simple to deploy as Meteor Galaxy.
It uses Google App Engine Flexible with Docker.
Session affinity
Websockets
Health checks
The package takes care of the Docker image, building, bundling and deploying. Can be run from the CLI and of course in your CI pipeline.
We basically have a wrapper to make it easier to deploy to AppEngine, we didn’t add any extra capability, but whatever you develop or add to your Meteor App will work.
As a heads up to anyone reading this thread, I ran “meteor-google-cloud --init”
And got the error:
error: cp: no such file or directory: C:/Users/Moonshots/AppData/Roaming/npm/node_modules/meteor-google-cloud/dist/libapp.yml
The command added the folders -p and deploy but failed there after.
I may have installed wrong but I double checked several times, then went and looked at the git hub files. Never fear the 3 files you are looking for ( Dockerfile, app.yml and settings.json ) are in the Examples folder. This may just be a user error on my part with your directions. But in case this happens to another person. Just grab the files from the examples folder and fill in the blanks.
Thank you from the bottom of my heart for your repo files! I too am migrating to Google Cloud from AWS.
That’s an interesting error, especially running the --init, which is the simplest script possible.
It basically copies cp the files from the examples folder to your project/repo.
I have to admit that our test in Windows machines is limited, but I’ll take a look.
Let me know if you face any problems while deploying the app.
PS: Worth noting that AppEngine may have multiple services (or “apps”), but the first service must be called default. This is not explained in our documentation yet. But the error message from Google is self-explanatory.
My only question now is the best practice for connecting to MongoDB Atlas. They (Atlas) seem to want you to whitelist IPs-- is there a common range we can white list or do we need a more complex setup?
@raphaelarias are you guys using atlas by any chance?
We do use Atlas, and I love it. Here are some things to consider using Atlas with AppEngine plus some words regarding the IP Whitelist.
Atas support GCP so you can keep both in the same zone to lower latency.
AppEngine supports VPC (something we used to use with Galaxy and Atlas) but it’s slightly different
The GCP Atlas instances are slightly different than their AWS counterparts (sometimes slightly lower ram, but higher IOPS, etc)
So usually we would use a VPC to connect Galaxy (AWS) to Atlas (AWS), but with AppEngine the VPC once setup will not allow you to connect from outside the VPC, like AWS, which can be annoying.
I also see this error after I download the settings.json, app.yml, and Dockerfile files from the examples dir:
meteor-google-cloud --settings deploy/settings.json --app deploy/app.yml --docker deploy/Dockerfile
info: Validating settings file (deploy/settings.json)
info: Validating app.yml file (deploy/app.yml)
info: Reading Dockerfile (deploy/Dockerfile)
info: Compiling application bundle
Browserslist: caniuse-lite is outdated. Please run next command npm update
Services to deploy:
descriptor: [/tmp/tmp-7923waSIenASYvJ8/bundle/app.yaml]
source: [/tmp/tmp-7923waSIenASYvJ8/bundle]
target project: [smsmonitor]
target service: [my-service-name]
target version: [20200614t184051]
target url: [https://my-service-name-dot-smsmonitor.wn.r.appspot.com]
Beginning deployment of service [my-service-name]…
ERROR: (gcloud.app.deploy) There is a Dockerfile in the current directory, and the runtime field in /tmp/tmp-7923waSIenASYvJ8/bundle/app.yaml is currently set to [runtime: nodejs10]. To use your Dockerfile to build a custom runtime, set the runtime field to [runtime: custom]. To continue using the [nodejs10] runtime, please remove the Dockerfile from this directory.