[chef] Application cookbook/bitbucket problem


Chronological Thread 
  • From: Jim Fluke < >
  • To:
  • Subject: [chef] Application cookbook/bitbucket problem
  • Date: Tue, 16 Sep 2014 11:40:46 -0600

Hello,

I am trying to install a local application from bitbucket to a Ubuntu 14.04 virtualBox VM. I keep getting an error on the keys for the ssh connection, but I can't see what is wrong with how I specify the private key. I have attached the Vagrant and cookbook files I am using. My cookbook is called CIRAdataApp and I am installing it to our local chef server.

Also note that the repository is under a bitbucket group account, cira-dpc, but that my ssh key is under my personal account. But, I have been able to check out the repository using this key pair with git commands on my desktop.

And here is the last part of the chef-client output with the git error:

Running handlers:
[2014-09-16T16:54:12+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-09-16T16:54:12+00:00] ERROR: Exception handlers complete
[2014-09-16T16:54:12+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 3 resources updated in 25.022724174 seconds
[2014-09-16T16:54:12+00:00] ERROR: deploy_revision[CIRAdataApp] (/var/chef/cache/cookbooks/application/providers/default.rb line 122) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '128'
---- Begin output of git ls-remote " :cira-dpc/api.ciradata.edu.git" "HEAD" ----
STDOUT:
STDERR: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
---- End output of git ls-remote " :cira-dpc/api.ciradata.edu.git" "HEAD" ----
Ran git ls-remote " :cira-dpc/api.ciradata.edu.git" "HEAD" returned 128
[2014-09-16T16:54:12+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)


Any help would be appreciated.

Thanks,
Jim
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "trusty64"
  config.vm.box_url = 
"http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box";
  config.vm.hostname = "testChefCsp3-4" # vagrant 1.2.2

  config.vm.provider :virtualbox do |vb| 
    vb.customize ["modifyvm", :id, "--memory", "4096"] 
  end 

  config.vm.network :forwarded_port, guest: 22, host: 2228, id: "ssh"
  
  config.vm.network :forwarded_port, guest: 80, host: 9098

  config.vm.network "public_network", ip: "10.0.10.20", bridge: "eth0", 
:netmask => "255.255.0.0"
  #config.vm.network "public_network", bridge: "eth0"

  config.vm.provision "shell", path: "./setupTrusty.sh"

end

Attachment: setupTrusty.sh
Description: application/shellscript

Attachment: metadata.rb
Description: application/ruby

Attachment: recipesDefault.rb
Description: application/ruby

Attachment: bootstrap3-4.sh
Description: application/shellscript




Archive powered by MHonArc 2.6.16.

§