I wanted to give a shot at deploying a Wordpress blog with Juju. Although am very new to Juju and the Amazon EC2, and am having some troubles. I am able to bootstrap an environment like this:

juju bootstrap --constraints "instance-type=t1.micro

Although I have not been successful at deploying anything. Here is the output of juju -v status:

2012-06-14 21:17:13,377 DEBUG Initializing juju status runtime
2012-06-14 21:17:13,387 INFO Connecting to environment...
2012-06-14 21:17:14,241 DEBUG Connecting to environment using ec2-50-112-192-46.us-       west-2.compute.amazonaws.com...
2012-06-14 21:17:14,241 DEBUG Spawning SSH process with remote_user="ubuntu" remote_host="ec2-50-112-192-46.us-west-2.compute.amazonaws.com" remote_port="2181" local_port="52585".
2012-06-14 21:18:33,207 DEBUG Retrying connection: Cannot connect to environment using ec2-50-112-192-46.us-west-2.compute.amazonaws.com (perhaps still initializing): could not connect before timeout after 1 retries
2012-06-14 21:18:34,039 DEBUG Connecting to environment using ec2-50-112-192-46.us-west-2.compute.amazonaws.com...
2012-06-14 21:18:34,039 DEBUG Spawning SSH process with remote_user="ubuntu" remote_host="ec2-50-112-192-46.us-west-2.compute.amazonaws.com" remote_port="2181" local_port="41481".

It keeps retrying although it never establishes a connection. I thought maybe it just needed some time so I tried it almost an hour later, same thing. I looked online at the AWS Management Console under Instances and I can see that the instance is running, although it doesn't seem to have any associated keypairs (when I click "connect" AWS tells me this).

I am able to start instances and SSH to them using the ec2-tools by following ec2 starters guide, and running ec2-run-instances ami-20800c10 -k ${EC2_KEYPAIR} -t t1.micro. The instances I start this way have my key-pair listed under the description tab on the AWS Instances page, and I have the option of connecting to them.

So why are the instances I am starting with Juju not getting my key-pair associated with them? I set up ~/.juju/environments.yaml as described here.

Hopefully I am not overlooking something too simple, thanks in advance for any help.


Its hard to help debug this without additional information, specifically which distro your running and the console log for the instance.

From the output it looks like the instance is running, but its not ready yet.

Keep in mind t1.micros are severely penalized for performing any interesting system activity (like install java packages which bootstrap does), such that it could take a very long time (~hr) to complete the bootstrap process. We stopped using t1.micros as the defaults for juju due to performance issues.

juju being portable across cloud providers, does not use ec2 key pairs, it relies on cloud-init to install the user key.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.