Micro commands not found in micro bosh deployer

160 views
Skip to first unread message

Dhruv Kapil

unread,
Jan 29, 2013, 5:24:29 PM1/29/13
to bosh-...@cloudfoundry.org, bosh...@cloudfoundry.org
Hi All,

I tried to install the micro bosh deployer by following the steps at the below link. but i am getting the below errors when trying to run any micro command, but other commands are working fine. In some commands, it is asking me to set the Director target. Please see below. 

I also tried to run  "gem update --system" as well, but it says "Latest version currently installed. Aborting."


ubuntu@ip-10-29-204-150:~/deployments$ bosh micro deployment aws
Cannot load plugins, please run `gem update --system' to update your RubyGems
Unknown command: micro deployment aws
--------------------------------------------------------------------------------------------------------------------------------
ubuntu@ip-10-29-204-150:~/deployments$ gem update --system
Latest version currently installed. Aborting.
--------------------------------------------------------------------------------------------------------------------------------
ubuntu@ip-10-29-204-150:~/deployments$ bosh status
Cannot load plugins, please run `gem update --system' to update your RubyGems
Director
  not set

Deployment
  not set
--------------------------------------------------------------------------------------------------------------------------------
ubuntu@ip-10-29-204-150:~/deployments$ bosh public stemcells
Cannot load plugins, please run `gem update --system' to update your RubyGems
+---------------------------------------+------------------------+
| Name                                  | Tags                   |
+---------------------------------------+------------------------+
| bosh-stemcell-aws-0.6.4.tgz           | aws, stable            |
| bosh-stemcell-vsphere-0.6.4.tgz       | vsphere, stable        |
| bosh-stemcell-vsphere-0.6.7.tgz       | vsphere, stable        |
| micro-bosh-stemcell-aws-0.6.4.tgz     | aws, micro, stable     |
| micro-bosh-stemcell-vsphere-0.6.4.tgz | vsphere, micro, stable |
+---------------------------------------+------------------------+
To download use `bosh download public stemcell <stemcell_name>'. For full url use --full.

--------------------------------------------------------------------------------------------------------------------------------


Please let me know what could be the problem.

Dhruv Kapil

unread,
Jan 29, 2013, 5:25:38 PM1/29/13
to bosh-...@cloudfoundry.org, bosh...@cloudfoundry.org

Dr Nic Williams

unread,
Jan 29, 2013, 5:25:58 PM1/29/13
to bosh-...@cloudfoundry.org
Can you us the list of bosh gems you have installed? ("gem list bosh")
--

Dhruv Kapil

unread,
Jan 29, 2013, 5:36:32 PM1/29/13
to bosh-...@cloudfoundry.org
Here is the list of installed gems

ubuntu@ip-10-29-204-150:~/deployments$ gem list bosh

*** LOCAL GEMS ***

bosh_aws_cpi (0.7.0)
bosh_aws_registry (0.2.3)
bosh_cli (1.0.3)
bosh_common (0.5.4)
bosh_cpi (0.5.1)
bosh_deployer (1.4.0)
bosh_openstack_cpi (0.0.7)
bosh_openstack_registry (0.0.5)
bosh_vcloud_cpi (0.4.9)
bosh_vsphere_cpi (0.6.0)

Dhruv Kapil

unread,
Jan 29, 2013, 11:03:00 PM1/29/13
to bosh-...@cloudfoundry.org
Hi,

Please help me get out of this problem. Why i am not able to run the micro commands after installing micro bosh deployer.


Below is the list of running "bosh help". I could not see micro command in the list.

ubuntu@ip-10-29-204-150:~/deployments$ bosh help
Cannot load plugins, please run `gem update --system' to update your RubyGems
BOSH CLI helps you manage your BOSH deployments and releases.

Usage: bosh [<options>] <command> [<args>]
    -c, --config FILE                Override configuration file
    -C, --cache-dir DIR              Override cache directory
        --[no-]color                 Toggle colorized output
    -v, --verbose                    Show additional output
    -q, --quiet                      Suppress all output
    -n, --non-interactive            Don't ask for user input
    -N, --no-track                   Return Task ID and don't track
    -t, --target URL                 Override target
    -u, --user USER                  Override username
    -p, --password PASSWORD          Override password
    -d, --deployment FILE            Override deployment

The most commonly used BOSH commands are:
  target                        Point CLI to BOSH Director
  deployment                    Set deployment
  status                        Current status
  create release                Create new release
  upload release                Upload release
  upload stemcell               Upload stemcell image
  deploy                        Perform deployment
  task <task_id>                Track task / show task log
  tasks                         List running tasks
  tasks recent                  List recent tasks
  cloudcheck                    Find and resolve deployment problems
  deployments                   List deployments
  releases                      List releases
  start,restart,recreate,stop   Job management
  add blob                      Add large binary file to release

You can run 'bosh help <keywords...>' to see different commands,
i.e. 'bosh help release', 'bosh help cloudcheck'.
Or run 'bosh help --all' to see all available BOSH commands

Martin Englund

unread,
Jan 29, 2013, 11:50:03 PM1/29/13
to bosh-...@cloudfoundry.org
Try:
bosh help --all

/M

Sent from my iPhone

Dr Nic Williams

unread,
Jan 29, 2013, 11:51:44 PM1/29/13
to bosh-...@cloudfoundry.org
Also, what does "gem env" show?

Dhruv Kapil

unread,
Jan 30, 2013, 12:59:26 AM1/30/13
to bosh-...@cloudfoundry.org
Below is the output for "bosh help -all"

root@ip-10-29-204-150:/home/ubuntu# bosh help --all
Cannot load plugins, please run `gem update --system' to update your RubyGems
/usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/command_handler.rb:67:in `usage_with_params': undefined method `parameters' for #<UnboundMethod: Bosh::Cli::Command::BlobManagement#add> (NoMethodError)
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/commands/help.rb:91:in `list_commands'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `each_with_index'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/commands/help.rb:88:in `each'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/commands/help.rb:88:in `each_with_index'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/commands/help.rb:88:in `list_commands'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/commands/help.rb:81:in `keyword_help'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/commands/help.rb:22:in `help'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/command_handler.rb:57:in `send'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/command_handler.rb:57:in `run'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/runner.rb:61:in `run'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/lib/cli/runner.rb:18:in `run'
        from /usr/lib/ruby/gems/1.8/gems/bosh_cli-1.0.3/bin/bosh:16
        from /usr/bin/bosh:23:in `load'
        from /usr/bin/bosh:23


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

& output of "gem env" is 

root@ip-10-29-204-150:/home/ubuntu# gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.25
  - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:


Dr Nic Williams

unread,
Jan 30, 2013, 1:08:25 AM1/30/13
to bosh-users
I don't think we technically require ruby 1.9; but if its convenient can you upgrade to ruby 1.9?

Martin, could we have a ruby 1.8 regression in the plugin loading code?

Dhruv Kapil

unread,
Jan 30, 2013, 2:23:20 AM1/30/13
to bosh-...@cloudfoundry.org
Hi Dr. Nic,

I updated the ruby version to 1.9. but this time i got some different error, please see below the output. Below is the output of 'gen env' too.


ubuntu@ip-10-28-247-242:~/deployments$ bosh micro deployment aws
Failed to load plugin gems/bosh_deployer-1.4.0/lib/bosh/cli/commands/micro.rb: no such file to load -- openssl
File gems/bosh_deployer-1.4.0/lib/bosh/cli/commands/micro.rb has been loaded as
plugin but it didn't contain any commands. Make sure this plugin is updated to
be compatible with BOSH CLI 1.0.
Unknown command: micro deployment aws



ubuntu@ip-10-28-247-242:~/deployments$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.25
  - RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/bin/ruby1.9.1
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.9.1
     - /home/ubuntu/.gem/ruby/1.9.1

Dr Nic Williams

unread,
Jan 30, 2013, 2:26:14 AM1/30/13
to bosh-users
Sorry, I should be more specific. Ruby 1.9.1 is very old. You're looking for a Ruby 1.9.3 release. Your "gem env" will then include something like:

  - RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [x86_64-linux]


Dhruv Kapil

unread,
Jan 30, 2013, 5:15:21 AM1/30/13
to bosh-...@cloudfoundry.org
Thanks Dr. Nic. I have got it working by installing Ruby 1.9.3. :)

Dhruv Kapil

unread,
Jan 30, 2013, 6:46:55 AM1/30/13
to bosh-...@cloudfoundry.org
Hi,

I have got the bosh_deployer working by installing Ruby 1.9.3
But now when i am trying to deploy the ami, it is waiting endlessly as shown below

ubuntu@ip-10-29-3-241:~/deployments$ bosh micro deploy ami-69dd6900
Deploying new micro BOSH instance `aws/micro_bosh.yml' to `http://aws:25555' (type 'yes' to continue): yes

Deploy Micro BOSH
  using existing stemcell (00:00:00)
  creating VM from ami-69dd6900 (00:00:44)
Waiting for the agent               |oooo                    | 2/11 00:15:41  ETA: --:--:--


Then i checked the bosh_micro_deploy.log file.
It is not able to ssh to that particular instance as it is using vcap user by default, please see below the error messages

D, [2013-01-30T11:16:05.183942 #650] [0x10f0734] DEBUG -- : ssh start vc...@54.235.172.252 failed: #<OpenSSL::PKey::PKeyError: not a private key (/home/ubuntu/.ssh/bosh)>
D, [2013-01-30T11:16:06.619390 #650] [0x10f0734] DEBUG -- : ssh start vc...@54.235.172.252 failed: #<OpenSSL::PKey::PKeyError: not a private key (/home/ubuntu/.ssh/bosh)>
D, [2013-01-30T11:16:07.938568 #650] [0x10f0734] DEBUG -- : ssh start vc...@54.235.172.252 failed: #<OpenSSL::PKey::PKeyError: not a private key (/home/ubuntu/.ssh/bosh)>
D, [2013-01-30T11:16:09.290656 #650] [0x10f0734] DEBUG -- : ssh start vc...@54.235.172.252 failed: #<OpenSSL::PKey::PKeyError: not a private key (/home/ubuntu/.ssh/bosh)>

I have not given the vcap user anywhere in the manifest file, I think bosh_deployer is by default taking the user as vcap. could you please let me know where can i override the user.


After waiting for 20 mins, i done the ctrl+c, & then checked the log file. There were hundreds of above error messages & at the end,

D, [2013-01-30T11:32:29.636001 #650] [0x10f0734] DEBUG -- : ssh start vc...@54.235.172.252 failed: #<OpenSSL::PKey::PKeyError: not a private key (/home/ubuntu/.ssh/bosh)>
I, [2013-01-30T11:42:43.858858 #690] [0xb08f38]  INFO -- : Loading existing deployment data from: /home/ubuntu/deployments/bosh-deployments.yml
I, [2013-01-30T11:42:48.330077 #690] [0xb08f38]  INFO -- : [AWS EC2 200 0.119136 0 retries] describe_addresses(:filters=>[{:name=>"instance-id",:values=>["i-ac5af1dc"]}])  

I, [2013-01-30T11:42:48.401980 #690] [0xb08f38]  INFO -- : [AWS EC2 200 0.071055 0 retries] describe_addresses(:filters=>[{:name=>"instance-id",:values=>["i-ac5af1dc"]}])  

I, [2013-01-30T11:42:48.402225 #690] [0xb08f38]  INFO -- : discovered bosh ip=54.235.172.252
I, [2013-01-30T11:42:48.471660 #690] [0xb08f38]  INFO -- : [AWS EC2 200 0.068685 0 retries] describe_addresses(:filters=>[{:name=>"instance-id",:values=>["i-ac5af1dc"]}])  

I, [2013-01-30T11:42:48.542662 #690] [0xb08f38]  INFO -- : [AWS EC2 200 0.070406 0 retries] describe_addresses(:filters=>[{:name=>"instance-id",:values=>["i-ac5af1dc"]}])  

I, [2013-01-30T11:42:48.615673 #690] [0xb08f38]  INFO -- : [AWS EC2 200 0.070835 0 retries] describe_addresses(:filters=>[{:name=>"instance-id",:values=>["i-ac5af1dc"]}])  

I, [2013-01-30T11:42:48.688650 #690] [0xb08f38]  INFO -- : [AWS EC2 200 0.072403 0 retries] describe_addresses(:filters=>[{:name=>"instance-id",:values=>["i-ac5af1dc"]}])  


NOTE: I am to able to ssh to that particular instance by entering vcap as user


Regards,
Dhruv Kapil

Dr Nic Williams

unread,
Jan 30, 2013, 11:27:10 AM1/30/13
to bosh-users
Did you get this resolved? Another email thread suggestions you did. What was the fix?

Dhruv Kapil

unread,
Jan 30, 2013, 12:00:24 PM1/30/13
to bosh-...@cloudfoundry.org, bosh-users
This problem is not resolved till now. Not able to get the root cause.

Sorry Dr. Nic, i just installed ruby 1.9.3, it just resolved my problem of the bosh micro command not running. I sent another mail in haste Without verifying the complete installation.

After that when i tried to run any command, it asked me to set the target. When i tried to set the target, it says me "connection refused". Then i checked the logs & found that Micro bosh was not properly installed. 

Do you have any idea about this problem?

Sent from my iPhone

Dhruv Kapil

unread,
Jan 31, 2013, 12:28:27 AM1/31/13
to bosh-...@cloudfoundry.org
Hi, 

Anyone who could help me with this issue. Is this something to do with net-ssh gem used in bosh deployer?
Stuck at this point. A little help or the direction is appreciated.

Regards,
Dhruv Kapil

Martin Englund

unread,
Jan 31, 2013, 1:16:51 AM1/31/13
to bosh-...@cloudfoundry.org
The logs suggest that the ssh private key file you point to in your micro_bosh.yml is incorrect

/M

cheers,
/Martin
--
Martin Englund, Staff Engineer, Cloud Foundry, VMware Inc.
"The question is not if you are paranoid, it is if you are paranoid enough."

Dhruv Kapil

unread,
Jan 31, 2013, 2:01:03 AM1/31/13
to bosh-...@cloudfoundry.org
Hi Martin,

I replaced the ssh private key & it has passed from that point. it has created the instance, created the volume & mounted the volume (as logs suggested). but now its failing at some other point, its not able to find one method. Below is the stack trace from the Console.


ubuntu@ip-10-29-3-241:~/deployments$ bosh micro deploy ami-69dd6900
Deploying new micro BOSH instance `aws/micro_bosh.yml' to `http://aws:25555' (type 'yes' to continue): yes

Deploy Micro BOSH
  using existing stemcell (00:00:00)
  creating VM from ami-69dd6900 (00:00:46)
  waiting for the agent (00:03:06)
  create disk (00:01:18)
  mount disk (00:00:29)
  fetching apply spec (00:00:00)
  stopping agent services (00:00:01)
Applying micro BOSH spec            |ooooooooooooooo         | 7/11 00:05:52  ETA: 00:03:04/usr/local/lib/ruby/gems/1.9.1/gems/agent_client-0.1.1/lib/agent_client/base.rb:19:in `method_missing': {"message"=>"Failed to install job 'micro_aws': failed to process configuration template 'director/director.yml.erb': line 78, error: undefined method `kernel_id' for nil:NilClass: [\"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:228:in `install_failed'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:114:in `rescue in block in bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:106:in `block in bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:97:in `each_pair'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:97:in `bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:41:in `install'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/plan.rb:59:in `install_job'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:112:in `apply_job'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:72:in `apply'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:10:in `process'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:274:in `process'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:259:in `process_long_running'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:181:in `block in process_in_thread'\", \"<internal:prelude>:10:in `synchronize'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:179:in `process_in_thread'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:160:in `block in handle_message'\"]", "backtrace"=>["/var/vcap/bosh/agent/lib/agent/message/apply.rb:78:in `rescue in apply'", "/var/vcap/bosh/agent/lib/agent/message/apply.rb:70:in `apply'", "/var/vcap/bosh/agent/lib/agent/message/apply.rb:10:in `process'", "/var/vcap/bosh/agent/lib/agent/handler.rb:274:in `process'", "/var/vcap/bosh/agent/lib/agent/handler.rb:259:in `process_long_running'", "/var/vcap/bosh/agent/lib/agent/handler.rb:181:in `block in process_in_thread'", "<internal:prelude>:10:in `synchronize'", "/var/vcap/bosh/agent/lib/agent/handler.rb:179:in `process_in_thread'", "/var/vcap/bosh/agent/lib/agent/handler.rb:160:in `block in handle_message'"]} (Bosh::Agent::HandlerError)
        from /usr/local/lib/ruby/gems/1.9.1/gems/agent_client-0.1.1/lib/agent_client/base.rb:10:in `run_task'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:352:in `block in apply'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:84:in `step'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:350:in `apply'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:158:in `create'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:104:in `block in create_deployment'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:97:in `with_lifecycle'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:103:in `create_deployment'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/bosh/cli/commands/micro.rb:171:in `perform'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/command_handler.rb:57:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/runner.rb:61:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/runner.rb:18:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/bin/bosh:16:in `<top (required)>'
        from /usr/local/bin/bosh:23:in `load'
        from /usr/local/bin/bosh:23:in `<main>'




Dhruv Kapil

unread,
Jan 31, 2013, 11:01:22 AM1/31/13
to bosh-...@cloudfoundry.org
Hi,

Could anyone please let me know what could be this issue. Do i have to override some specification? why it is saying me method missing?

Regards,
Dhruv Kapil

Dr Nic Williams

unread,
Jan 31, 2013, 11:31:41 AM1/31/13
to bosh-...@cloudfoundry.org
Your micro_bosh.yml is missing a property and its parent property.

failed to process configuration template 'director/director.yml.erb': line 78, error: undefined method `kernel_id' 

Look in bosh-bootstrap source for where it builds its micro_bosh.yml and you'll see where the kernel_id should go.

 I don't think you need kernel_id but you do need its parent property. Sorry for the half help, I'm waiting for a train :)

On Thursday, January 31, 2013, Dhruv Kapil wrote:
Hi,

Could anyone please let me know what could be this issue. Do i have to override some specification? why it is saying me method missing?

Regards,
Dhruv Kapil


On 31 January 2013 12:31, Dhruv Kapil <dhruv....@gmail.com> wrote:
Hi Martin,

I replaced the ssh private key & it has passed from that point. it has created the instance, created the volume & mounted the volume (as logs suggested). but now its failing at some other point, its not able to find one method. Below is the stack trace from the Console.


ubuntu@ip-10-29-3-241:~/deployments$ bosh micro deploy ami-69dd6900
Deploying new micro BOSH instance `aws/micro_bosh.yml' to `http://aws:25555' (type 'yes' to continue): yes

Deploy Micro BOSH
  using existing stemcell (00:00:00)
  creating VM from ami-69dd6900 (00:00:46)
  waiting for the agent (00:03:06)
  create disk (00:01:18)
  mount disk (00:00:29)
  fetching apply spec (00:00:00)
  stopping agent services (00:00:01)
Applying micro BOSH spec            |ooooooooooooooo         | 7/11 00:05:52  ETA: 00:03:04/usr/local/lib/ruby/gems/1.9.1/gems/agent_client-0.1.1/lib/agent_client/base.rb:19:in `method_missing': {"message"=>"Failed to install job 'micro_aws': failed to process configuration template 'director/director.yml.erb': line 78, error: undefined method `kernel_id' for nil:NilClass: [\"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:228:in `install_failed'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:114:in `rescue in block in bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:106:in `block in bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:97:in `each_pair'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:97:in `bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:41:in `install'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/plan.rb:59:in `install_job'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:112:in `apply_job'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:72:in `apply'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:10:in `process'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:274:in `process'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:259:in `process_long_running'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:181:in `block in process_in_thread'\", \"<internal:prelude>:10:in `synchronize'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:179:in `process_in_thread'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:160:in `block in handle_message'\"]", "backtrace"=>["/var/vcap/bosh/agent/lib/agent/message/apply.rb:78:in `rescue in apply'", "/var/vcap/bosh/agent/lib/agent/message/apply.rb:70:in `apply'", "/var/vcap/bosh/agent/lib/agent/message/apply.rb:10:in `process'", "/var/vcap/bosh/agent/lib/agent/handler.rb:274:in `process'", "/var/vcap/bosh/agent/lib/agent/handler.rb:259:in `process_long_running'", "/var/vcap/bosh/agent/lib/agent/handler.rb:181:in `block in process_in_thread'", "<internal:prelude>:10:in `synchronize'", "/var/vcap/bosh/agent/lib/agent/handler.rb:179:in `process_in_thread'", "/var/vcap/bosh/agent/lib/agent/handler.rb:160:in `block in handle_message'"]} (Bosh::Agent::HandlerError)
        from /usr/local/lib/ruby/gems/1.9.1/gems/agent_client-0.1.1/lib/agent_client/base.rb:10:in `run_task'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:352:in `block in apply'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/de


Dhruv Kapil

unread,
Jan 31, 2013, 12:42:38 PM1/31/13
to bosh-...@cloudfoundry.org
Hi Dr. Nic,

Appreciate your help. I have added the kernel_id inside cloud.properties.stemcell.kernel_id (value taken from AMI), but its giving me the same problem.


---

name: aws

 

env:

  bosh:

    password: password

 

logging:

  level: DEBUG

 

network:

  type: dynamic

  vip: IP

 

resources:

  persistent_disk: 20000

  cloud_properties:

    instance_type: m1.small

    availability_zone: us-east-1a

 

cloud:

  plugin: aws

  properties:

    aws:

      access_key_id: KEY

      secret_access_key: SECRET

      default_key_name: bosh

      default_security_groups: ["bosh"]

      ec2_private_key: ~/.ssh/bosh

      ec2_endpoint: ec2.us-east-1.amazonaws.com

    stemcell:

      kernel_id: aki-8e5ea7e7

 

apply_spec:

  agent:

    blobstore:

      address: IP

    nats:

      address: IP

  properties:

    aws_registry:

      address: IP


Regards,

Dhruv Kapil

Dr Nic Williams

unread,
Jan 31, 2013, 12:58:28 PM1/31/13
to bosh-users
My micro_bosh.yml is at https://gist.github.com/4684823

I don't seem to need the stemcell.kernel_id part.

When you "bosh micro deploy", are you using the very latest aws microbosh stemcell? (0.8.1) micro-bosh-stemcell-aws-0.8.1.tgz

Perhaps next time, can you use bosh-bootstrap? At least I know how it works :D

Dhruv Kapil

unread,
Jan 31, 2013, 2:03:41 PM1/31/13
to bosh-...@cloudfoundry.org

Hi Dr. Nic,

I added kernel_id thinking that it might solve the problem.

I am using ami-69dd6900 for us-east1 region as mentioned on the link. 

By following the steps on the mentioned blog, I have reached to a particular level. :)
if the problem is not resolved, I will try bosh-bootstrap as well. 

Martin Englund : Could you please throw some light on this. Is there any parameter i am not passing in the config file?

Regards,
Dhruv Kapil

Dr Nic Williams

unread,
Jan 31, 2013, 2:12:07 PM1/31/13
to bosh-users
Are you using the latest microbosh stemcell?

Dhruv Kapil

unread,
Jan 31, 2013, 2:17:26 PM1/31/13
to bosh-...@cloudfoundry.org
Hi Dr. Nic,

I am not using any stemcell. I have just given the AMI id as mentioned below.

bosh micro deployment aws
& then
bosh micro deploy ami-69dd6900

I just followed the steps given on that link. It was not mentioned anywhere to use the stemcell.

Dr Nic Williams

unread,
Jan 31, 2013, 3:01:02 PM1/31/13
to bosh-users
AAAHHHHHH. 

Martin, can we remove those AMIs? :)

Dhruv, I'm not sure what you're options are - I think you'll need to install specific older versions of bosh_cli and bosh_deployer gems, is my guess, to go with the old stemcell (which is backed into an AMI). The public AMIs in Martin's blog post map to the 0.6.4 microbosh stemcells from 4 months ago, or so.

Instead:

bosh public stemcells --tag aws,micro
bosh download stemcell <name.tgz>
bosh micro deploy <name.tgz>

Dhruv Kapil

unread,
Jan 31, 2013, 3:28:45 PM1/31/13
to bosh-...@cloudfoundry.org
Hi Dr. Nic,

The same error is coming while downloading & installing from stemcell. I tool the 0.6.4 stemcell as it was the stable version.
I think there is some bug in the bosh deployer itself.
Below is the output.

ubuntu@ip-10-29-3-241:~/deployments$ sudo bosh micro deploy micro-bosh-stemcell-aws-0.6.4.tgz
Deploying new micro BOSH instance `aws/micro_bosh.yml' to `http://aws:25555' (type 'yes' to continue): yes

Verifying stemcell...
File exists and readable                                     OK
Manifest not found in cache, verifying tarball...
Extract tarball                                              OK
Manifest exists                                              OK
Stemcell image file                                          OK
Writing manifest to cache...
Stemcell properties                                          OK

Stemcell info
-------------
Name:    micro-bosh-stemcell
Version: 0.6.4


Deploy Micro BOSH
  unpacking stemcell (00:00:13)
  uploading stemcell (00:09:48)
  creating VM from ami-236bff4a (00:00:34)
  waiting for the agent (00:02:55)
  create disk (00:00:00)
  mount disk (00:00:39)
  stopping agent services (00:00:01)
Applying micro BOSH spec            |ooooooooooooooo         | 7/11 00:14:23  ETA: 00:07:56/usr/local/lib/ruby/gems/1.9.1/gems/agent_client-0.1.1/lib/agent_client/base.rb:19:in `method_missing': {"message"=>"Failed to install job 'micro_aws': failed to process configuration template 'director/director.yml.erb': line 78, error: undefined method `kernel_id' for nil:NilClass: [\"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:228:in `install_failed'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:114:in `rescue in block in bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:106:in `block in bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:97:in `each_pair'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:97:in `bind_configuration'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/job.rb:41:in `install'\", \"/var/vcap/bosh/agent/lib/agent/apply_plan/plan.rb:59:in `install_job'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:112:in `apply_job'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:72:in `apply'\", \"/var/vcap/bosh/agent/lib/agent/message/apply.rb:10:in `process'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:274:in `process'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:259:in `process_long_running'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:181:in `block in process_in_thread'\", \"<internal:prelude>:10:in `synchronize'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:179:in `process_in_thread'\", \"/var/vcap/bosh/agent/lib/agent/handler.rb:160:in `block in handle_message'\"]", "backtrace"=>["/var/vcap/bosh/agent/lib/agent/message/apply.rb:78:in `rescue in apply'", "/var/vcap/bosh/agent/lib/agent/message/apply.rb:70:in `apply'", "/var/vcap/bosh/agent/lib/agent/message/apply.rb:10:in `process'", "/var/vcap/bosh/agent/lib/agent/handler.rb:274:in `process'", "/var/vcap/bosh/agent/lib/agent/handler.rb:259:in `process_long_running'", "/var/vcap/bosh/agent/lib/agent/handler.rb:181:in `block in process_in_thread'", "<internal:prelude>:10:in `synchronize'", "/var/vcap/bosh/agent/lib/agent/handler.rb:179:in `process_in_thread'", "/var/vcap/bosh/agent/lib/agent/handler.rb:160:in `block in handle_message'"]} (Bosh::Agent::HandlerError)
        from /usr/local/lib/ruby/gems/1.9.1/gems/agent_client-0.1.1/lib/agent_client/base.rb:10:in `run_task'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:352:in `block in apply'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:84:in `step'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:350:in `apply'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:158:in `create'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:104:in `block in create_deployment'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:97:in `with_lifecycle'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:103:in `create_deployment'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/bosh/cli/commands/micro.rb:171:in `perform'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/command_handler.rb:57:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/runner.rb:61:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/runner.rb:18:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/bin/bosh:16:in `<top (required)>'
        from /usr/local/bin/bosh:23:in `load'
        from /usr/local/bin/bosh:23:in `<main>'


Regards,
Dhruv Kapil

Dr Nic Williams

unread,
Jan 31, 2013, 3:29:34 PM1/31/13
to bosh-...@cloudfoundry.org
Sorry, don't download the 0.6.4 stemcell. It's old (like the AMI). You want 0.8.1.

Dhruv Kapil

unread,
Jan 31, 2013, 3:58:55 PM1/31/13
to bosh-...@cloudfoundry.org
Hi Dr. Nic,

I tried 0.8.1 as well, but this is giving me some other problem. Below is the same.
Now i am going to try 0.7.0 version which is the last option.

ubuntu@ip-10-29-3-241:~/deployments$ bosh micro deploy micro-bosh-stemcell-aws-0.8.1.tgz
Deploying new micro BOSH instance `aws/micro_bosh.yml' to `http://54.235.172.252:25555' (type 'yes' to continue): ^C
Exiting...
ubuntu@ip-10-29-3-241:~/deployments$ bosh micro deploy micro-bosh-stemcell-aws-0.8.1.tgz
Deploying new micro BOSH instance `aws/micro_bosh.yml' to `http://54.235.172.252:25555' (type 'yes' to continue): yes
.
Verifying stemcell...
File exists and readable                                     OK
Using cached manifest...
Stemcell properties                                          OK

Stemcell info
-------------
Name:    micro-bosh-stemcell
Version: 0.8.1


Deploy Micro BOSH
  unpacking stemcell (00:00:18)
Uploading stemcell                  |oo                      | 1/11 00:02:08  ETA: 00:01:17/usr/local/lib/ruby/gems/1.9.1/gems/bosh_aws_cpi-0.7.0/lib/cloud/aws/helpers.rb:16:in `cloud_error': Unable to copy stemcell root image, exit status 1: dd: opening `/dev/sdf': Permission denied (Bosh::Clouds::CloudError)
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_aws_cpi-0.7.0/lib/cloud/aws/cloud.rb:669:in `copy_root_image'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_aws_cpi-0.7.0/lib/cloud/aws/cloud.rb:340:in `block in create_stemcell'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_common-0.5.4/lib/common/thread_formatter.rb:46:in `with_thread_name'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_aws_cpi-0.7.0/lib/cloud/aws/cloud.rb:324:in `create_stemcell'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:215:in `block (2 levels) in create_stemcell'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:84:in `step'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:214:in `block in create_stemcell'
        from /usr/local/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:200:in `create_stemcell'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:128:in `create'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:104:in `block in create_deployment'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:97:in `with_lifecycle'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/deployer/instance_manager.rb:103:in `create_deployment'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_deployer-1.4.0/lib/bosh/cli/commands/micro.rb:171:in `perform'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/command_handler.rb:57:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/runner.rb:61:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/lib/cli/runner.rb:18:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/bosh_cli-1.0.3/bin/bosh:16:in `<top (required)>'
        from /usr/local/bin/bosh:23:in `load'
        from /usr/local/bin/bosh:23:in `<main>'

Regards,
Dhruv Kapil

Dr Nic Williams

unread,
Jan 31, 2013, 4:00:57 PM1/31/13
to bosh-users
That's a very different error from before. The original error was because you were using newer bosh_cli/bosh_deployer code with an old stemcell & old job templates. This new error is new.

Unable to copy stemcell root image, exit status 1: dd: opening `/dev/sdf': Permission denied (Bosh::Clouds::CloudError)

I think you need to run "bosh micro deploy" as root user. That might give you the permissions to mount temporary volumes on your inception VM.

Dhruv Kapil

unread,
Jan 31, 2013, 4:34:47 PM1/31/13
to bosh-...@cloudfoundry.org
Thanks a ton Dr. Nic. Finally i have successfully deployed the micro bosh. :D

By default, the user to the new vm is given as vcap. what is the default password for root.
Is there any way that i could override these settings.

I also asked (in another thread) about the way to Install Full BOSH release from micro bosh. Could you please provide me any such documentation. 
As i have to install BOSH & CF & then test it on Production environment as well.
Micro Bosh -> BOSH -> CF-release


Dr Nic Williams

unread,
Jan 31, 2013, 4:47:10 PM1/31/13
to bosh-users
The default microbosh password for vcap is c1oudc0w. It can be overridden via config in micro_bosh.yml. Look in the mailing for it (sorry, can't remember).

I don't condone the need for a full bosh for new people. Go an install CF and enjoy that first :)

Nic

Dhruv Kapil

unread,
Jan 31, 2013, 4:57:04 PM1/31/13
to bosh-...@cloudfoundry.org
Sure Dr. Nic. Now i will try to install cf-release. :)

Dhruv Kapil

unread,
Jan 31, 2013, 5:05:30 PM1/31/13
to bosh-...@cloudfoundry.org
Hi Dr. Nic,

Where can i find the documentation for installing cf-release & which is the latest version.
Is there any sample config file for the cf-release deployment. & like micro bosh stemcell, do we have any such stemcell for cf-release.

Regards,
Dhruv Kapil

Dr Nic Williams

unread,
Jan 31, 2013, 5:11:05 PM1/31/13
to bosh-users
Message has been deleted

ggr...@rbcon.com

unread,
Feb 27, 2013, 3:55:18 PM2/27/13
to bosh...@cloudfoundry.org, bosh-...@cloudfoundry.org, prince.p...@gmail.com
Hi Dhruv, I believe you're beyond this point now, but if you need any additional information on this subject, please let me know and I will follow it up. Gary

On Thursday, February 14, 2013 9:54:20 PM UTC-8, prince.p...@gmail.com wrote:
Show the output for

1. gem list
2. bosh help micro

- Pradeep

On Wednesday, January 30, 2013 3:54:29 AM UTC+5:30, Dhruv Kapil wrote:
Hi All,

I tried to install the micro bosh deployer by following the steps at the below link. but i am getting the below errors when trying to run any micro command, but other commands are working fine. In some commands, it is asking me to set the Director target. Please see below. 

I also tried to run  "gem update --system" as well, but it says "Latest version currently installed. Aborting."


ubuntu@ip-10-29-204-150:~/deployments$ bosh micro deployment aws
Cannot load plugins, please run `gem update --system' to update your RubyGems
Unknown command: micro deployment aws
--------------------------------------------------------------------------------------------------------------------------------
ubuntu@ip-10-29-204-150:~/deployments$ gem update --system
Latest version currently installed. Aborting.
--------------------------------------------------------------------------------------------------------------------------------
ubuntu@ip-10-29-204-150:~/deployments$ bosh status
Cannot load plugins, please run `gem update --system' to update your RubyGems
Director
  not set

Deployment
  not set
--------------------------------------------------------------------------------------------------------------------------------
ubuntu@ip-10-29-204-150:~/deployments$ bosh public stemcells
Cannot load plugins, please run `gem update --system' to update your RubyGems
+---------------------------------------+------------------------+
| Name                                  | Tags                   |
+---------------------------------------+------------------------+
| bosh-stemcell-aws-0.6.4.tgz           | aws, stable            |
| bosh-stemcell-vsphere-0.6.4.tgz       | vsphere, stable        |
| bosh-stemcell-vsphere-0.6.7.tgz       | vsphere, stable        |
| micro-bosh-stemcell-aws-0.6.4.tgz     | aws, micro, stable     |
| micro-bosh-stemcell-vsphere-0.6.4.tgz | vsphere, micro, stable |
+---------------------------------------+------------------------+
To download use `bosh download public stemcell <stemcell_name>'. For full url use --full.

--------------------------------------------------------------------------------------------------------------------------------


Please let me know what could be the problem.
Reply all
Reply to author
Forward
0 new messages