arunoda / meteor-up-legacy

Production Quality Meteor Deployments
MIT License
2.26k stars 395 forks source link

Using Meteor Up with Nitrous.io #171

Open MarcelOnck opened 10 years ago

MarcelOnck commented 10 years ago

I have some comments about this additional resource. It suggests that I can SSH out my Meteor application from a Nitrous.io development box. However, as I have learned today from Nitrous Support, it is NOT POSSIBLE to ssh out of a Nitrous box.

I just tried this out and it keeps simply timing out the connection which was why I asked Nitrous Support to the reason: you can not SSH out of a Nitrous box at this moment.

So I am wondering how this additional resource actually has come together, or what else is done to make it work with an Nitrous box. Maybe I am missing something here?

arunoda commented 10 years ago

I hope @axwaxw can answer this question.

axwaxw commented 10 years ago

Interesting

@MarcelOnck Please provide more details of where you are trying to deploy

MarcelOnck commented 10 years ago

Gladly. I am trying to deploy straight from my Nitrous.io box into an Amazon AWS EC2 micro-instance, so that should be rather generic. What I did was follow the methods as explained by "victorlinphoto" in this video here @ https://www.youtube.com/watch?v=Lyyh2fkXovo. I worked from inside my Nitrous box terminal window straight from the Nitrous box, and unfortunately, having followed everything to the letter, the connection processes kept timing out after which I consulted Nitrous Support and they came up with the statement that it is not even possible to ssh out right now. So, from this additional resources content I take it that you actually HAVE been successful in doing that, which means I must be doing wrong, or a way has been found that Nitrous Support is not aware of, or in particular the attending Nitrous Support Officer ? If you want to know anything else, just ask and I will do my best to provide.

axwaxw commented 10 years ago

From Greg at Nitrous:

"I believe this relates to the ports that we have open. on the Nitrous boxes. Currently we have ports 1024 - 9999 and 443 open. If you are attempting to deploy to a host utilizing SSH could you try using one of these ports?"

so try this:

{
  //server authentication info
  "servers": [
    {
      "host": "myapp.com",
      // "username": "root",
      // "password": "password"
      // pem file (ssh based authentication):
      "pem": "~/.ssh/id_rsa"
      // For Nitrous, use ports 1024 - 9999:
      "sshOptions": { "Port" : 1024 }
    }
  ],
...
}
MarcelOnck commented 10 years ago

According to Meteor Up documentation and your suggestions above, I added a line to the server authentication info like this: "sshOptions": {"Port": 2500}

This unfortunately did not do the trick and the connection timed out on 'mup setup' as before. Next, I changed the port number to 443 and tried again. Also timed out. Last port tried was 1024, did not work either. None of them seem to work so that does not provide the solution hoped for unfortunately.

From Greg at Nitrous, Nov 10 at 11:00 hour: Currently you can SSH into a Nitrous box, but SSH'ing out is not supported. You can utilize different deployment tools like Git and app engine, but it will always time out when trying to ssh from the Nitrous box to another server.

All was tried from within the Nitrous box console terminal of course. The questions is rather: how did you guys get this to work when writing the docs?

axwaxw commented 10 years ago

The documentation is based on a deployment to a DigitalOcean droplet. I have repeated the process on different droplets and it seems to work as expected.

I will experiment with different cases and see if I can work out where the issue lies.

MarcelOnck commented 10 years ago

Ah. Thanks for letting me know and the effort taken to resolve this! However, if the issue is to "get out" of the Nitrous box, it shouldn't have mattered much to WHERE the connection goes? In either case, SSH'ing out would have to be impossible due to what I heard from Greg? Anyway, I hope this can be resolved and will await further response here.

gmckeever commented 10 years ago

I apologize for the confusion I caused earlier, I was not 100% informed myself and needed to get the facts.

1) SSH'ing from one Nitrous box to a second Nitrous box is not supported at this time.

2) SSH will work from a Nitrous box to other SSH servers. If connecting to EC2, check for the following:

Let me know if this helps out after looking over those settings.

williamkhshea commented 9 years ago

I am trying to deploy my meteor app from my nitrous box to a remote server in Linode.

I follow the instruction and got

Invalid mup.json file: Server username does not exit

mup.json

  // Server authentication info
  "servers": [
    {
      "host": "123.456.78.90",
     // "username": "root",
      // or pem file (ssh based authentication)
      "pem": "~/.ssh/id_rsa",
      "sshOptions": { "Port": 1024 }
    }
  ]

So I uncomment the username: "roote line in mup.json and I did mup logs -n 300 and got the following error:

[123.456.78.90] ssh: connect to host 123.456.78.90 port 1024: Connection refused

I suspect I may did something wrong in setting up the SSH key. I can access my remote server without password after setting up my ssh key in ~/.ssh/authorized_keys.

The content of the authorized_keys looks like this:

ssh-rsa XXXXXXXXXX..XXXX== root@apne1.nitrousbox.com

Do you guys have any ideas of what went wrong?

gmckeever commented 9 years ago

@williamkhshea reached out to me and we were able to get things running by uncommenting the username and changing the port to 22 within his mup.json file:

// Server authentication info
  "servers": [
    {
      "host": "123.456.78.90",
      "username": "root",
      // or pem file (ssh based authentication)
      "pem": "~/.ssh/id_rsa",
      "sshOptions": { "Port": 22 }
    }
  ]
huangjing85318 commented 9 years ago

ssh-rsa XXXXXXXXXX..XXXX== root@apne1.nitrousbox.com what means the "XXXXXXXXXX..XXXX"

williamkhshea commented 9 years ago

XXXXXXXXXX..XXXX is my ssh key, which I do not intend to tell everyone here