jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <ignasi.barr...@gmail.com>
Subject Re: Running Basic-chef sample
Date Wed, 05 Feb 2014 14:13:06 GMT
Does the private key exist in the ~/.ssh/ folder of the user you are
using to run the example?
Could you also change a bit the example so it sues a CentOS template?
Some Ubuntu versions present issues with the last Apache cookbooks and
the server configuration. Testing with a CentOS may also help.

On 5 February 2014 14:56, Jose <kiuby88.programming@gmail.com> wrote:
> Hello Ignasi.
>
> I finally have to check the chef-samples from the git repository.
> As you told me, I obtained a error when I run
>
>     java -jar target/chef-basics-jar-with-dependencies.jar aws-ec2 identity
> credential mygroup add
>
> because the Apache service is not started. Next I tried to install mysql
> server using the command
>
>     java -jar target/chef-basics-jar-with-dependencies.jar aws-ec2 identity
> credential mygroup cheff mysql
>
> Unfortunately, I obtained an error again:
>
>     java -jar target/chef-basics-jar-with-dependencies.jar aws-ec2 identity
> credential chef mysql
>     >> initializing {id=aws-ec2, name=Amazon-specific EC2 API,
> views=[org.jclouds.aws.ec2.compute.AWSEC2ComputeServiceContext],
> endpointName=https endpoint, identityName=Access Key ID,
> credentialName=Optional.of(Secret Access Key),
> documentation=http://docs.amazonwebservices.com/AWSEC2/latest/APIReference,
> api=interface org.jclouds.aws.ec2.AWSEC2Api}
>     error reading private key null
>
> Hence, I thought the problem could be the key needed to establish the ssh
> connection e.g. the key was not the correct or the port in the instance was
> not opened. However, I could connect me with the machine in a correct way
> from a ssh client installed in my machine.  Maybe,  the problem is as the
> key are stored or how is got to stablish the connection between jclouds and
> the aws instance, I do not know. What do you think?
>
> In order to check the mysql recipe installation I changed the recipe by
> default in the example to mysql [1]. Nevertheless, I obtained the first
> error again:<< node us-east-1/i-c12e92ef: [10.248.123.97, 54.224.20.190]
>
> <<     {output=,
> error=/tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh:
> line 55: /etc/hosts: Permission denied
>
> You need to be root to perform this command.
>
> /tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh: line 120:
> git: command not found
>
> /tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh: line 121:
> cd: /var/chef/cookbooks/apache2: No such file or directory
>
> /tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh: line 55:
> /etc/hosts: Permission denied
>
> ERROR:  While executing gem ... (Errno::EACCES)
> Permission denied - /usr/lib/ruby/site_ruby/1.8/rubygems
>
> /tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh: line 136:
> gem: command not found
>
> mkdir: cannot create directory `/var/chef': Permission denied
>
> mkdir: cannot create directory `/var/chef': Permission denied
>
> /tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh: line 139:
> /var/chef/solo.rb: No such file or directory
>
> /tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh: line 145:
> /var/chef/node.json: No such file or directory
>
> /tmp/jclouds-script-1390474405248/jclouds-script-1390474405248.sh: line 148:
> chef-solo: command not found
>
> , exitStatus=127}
>
> << node us-east-1/i-39209c17: [10.214.19.61, 174.129.93.89]
>
> <<     {output=,
> error=/tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh:
> line 55: /etc/hosts: Permission denied
>
> You need to be root to perform this command.
>
> /tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh: line 120:
> git: command not found
>
> /tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh: line 121:
> cd: /var/chef/cookbooks/apache2: No such file or directory
>
> /tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh: line 55:
> /etc/hosts: Permission denied
>
> ERROR:  While executing gem ... (Errno::EACCES)
>
>     Permission denied - /usr/lib/ruby/site_ruby/1.8/rubygems
>
> /tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh: line 136:
> gem: command not found
>
> mkdir: cannot create directory `/var/chef': Permission denied
>
> mkdir: cannot create directory `/var/chef': Permission denied
>
> /tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh: line 139:
> /var/chef/solo.rb: No such file or directory
>
> /tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh: line 145:
> /var/chef/node.json: No such file or directory
>
> /tmp/jclouds-script-1390474405254/jclouds-script-1390474405254.sh: line 148:
> chef-solo: command not found
>
> , exitStatus=127}
>
>
> I think these issues could be interesting for you  :-)
>
> Thanks a lot.
> Jose
>
>
>
> [1] https://github.com/opscode-cookbooks/mysql
>
>
> El 24/01/2014 8:23, Jose Carrasco escribió:
>
> Hi again, Ignasi.
>
> I am going to chech the solution proposed for you, and I will tell you about
> the result obtained.
> I thought the problem could be the user used to loggin in the target
> machine, but I was not sure about this issue.
> On the other hand, I did not know the log file and this it will be very
> usefull for me :-)
>
> Thanks a lot for your repliy.
> Jose
>
> El 23/01/2014 16:25, Ignasi Barrera escribió:
>
> Hi Jose,
>
> I've executed the examples with AWS and they were failing. The issue
> was in the template selection. I've changed that to make sure it picks
> an Ubuntu template and also configured the default login to use sudo,
> to avoid permission problems. This should make the examples work out
> of the box. I've also upgraded the examples to use jclouds 1.7.0, and
> configured them to install Chef using the Omnibus installer instead of
> using the gems.
>
> I've executed the examples again with the changes and the default
> command, as you did, and it worked for me. By default it will install
> the Apache web server. However, the service did not start, but the
> cause was a misconfiguration of the cookbook. If you find the same
> issues you can try with other cookbooks like mysql or so (note that
> you may have to open ports in the template if you install certain
> coobooks (such as the apache one) if you want to be able to access the
> web server).
>
> If you want to see the complete output of the script, just access the
> node via SSH and go to: /tmp/jclouds*. There you'll find a file with
> the output of the bootstrap script. Also note that jclouds will create
> a new user and install your SSH key, so just a "ssh <node ip>" should
> be enough to access the node.
>
>
>
> HTH!
>
> Ignasi
>
> On 23 January 2014 14:46, Andrew Phillips <andrewp@apache.org> wrote:
>
> Hi Jose
>
> I'm not the Chef expert here, but just to clarify: the output you pasted was
> from
>
>
> java -jar target/chef-basics-jar-with-dependencies.jar aws-ec2 accesskey
> secretkey mygroup add
>
> or
>
> java -jar target/chef-basics-jar-with-dependencies.jar aws-ec2 accesskey
> secretkey mygroup solo
>
> ? And I'm assuming you have '~/.ssh/id_rsa' (or equivalent on a Windows
> machine) present, as described in the README [1]?
>
> Regards
>
> ap
>
> [1] https://github.com/jclouds/jclouds-examples/tree/master/chef-basics
>
>
>

Mime
View raw message