Alex,

Well spotted - yes, by default Clearwater installs in us-east-1.  (This is 
actually AWS's default region.)

However, you can deploy in other regions.  There are three changes required to 
make this happen.

*         In your environments/Siren.rb file, add the following line in the 
'override_attributes "clearwater"' block.
  "region" => "us-west-2",

*         Also in your environments/Siren.rb file, change the 
availability_zones line to read as follows.
  "availability_zones" => ["us-west-2a", "us-west-2b", "us-west-2c"],

*         In your plugins/knife/boxes.rb, find the @@default_image block and 
change the ec2 entry to read as follows.  (This is because the Ubuntu 12.04 AMI 
has a different identifier in each EC2 region.)
      ec2: "ami-70f96e40",

Once you've made these changes, you'll need to run "knife environment from file 
environments/Siren.rb" to upload your modified environment file to the chef 
server (as described at 
https://github.com/Metaswitch/clearwater-docs/wiki/Creating%20a%20deployment%20environment#uploading-the-environment).
  Then you should be able to run "knife deployment resize -E Siren -V" and have 
it deploy in us-west-2.

I hope that helps.  Please let me know how you get on.

Thanks,

Matt

From: Alex Interrante [mailto:[email protected]]
Sent: 13 June 2013 23:11
To: Matt Williams
Subject: Re: [Clearwater] Clearwater Installation Error

Hi,

Thanks for your quick reply.

When I followed the link you provided to check that my keypair actually exists 
I was initially confused because it took me to the East Virginia region in EC2. 
My VMs and keypair are in the Oregon regeon - is this a problem?
Whenever I try to create the deployment, log files are created in ~/chef/logs 
but they are completely empty. Attached is the output when I run the deployment 
creation command with extra verbosity.

Thanks for your help,
Alex

Re: [Clearwater] Clearwater Installation Error
Matt Williams Wed, 12 Jun 2013 02:22:57 -0700

It's good to hear from you.

The "The key pair 'Siren' does not exist" error message is reported from AWS -
it's actually AWS (not your local machine) that is complaining that the key
pair doesn't exist.  Please can you check that the keypair you created on AWS
at
https://github.com/Metaswitch/clearwater-docs/wiki/Creating%20a%20deployment%20environment#creating-a-keypair
 does still exist in EC2?  You can do this by going to
https://console.aws.amazon.com/ec2/home?region=us-east-1#s=KeyPairs in your AWS
account.  The key in AWS must be called "Siren", just like the file on disk.

If this isn't the problem, the log files might provide useful information.
Would it be possible to share one?

Please let me know how you get on.

Thanks,

Matt

From: 
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Alex
Interrante
Sent: 11 June 2013 21:35
To: 
[email protected]<mailto:[email protected]>
Subject: [Clearwater] Clearwater Installation Error

Hi,
I have been following the tutorial to install Clearwater here:
https://github.com/Metaswitch/clearwater-docs/wiki/Automated%20Install and I
have run into an error in the last stage of the process when creating a
deployment with knife
(https://github.com/Metaswitch/clearwater-docs/wiki/Creating%20a%20deployment%20with%20Chef
). When I try to run the resize command, I get an error saying that the nodes
cannot be created because the keypair I have specified in the configuraiton
file does not exist. I have checked that this keypair file exists and that the
permissions are correct to access it. Here is what knife returns when I try to
run it:

ubuntu@ip-172-31-46-204:~/chef$ knife deployment resize -E Siren -V
INFO: Creating deployment in environment: Siren
INFO: Creating security groups...
The following boxes will be created:
 - Siren-homestead-1
 - Siren-sprout-1
 - Siren-homer-1
 - Siren-ellis-1
 - Siren-bono-1
This resize will require re-clustering the following nodes types:
 - sprout
 - homer
 - homestead
This is a destructive operation:
 - Service will be interrupted
Continue? (y/N)
y
INFO: Creating deployment nodes
INFO: Bootstrapping Siren-sprout-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-sprout-1-bootstrap-1370977257.log
INFO: Bootstrapping Siren-ellis-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-ellis-1-bootstrap-1370977258.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-sprout-1
ERROR: Failed to create node for Siren-sprout-1
INFO: Bootstrapping Siren-sprout-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-sprout-1-bootstrap-1370977259.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-ellis-1
ERROR: Failed to create node for Siren-ellis-1
INFO: Bootstrapping Siren-ellis-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-ellis-1-bootstrap-1370977259.log
INFO: Bootstrapping Siren-homestead-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-homestead-1-bootstrap-1370977259.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-sprout-1
ERROR: Failed to create node for Siren-sprout-1
INFO: Bootstrapping Siren-sprout-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-sprout-1-bootstrap-1370977260.log
Continue? (y/N)
y
INFO: Creating deployment nodes
INFO: Bootstrapping Siren-sprout-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-sprout-1-bootstrap-1370977257.log
INFO: Bootstrapping Siren-ellis-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-ellis-1-bootstrap-1370977258.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-sprout-1
ERROR: Failed to create node for Siren-sprout-1
INFO: Bootstrapping Siren-sprout-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-sprout-1-bootstrap-1370977259.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-ellis-1
ERROR: Failed to create node for Siren-ellis-1
INFO: Bootstrapping Siren-ellis-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-ellis-1-bootstrap-1370977259.log
INFO: Bootstrapping Siren-homestead-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-homestead-1-bootstrap-1370977259.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-sprout-1
ERROR: Failed to create node for Siren-sprout-1
INFO: Bootstrapping Siren-sprout-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-sprout-1-bootstrap-1370977260.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-ellis-1
ERROR: Failed to create node for Siren-ellis-1
INFO: Bootstrapping Siren-ellis-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-ellis-1-bootstrap-1370977260.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-homestead-1
ERROR: Failed to create node for Siren-homestead-1
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-sprout-1
ERROR: Failed to create node for Siren-sprout-1
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-ellis-1
ERROR: Failed to create node for Siren-ellis-1
INFO: Bootstrapping Siren-bono-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-bono-1-bootstrap-1370977262.log
INFO: Bootstrapping Siren-homer-1, logs can be found at
/home/ubuntu/chef/.chef/plugins/knife/../../logs/Siren-homer-1-bootstrap-1370977262.log
ERROR: Failed to create node: The key pair 'Siren' does not exist
ERROR: Failed to create node: The key pair 'Siren' does not exist
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-homer-1
ERROR: Failed to create node for Siren-homer-1
INFO: HTTP Request Returned 404 Not Found: Cannot load node Siren-bono-1
ERROR: Failed to create node for Siren-bono-1
ERROR: RuntimeError: Too many failures (5), aborting...
      To clean up broken boxes in deployment, issue:
      knife deployment clean -E Siren
      To delete the deployment completely, issue:
      knife deployment delete -E Siren

Here is the contents of my environment .rb file:

name "Siren"
description "Clearwater deployment - Siren"
cookbook_versions "clearwater" => "= 0.1.0"
override_attributes "clearwater" => {
  "root_domain" => "sirenhome.net<http://sirenhome.net><http://sirenhome.net>",
  "availability_zones" => ["us-east-1a", "us-east-1b"],
  "repo_server" => "http://repo.cw-ngv.com/latest";;,
  "number_start" => "6505550000",
  "number_count" => 1000,
  "keypair" => "Siren",
  "keypair_dir" => "/home/ubuntu/.chef/",
  "pstn_number_count" => 0
}

Thanks in advance for your help
_______________________________________________
Clearwater mailing list
[email protected]
http://lists.projectclearwater.org/listinfo/clearwater

Reply via email to