[Q] November 2016 - State of deployments for actual Meteor (1.4.2)?

Well, start by installing PM2 on your server. There are several tutorials out there for that. I use Ubuntu 16.04 with nginx and pm2. You can use Amazon, Digital Ocean, or any other VPS provider. Try to get a barebones Node app running on it.

Once that’s working, install PM2-Meteor on your client, fill in the pm2-meteor.json file and pm2-meteor deploy to your server.

pm2-meteor simply builds and bundles your meteor app locally, and then sends that bundle to your server, unpacks it, and lets PM2 take it from there.

PM2 takes care of running, monitoring and logging. It restarts your meteor app in case of crash or server reboot,…

1 Like

wow nice! Thank you so much @eleventy for you kind reply. I’ll follow your instructions and return with some feedback.

I’m getting a problem while using a pem file that results in the following error: “Encrypted private key detected, but no passphrase given”

That’s is fixed by this from arunoda, but we get another problem: “All configured authentication methods failed”.
Something like this thread.

Someone knows how to surpass or have experienced this problems with pm2-meteor before ?

I’m using ssh keys without passphrases to login to the servers. Username/passwords are not permitted for security.

Have you set up passwordless, key-based ssh login on your server?
If it’s a Ubuntu server, try something like SSH setup. Make sure to set no passphrase, certainly in the beginning.

Once you can connect in the terminal without password, it might be good for security to disable password logins alltogether ( disable-password-authentication-in-ssh ).

If all that is working, try pm2-meteor again.

1 Like

Ok, I’ve tried without passphrases and the error is gone. But right now I’m getting about “bundle.tar.gz” ERROR: No such file

I’m into a folder named “deploy” with pm2-meteor.json configured.

{
  "appName": "AppNaEscola",
  "appLocation": {
    "local": "~/Projetos/AppNaEscola/Projeto/Backend",
    "git": "",
    "branch": "master"
  },
  "meteorSettingsLocation": "~/Projetos/AppNaEscola/Projeto/Backend/settings.json",
  "meteorSettingsInRepo": false,
  "prebuildScript": "",
  "meteorBuildFlags": "--architecture os.linux.x86_64",
  "env": {
    "ROOT_URL": "I'm using here my public IP",
    "PORT": 9000,
    "MONGO_URL": "mongodb://localhost:27017/AppNaEscola"
  },
  "server": {
    "host": "I'm using here my public IP",
    "username": "ubuntu",
    "deploymentDir": "/opt/pm2-meteor",
    "pem": "~/.ssh/meteor-server.pem",
    "loadProfile": "",
    "port": "22",
    "nvm": {
      "bin": "~/.nvm/nvm.sh",
      "use": ""
    },
    "exec_mode": "cluster_mode",
    "instances": 1
  },
  "allowUndeploy": true
}


I’m running pm2-meteor deploy into this folder, while my project folder is named Backend.

My directories structure is: Backend (with meteor stuff) and out this folder the deploy folder containing my pm2-meteor.json above.

Try putting your pm2-meteor.json file in your meteor folder( the one with package.json and all other stuff, Backend I guess), and try running the pm2-meteor deploy command from there, not from a different folder. pm2-meteor will create a tempory subfolder, and will clean up afterwards.

1 Like

I put right now in the same folder with my project, but the error is still here. It’s complaining about bundle.tar.gz, which is so strange.

I think we can continue talking about Meteor.js deployment after MUP death here: MUP OR PM2-Meteor OR any other deployment tools after lost arunoda and kadira?