0

It's a fairly common thing that I want to fire up a clean EC2 instance of a particular version of Ubuntu (usually lucid or precise) and then SSH in to that instance once it's up.

I've got some Python code that I use to do it for projects (lp:pkgme-service, lp:lp-dev-utils), but I was wondering whether there's a command-line tool.

  • I tried ubuntu-ec2-run. It doesn't use a security group that opens up SSH, so I would have to do that manually.
Jorge Castro
  • 71,754
jml
  • 1,005

1 Answers1

0

The cloud-utils Install cloud-utils package contains a tool called ubuntu-ec2-run that lets you fire up clean instances, I'm not sure on the ssh bit.

You can also do this with juju if you've got it configured with ec2 with:

juju deploy ubuntu
juju ssh ubuntu/0
Jorge Castro
  • 71,754
  • ubuntu-ec2-run fires up the instance, but needs quite a lot of extra configuration to open up a port for SSH and set up a valid SSH key pair. (-g -k ) – jml Jun 19 '12 at 13:06
  • Configuring Juju with ec2 took a while. The ubuntu charm is currently broken but I fetched it with bzr branch lp:charms/ubuntu and used the local repository option to deploy it. After juju reports a successful deployment, I had to wait a while (about two minutes) before I could see a public IP in juju status. Even then, juju ssh ubuntu doesn't work. I had to type juju ssh ubuntu/0. – jml Jun 19 '12 at 13:20
  • "juju ssh ubuntu" won't work, since "ubuntu" is the service, which could consist of multiple units (machines). – Marius K Mar 14 '13 at 21:26