From 524b51b25ae634a611595002e3030a6c0ac0cb6b Mon Sep 17 00:00:00 2001 From: Jose Ignacio Galarza Date: Thu, 21 Mar 2013 12:00:25 +0100 Subject: [PATCH] Fixing some errors --- README.md | 4 ++-- cookbooks/tryit-django/recipes/aws.rb | 4 ++-- cookbooks/tryit-django/recipes/default.rb | 12 ++---------- roles/tryit-ec2.rb | 2 +- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f6a0f9d..2921bde 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ Executed commands --ssh-port 2222 --sudo --run-list "role[tryit-vagrant]" # EC2 Example - $ knife ec2 server create -r 'role[tryit-worker]' -I ami-3d4ff254 \ - -x ubuntu -i $HOME/.ssh/aws-carefoundry.pem -g sg-60836f0b + $ knife ec2 server create -r 'role[tryit-ec2]' -I ami-3d4ff254 \ + -x ubuntu -i $HOME/.ssh/KEY.pem -g SECURITY_GROUP Repository Directories diff --git a/cookbooks/tryit-django/recipes/aws.rb b/cookbooks/tryit-django/recipes/aws.rb index 7eb3fa6..2a9161c 100644 --- a/cookbooks/tryit-django/recipes/aws.rb +++ b/cookbooks/tryit-django/recipes/aws.rb @@ -12,8 +12,8 @@ aws_elastic_lb "eip_load_balancer_production" do only_if { node['roles'].include?("tryit-ec2") } - aws_access_key aws['aws_access_key_id'] - aws_secret_access_key aws['aws_secret_access_key'] + aws_access_key aws_data['aws_access_key_id'] + aws_secret_access_key aws_data['aws_secret_access_key'] name "TryIT" action :register end diff --git a/cookbooks/tryit-django/recipes/default.rb b/cookbooks/tryit-django/recipes/default.rb index b35b7b9..47e9e73 100644 --- a/cookbooks/tryit-django/recipes/default.rb +++ b/cookbooks/tryit-django/recipes/default.rb @@ -9,7 +9,7 @@ application "tryit-django" do - path "" + path "/srv/tryit-django" owner "root" group "root" repository "https://github.com/chernando/tryit_django" @@ -31,7 +31,7 @@ end nginx_load_balancer do - application_server_role "tryit-worker" + application_server_role "tryit-ec2" application_port 8080 end @@ -41,11 +41,3 @@ link_type "symbolic" to "/srv/tryit-django/shared/local_settings.py" end - -aws_elastic_lb "eip_load_balancer_production" do - only_if { node['roles'].include?("tryit-ec2") } - aws_access_key "KEY" - aws_secret_access_key "SECRET" - name "TryIT" - action :register -end diff --git a/roles/tryit-ec2.rb b/roles/tryit-ec2.rb index 5d4713b..370689a 100644 --- a/roles/tryit-ec2.rb +++ b/roles/tryit-ec2.rb @@ -2,5 +2,5 @@ description "Gunicorn servers to run TryIT Blog (in AWS)" run_list( "recipe[tryit-django]", - "recipe[tryit-django:aws]" + "recipe[tryit-django::aws]" )