Deploy app - Galaxy and Atlas:Mongodb

Jeez, I shouldn’t ask for help when I’m that tired. Thank you … l changed it right away.

Now it does something but it gives me this error:

Error deploying application: Your account is not authorized to deploy to Galaxy.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ddc@ production: `cross-env DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy ddcalpha.com --owner Kuroki --settings settings.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ddc@ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\NERV\AppData\Roaming\npm-cache\_logs\2019-08-28T04_38_51_368Z-debug.log

I logged in with my meteor account, so I’m not sure what the authorization problem could be?

The mentioned log in this error message is this:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'production' ]
2 info using npm@6.4.1
3 info using node@v10.11.0
4 verbose run-script [ 'preproduction', 'production', 'postproduction' ]
5 info lifecycle ddc@~preproduction: ddc@
6 info lifecycle ddc@~production: ddc@
7 verbose lifecycle ddc@~production: unsafe-perm in lifecycle true
8 verbose lifecycle ddc@~production: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\NERV\Desktop\Projekte\DDCFull\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Oculus\Support\oculus-runtime;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\WorldPainter;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\ProgramData\chocolatey\bin;C:\Users\NERV\AppData\Local\Microsoft\WindowsApps;C:\Users\NERV\AppData\Roaming\npm;C:\Users\NERV\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\NERV\AppData\Roaming\Composer\vendor\bin;C:\Users\NERV\AppData\Local\.meteor;C:\Users\NERV\AppData\Local\GitHubDesktop\bin;C:\Program Files\heroku\bin
9 verbose lifecycle ddc@~production: CWD: C:\Users\NERV\Desktop\Projekte\DDCFull
10 silly lifecycle ddc@~production: Args: [ '/d /s /c',
10 silly lifecycle   'cross-env DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy ddcalpha.com --owner Kuroki --settings settings.json' ]
11 silly lifecycle ddc@~production: Returned: code: 1  signal: null
12 info lifecycle ddc@~production: Failed to exec production script
13 verbose stack Error: ddc@ production: `cross-env DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy ddcalpha.com --owner Kuroki --settings settings.json`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid ddc@
15 verbose cwd C:\Users\NERV\Desktop\Projekte\DDCFull
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "production"
18 verbose node v10.11.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error ddc@ production: `cross-env DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy ddcalpha.com --owner Kuroki --settings settings.json`
22 error Exit status 1
23 error Failed at the ddc@ production script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Galaxy specific issues I can’t help with, I’ve never used it sorry!

1 Like

Alrite, thanks. I already contacted the support. Could I ask what approach you take to deploy meteor apps?

Those are additional settings for MongoDB that are set properly inside the Meteor mongo packages when the connection is initialized. If you left it there you would run into errors.

Not sure why the deploy script is failing. The only strange thing I can see is that there is Node 10 being used, while current Meteor uses Node 8, but in this instance I don’t think that should matter. But since its Windows I have no clue.

Atlas has given you a modern connection string (‘mongodb+srv…’). I’ve had issues with this. In the Atlas UI, there’s an option to get a connection string in an older format. I’d give that a shot. Has helped me in the past.

I’m not sure if it’s a problem with the string but I’ll try and report, thank you.

I either do deployments completely manually on an EC2 instance or use MUP, depending on the project lifetime and scale.
We often do once-off projects that only last a few days or weeks and it’s easier to just whack it up on an existing EC2 with a wildcard DNS record pointing to it.
Things that last a bit longer or will be regularly updated get their own instance and deployed with MUP

For the larger project we’re working on, we’re looking at hosting it on Galaxy when it’s ready

I deployed a new app 2 weeks ago with Galaxy + Atlas. No problems

Make sure to have the M10 package from Atlas and the Pro level from Galaxy. With the correct IP addresses whitelisted in Atlas

My connection/build string:

{
  "galaxy.meteor.com": {
    "env": {
      "MONGO_URL": "mongodb+srv://dbUser:<password>@staging1-x9fb7.mongodb.net/meteor?retryWrites=true&w=majority",
      "MONGO_OPLOG_URL": "mongodb+srv://oplogUser:<password>@staging1-x9fb7.mongodb.net/local?retryWrites=true&w=majority"
    }
  },
  "public": {},
  "private": {}
}
4 Likes

Hi, thanks -

but where exactly can I find the M10 package from atlas?
Tried googling: https://www.google.com/search?q=atlas+m10+package&rlz=1C1CHBD_deDE811DE811&oq=atlas+m10+package&aqs=chrome..69i57.4312j0j7&sourceid=chrome&ie=UTF-8 But there’s no result.

And what is meant by Pro level from Galaxy?

M10 is a size of an instance. You see it when setting size of the container on Atlas.

You can set Galaxy Professional in your deployment settings on Galaxy. The most important thing it gives you is IP whitelisting, which you need for Galaxy and performance monitoring. It is a bit more expensive than Galaxy Essential, but worth it given the increased security and monitoring.

Ah, thanks, thought it was some kind of npm package.

I whitelisted my own IP address in atlas already. I mean, I just want to test my app, it’s not even done yet. I would like to stay on Essential. It almost sounds like I need this pro Level to deploy my app? Since I want to have the costs as low as possible for now, I also want to stay at the Sandbox cluster for now. If this wouldn’t work, I don’t see why that would be an offer.

No, essential works just fine. You won’t have IP addresses to whitelist in Atlas, so you will have to open that to every IP if you want to connect to Atlas from your Galaxy deployment.

1 Like

I applied this

and this

and it deployed successfully. I looks like I still have some things to do but thats a good start. Thank you to everyone!

1 Like

Keep an eye on your first billing. I just moved away from Atlas as there seems to be issues with huge bandwidth amounts

Thanks, I’m still on sandbox-tier right now. I plan to change that once my app is finished. What kind of issues though? They charge false amounts?

I doubt that. Given that they have huge customers, they wouldn’t be able to get away with it.

Would be nice to get to the bottom of this though. Right now I speculate it might be related to oplog and some unrelated traffic that gets send to the app, even though the app has no need for it.
Or it could be something stupid in my app. That is always a possibility.

I noticed that Atlas talked about increases in bandwidth with 4.2 vs 4.0. I’ve just moved to the M10 cluster to begin testing & prepare my app release. I chose not to include the oplog configuration at the time. I’ll keep an eye on the bandwidth billing.

1 Like

I think the example shared by @ChristopherBate is great. Two things that are worth highlighting from his post:

  1. The "galaxy.meteor.com : { " environment variable has to be at the top of your settings json file - before your public and private configurations.

  2. The connection link that Atlas provides works - just replace username and password with your information and you should be good to go.

With that said, if you need a step-by-step instruction on how to setup Meteor with MongoDB Atlas check out this Fall 2019 course page from the University of Hawaii - start at step 3. From my research, it is the best (i.e. fairly recent and accurate) step-by-step guide on the setup process for Meteor and MongoDB Atlas.

Good luck!

5 Likes