rake aborted! Command failed with status (1) while trying to build custom stemcell.

1,757 views
Skip to first unread message

dani.mo...@gmail.com

unread,
May 31, 2013, 7:28:16 AM5/31/13
to bosh-...@cloudfoundry.org
Hello everybody, i'm trying to deploy Micro BOSH on OpenStack following the steps on http://docs.cloudfoundry.com/docs/running/deploying-cf/openstack/install_microbosh_openstack.html but i got stuck on the step 5 building the custom stemcell running the command:

sudo bundle exec rake stemcell:micro[micro_bosh:openstack,/home/ubuntu/andy/bosh/release/micro/openstack.yml,/home/ubuntu/releases/bosh-sample-release/dev_releases/BOSH_MPSTOR-2.1-dev.tgz] --trace 2> rakeStemcellErrorsWithTrace.txt

and the error output is:

** Invoke stemcell:micro (first_time)
** Execute stemcell:micro
mkdir -p /var/tmp/bosh/agent-0.7.0-30396
cp -p misc/stemcell/build/vmbuilder.cfg /var/tmp/bosh/agent-0.7.0-30396
cp -rp misc/stemcell/build /var/tmp/bosh/agent-0.7.0-30396
cp -rp misc/stemcell/instance /var/tmp/bosh/agent-0.7.0-30396
cp -rp lib /var/tmp/bosh/agent-0.7.0-30396/instance
cp -rp bin /var/tmp/bosh/agent-0.7.0-30396/instance
cp -rp vendor /var/tmp/bosh/agent-0.7.0-30396/instance
cp -p Gemfile /var/tmp/bosh/agent-0.7.0-30396/instance
cp -p Gemfile.lock /var/tmp/bosh/agent-0.7.0-30396/instance
sudo env http_proxy= /var/tmp/bosh/agent-0.7.0-30396/build/chroot/stages/00_base.sh /var/tmp/bosh/agent-0.7.0-30396/chroot

Current default time zone: 'Etc/UTC'
Local time is now:      Fri May 31 09:42:55 UTC 2013.
Universal Time is now:  Fri May 31 09:42:55 UTC 2013.

Extracting templates from packages: 100%
Extracting templates from packages: 100%
umount: /var/tmp/bosh/agent-0.7.0-30396/chroot/dev: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
rake aborted!
Command failed with status (1): [sudo env http_proxy= /var/tmp/bosh/agent-0...]
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/home/ubuntu/bosh/agent/stemcell.rake:195:in `build_chroot'
/home/ubuntu/bosh/agent/stemcell.rake:313:in `setup_chroot_dir'
/home/ubuntu/bosh/agent/stemcell.rake:477:in `block (2 levels) in <top (required)>'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => stemcell:micro

what can i do to fix it?

Ferran Rodenas

unread,
May 31, 2013, 7:33:52 AM5/31/13
to bosh-...@cloudfoundry.org
That document is outdated. The best way to install bosh on OpenStack is using DrNic's bosh-bootstrap tool, it will download the latest gems and stemcells, and it will deploy a microBosh.

- Ferdy

dani.mo...@gmail.com

unread,
May 31, 2013, 7:38:06 AM5/31/13
to bosh-...@cloudfoundry.org, dani.mo...@gmail.com
Ok thank you, i'll try with DrNic bosh-bootstrap, thank you again for answering that fast.

Stefan Farestam

unread,
May 31, 2013, 8:38:15 AM5/31/13
to bosh-...@cloudfoundry.org

Here's a step-by-step guide on how to get microbosh up & running with bosh-bootstrap on openstack:

* start with a virgin Ubuntu 12.10 image to make it easy for yourself. Other

## 1) --- install rvm
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled --ruby=1.9.3
source /usr/local/rvm/scripts/rvm

## 2) --- install missing packages to keep bosh and bosh-bootstrap happy...
apt-get install git libpq-dev -y --force-yes
gem install ruby-debug19 --no-ri --no-rdoc

## 3) --- clone the bosh repo and install all packages
(command cd bosh; git pull)
(command cd bosh; bundle install)
(command cd bosh; bundle exec rake all:install)

## 4) --- install bosh-bootstrap and "bosh cf"
gem install  bosh-bootstrap -v 0.11.3 --no-ri --no-rdoc
gem install  bosh-cloudfoundry --no-ri --no-rdoc

## 5) --- fix dependency problem the rough way...
sed -i '/runtime_dependency.*<fog>/d' \
    /usr/local/rvm/gems/ruby-*/specifications/bosh-cloudfoundry-0.6.1.gemspec

## 6) --- patch bosh-bootstrap to use custom flavor if desired (in this case $PROJECT.microbosh)
pfile=$(find  $(which bosh-bootstrap| sed 's|/bosh-bootstrap|/..|') |\
            fgrep microbosh_providers/openstack.rb)
do "sed -i 's|m1.medium|$PROJECT.microbosh|' \$pfile"


## 7) --- initialize bosh bootstrap settings
cat << ---END > \$HOME/.microbosh/settings.yml
---
bosh:
  name: $BOSH_DEPLOYMENT
provider:
  name: openstack
  credentials:
    openstack_username: $OS_USERNAME
    openstack_api_key: $OS_PASSWORD
    openstack_tenant: $OS_TENANT_NAME
    openstack_auth_url: $OS_AUTH_URL
    openstack_region: ''
resources:
  persistent_disk: 16384
  cloud_properties:
    instance_type: $PROJECT.microbosh
---END"

## 8) --- create microbosh
bosh-bootstrap deploy

## 9) --- clean up bosh versions after bosh-bootstrap
gem list bosh | awk '{print $1}' | xargs -L 1 gem clean

Dr Nic Williams

unread,
May 31, 2013, 9:26:49 AM5/31/13
to bosh-...@cloudfoundry.org
Thanks for writing that up. I'm working on finishing the UI for bosh-bootstrap for OpenStack at the moment (m1.microbosh is a shortcut where it's a flavour that has an ephemeral storage; soon it will prompt you to select one). Then you won't need to manually create the settings.yml

​I'll pull these steps into the readme thanks!
--
Dr Nic Williams
Stark & Wayne LLC - the consultancy for Cloud Foundry
http://starkandwayne.com
+1 415 860 2185
twitter: drnic

Stefan Farestam

unread,
May 31, 2013, 12:16:06 PM5/31/13
to bosh-...@cloudfoundry.org

Actually, it would be great to have the ability to put all the settings into a config file or give them on the command line. Interactive questions is the enemy of automation ;-) Also, as you can see (from my patch), it would be desirable to be able to set the flavor for microbosh, patching the source code is quite a challenging method to maintain...

By the way, tryign to do this behind a corporate proxy (just to have some extra fun) I notice that you use "bundle" in to two different ways, one to do "bundle install" and the other to exec bosh. Now it so happens that you *do* want to have the proxy active when doing a "bundle install", but not when doing "bundle bosh exec". The way I solved this was to do:

bbsdir=$(echo $gemsdir/bosh-bootstrap*)
sed -i 's|exec bosh|exec env -u http_proxy -u https_proxy -u HTTP_PROXY bosh|' \
    \$bbsdir/lib/bosh-bootstrap/microbosh.rb

This could actually be a good way to address it since bosh shouldn't access resources external to the local network (is this assumption always correct?).

Dr Nic Williams

unread,
May 31, 2013, 12:59:16 PM5/31/13
to bosh-...@cloudfoundry.org
If you can break out each fix/idea/request into separate bosh-bootstrap tickets I would be super appreciative!
--
Dr Nic Williams
Stark & Wayne LLC - the consultancy for Cloud Foundry
http://starkandwayne.com
+1 415 860 2185
twitter: drnic


Matt Stine

unread,
Jun 3, 2013, 12:58:21 PM6/3/13
to bosh-...@cloudfoundry.org
So...still fairly new to bootstrap and openstack. Looking at this step:

## 7) --- initialize bosh bootstrap settings
cat << ---END > \$HOME/.microbosh/settings.yml
---
bosh:
  name: $BOSH_DEPLOYMENT
provider:
  name: openstack
  credentials:
    openstack_username: $OS_USERNAME
    openstack_api_key: $OS_PASSWORD
    openstack_tenant: $OS_TENANT_NAME
    openstack_auth_url: $OS_AUTH_URL
    openstack_region: ''
resources:
  persistent_disk: 16384
  cloud_properties:
    instance_type: $PROJECT.microbosh
---END"

Where do the values for these $ vars come from? I think I can figure out the $OS values, but the $BOSH_DEPLOYMENT and $PROJECT are not clear to me.

Thanks from the local n00b! :-)
--
Matt Stine | Community Engineer, Cloud Foundry | Pivotal
901-493-5546 | mst...@goPivotal.com

Dr Nic Williams

unread,
Jun 3, 2013, 1:06:31 PM6/3/13
to bosh-users
Matt, are you trying to run bosh-bootstrap on openstack?

It should work out of the box, EXCEPT for one current work-around step:

* create a flavor called "m1.microbosh" with 20G ephemeral disk (I'm not sure how much is required, but Ruben found a bug if it was only 10G; and its definitely bad if you use a 0G ephemeral disk VM - the agent just hangs waiting for it).

Once you have this VM flavor (instance type), then run bosh-boostrap from source:

cd bosh-bootstrap
bundle
bundle exec bin/bosh-bootstrap deploy

(there's a bug in the gem)

Nic

Matt Stine

unread,
Jun 3, 2013, 1:17:42 PM6/3/13
to bosh-...@cloudfoundry.org
Ahhh...ok. Will try this momentarily. Thanks!

Dr Nic Williams

unread,
Jun 3, 2013, 1:26:08 PM6/3/13
to bosh-users
If that works, and you put it into the README for everyone else, you will win fabulous prizes!

Nic
--
Dr Nic Williams
Stark & Wayne LLC - consultancy for Cloud Foundry users
twitter @drnic

Matt Stine

unread,
Jun 3, 2013, 1:24:19 PM6/3/13
to bosh-...@cloudfoundry.org
Hmmm...I keep getting this dubious "there was an error when submitting the form...please try again" when trying to create a flavor (or edit one for that matter). Wondering if my devstack install has issues...

Dr Nic Williams

unread,
Jun 3, 2013, 1:36:53 PM6/3/13
to bosh-users
Should be renamed to OoohPoohStack?
--
Dr Nic Williams
Stark & Wayne LLC - consultancy for Cloud Foundry users

Matt Stine

unread,
Jun 3, 2013, 3:20:46 PM6/3/13
to bosh-...@cloudfoundry.org
Why do I bother with GUI's?

nova flavor-create --ephemeral 20 m1.microbosh 50 2048 20 1
+----+--------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name         | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+--------------+-----------+------+-----------+------+-------+-------------+-----------+
| 50 | m1.microbosh | 2048      | 20   | 20        |      | 1     | 1.0         | True      |
+----+--------------+-----------+------+-----------+------+-------+-------------+-----------+

Stefan Farestam

unread,
Jun 3, 2013, 3:56:33 PM6/3/13
to bosh-...@cloudfoundry.org

I'm the guilty one here as this snippet is part of a larger deployment script!

$PROJECT.microbosh can be replaced with any flavor name. The reason that I do it this way is to be able to have multiple cloud foundry deployments in the same openstack server and thus have unique flavor names for each deployment ($PROJECT).

$BOSH_DEPLOYMENT can be anything and is just the name of the deployment.

Note that this file is create by bosh-bootstrap if you use it interactively.

Matt Stine

unread,
Jun 3, 2013, 4:54:39 PM6/3/13
to bosh-...@cloudfoundry.org
Hmmm....so I keep running up against a "create stemcell failed: read timeout reached" during the "Uploading stemcell" stage. Is there any easy/straightforward way to tweak that value? I'm sure this is somewhat related to the fact that I'm running all of this on a Vagrant/Devstack on my laptop. (sigh) Such is still the current state of my sandbox.

Dr Nic Williams

unread,
Jun 3, 2013, 5:52:05 PM6/3/13
to bosh-...@cloudfoundry.org, bosh-...@cloudfoundry.org
Ferdy, can he try importing the stemcell directly into his OpenStack from the UI? 
--
Dr Nic Williams
Stark & Wayne LLC - the consultancy for Cloud Foundry
http://starkandwayne.com
+1 415 860 2185
twitter: drnic


Ferran Rodenas

unread,
Jun 4, 2013, 4:42:25 AM6/4/13
to bosh-...@cloudfoundry.org
Yes, you can upload manually (via glance CLI or UI) the microBosh stemcell (remember to untar the stemcell file, and then the image file). Once uploaded: bosh micro deploy <uuid of the glance image>.

- Ferdy


2013/6/3 Dr Nic Williams <drnicw...@gmail.com>

dani.mo...@gmail.com

unread,
Jun 4, 2013, 9:06:36 AM6/4/13
to bosh-...@cloudfoundry.org
Hello, i'm following the guide you gave and i got stuck on the step 6:


## 6) --- patch bosh-bootstrap to use custom flavor if desired (in this case $PROJECT.microbosh)
pfile=$(find  $(which bosh-bootstrap| sed 's|/bosh-bootstrap|/..|') |\
            fgrep microbosh_providers/openstack.rb)
do "sed -i 's|m1.medium|$PROJECT.microbosh|' \$pfile"

the first command:

pfile=$(find  $(which bosh-bootstrap| sed 's|/bosh-bootstrap|/..|') |\
            fgrep microbosh_providers/openstack.rb)

returns nothing and then the 2nd command:

do "sed -i 's|m1.medium|$PROJECT.microbosh|' \$pfile"

gives me the following error: -bash: syntax error near unexpected token `do'

is there a writing error or something? thanks in advance.

Dr Nic Williams

unread,
Jun 4, 2013, 11:10:40 AM6/4/13
to bosh-...@cloudfoundry.org
Dani, try following the instructions I gave to Matt Stine. I'll update the readme with these temporary OpenStack instructions.

​Sorry that I haven't finished bootstrap for OpenStack (to make it sexy). I have been digging into the agent/stemcell/package_compiler to make a screencast about them.

​Nic 
--
Dr Nic Williams
Stark & Wayne LLC - the consultancy for Cloud Foundry
http://starkandwayne.com
+1 415 860 2185
twitter: drnic


Matt Stine

unread,
Jun 3, 2013, 3:25:00 PM6/3/13
to bosh-...@cloudfoundry.org
Uh-oh...I think I broke it:

Using provider OpenStack

Username: admin
Password: devstackbosh
Tenant: demo
Authorization Token URL: http://172.16.6.162:5000/v2.0
OpenStack Region (optional):

Confirming: Using OpenStack
[DEPRECATION] Defaulting to json library for json parsing. Please consider using multi_json library for the greatest performance/flexibility.
Acquiring a public IP address... 172.24.4.225

Confirming: Using address 172.24.4.225
Created security group ssh
 -> opened ports ports TCP 22..22 from IP range 0.0.0.0/0
Created security group bosh_nats_server
 -> opened ports ports TCP 4222..4222 from IP range 0.0.0.0/0
Created security group bosh_agent_https
 -> opened ports ports TCP 6868..6868 from IP range 0.0.0.0/0
Created security group bosh_blobstore
 -> opened ports ports TCP 25250..25250 from IP range 0.0.0.0/0
Created security group bosh_director
/home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon/middlewares/expects.rb:10:in `response_call': Expected(200) <=> Actual(413 Request Entity Too Large) (Excon::Errors::RequestEntityTooLarge)
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon/connection.rb:355:in `response'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon/connection.rb:249:in `request'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/core/connection.rb:21:in `request'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack/compute.rb:334:in `request'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack/requests/compute/create_security_group_rule.rb:22:in `create_security_group_rule'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack/models/compute/security_group.rb:33:in `create_security_group_rule'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/openstack_provider_client.rb:40:in `authorize_port_range'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/fog_provider_client.rb:115:in `block in create_security_group'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/fog_provider_client.rb:112:in `each'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/fog_provider_client.rb:112:in `create_security_group'
        from /home/vagrant/devstack/bosh-bootstrap/lib/bosh-bootstrap/network_providers/openstack.rb:11:in `block in perform'
        from /home/vagrant/devstack/bosh-bootstrap/lib/bosh-bootstrap/network_providers/openstack.rb:10:in `each'
        from /home/vagrant/devstack/bosh-bootstrap/lib/bosh-bootstrap/network_providers/openstack.rb:10:in `perform'
        from /home/vagrant/devstack/bosh-bootstrap/lib/bosh-bootstrap/network.rb:15:in `deploy'
        from /home/vagrant/devstack/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:46:in `select_or_provision_public_networking'
        from /home/vagrant/devstack/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:21:in `perform'
        from /home/vagrant/devstack/bosh-bootstrap/lib/bosh-bootstrap/thor_cli.rb:11:in `deploy'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
        from bin/bosh-bootstrap:11:in `<main>'

Dr Nic Williams

unread,
Jun 4, 2013, 6:21:06 PM6/4/13
to bosh-users
That is a mysterious API throttling error.

Wait a minute then run the command again.

dani.mo...@gmail.com

unread,
Jun 7, 2013, 4:53:04 AM6/7/13
to bosh-...@cloudfoundry.org
Hello again Dr Nic, i've tried the instructions you gave to Matt Stine, but i got the same error as him, i tried to run the command again a after a little while, but it still crashes, it only shows:

Using provider OpenStack


Confirming: Using OpenStack

and then it crashes with:


[DEPRECATION] Defaulting to json library for json parsing. Please consider using multi_json library for the greatest performance/flexibility.
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon/connection.rb:89:in `initialize': can't convert nil into String (TypeError)
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon.rb:124:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon.rb:124:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/core/connection.rb:6:in `initialize'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack.rb:54:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack.rb:54:in `authenticate_v1'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack/compute.rb:389:in `authenticate'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack/compute.rb:311:in `initialize'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/core/service.rb:68:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/core/service.rb:68:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/compute.rb:44:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/openstack_provider_client.rb:70:in `setup_fog_connection'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/fog_provider_client.rb:13:in `initialize'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers.rb:22:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers.rb:22:in `provider_client'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/helpers/provider.rb:6:in `provider_client'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/address.rb:41:in `address_cli'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/address.rb:56:in `valid_address?'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/address.rb:19:in `execute!'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:41:in `select_or_provision_public_networking'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:21:in `perform'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/thor_cli.rb:11:in `deploy'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'

    from bin/bosh-bootstrap:11:in `<main>'

do you know what can i do to fix it? thank you for all your help.

Dr Nic Williams

unread,
Jun 7, 2013, 11:03:35 AM6/7/13
to bosh-...@cloudfoundry.org
My immediate suspicion is your OpenStack config might be bad. (It'sfailing  during authentication)

​Can you paste in your ~/.microbosh/settings.json (without passwords etc) please?

Nic 
--
Dr Nic Williams
Stark & Wayne LLC - the consultancy for Cloud Foundry
http://starkandwayne.com
+1 415 860 2185
twitter: drnic


dani.mo...@gmail.com

unread,
Jun 10, 2013, 5:54:52 AM6/10/13
to bosh-...@cloudfoundry.org
Sorry i couldn't paste it before because i weren't at the office, by the way i do not have such file in that folder, the only file in there is "settings.yml", it should be there? or it could be in another location?

Dr Nic Williams

unread,
Jun 10, 2013, 10:47:54 AM6/10/13
to bosh-...@cloudfoundry.org
Sorry, yes, settings.yml
--
Dr Nic Williams
Stark & Wayne LLC - the consultancy for Cloud Foundry
http://starkandwayne.com
+1 415 860 2185
twitter: drnic


dani.mo...@gmail.com

unread,
Jun 11, 2013, 4:47:22 AM6/11/13
to bosh-...@cloudfoundry.org
---
bosh:
  name: $BOSH_DEPLOYMENT
provider:
  name: openstack
  credentials:
    openstack_username: $OS_USERNAME
    openstack_api_key: $OS_PASSWORD
    openstack_tenant: $OS_TENANT_NAME
    openstack_auth_url: $OS_AUTH_URL
    openstack_region: ''
resources:
  persistent_disk: 16384
  cloud_properties:
    instance_type: $PROJECT.microbosh

The content of the file is this, as is. I thought that those variable could be system variables and i did not have to change them, but now it seems that i have to put in there my own username, password and all that stuff myself, i'm i right?

Thanks in advance.

Stefan Farestam

unread,
Jun 11, 2013, 5:03:39 AM6/11/13
to bosh-...@cloudfoundry.org
Correct. The procedure that I posted is part of a larger deployment script (which I'll publish as soon as it is reasonably stable). Thus I forgot to point out that you need to define those vars yourself. 

dani.mo...@gmail.com

unread,
Jun 11, 2013, 5:08:57 AM6/11/13
to bosh-...@cloudfoundry.org
Ok, thank you, i thought it because it's the first time i do such a thing, i'm not a system administrator and i'm a bit lost in all this, thank you.

dani.mo...@gmail.com

unread,
Jun 11, 2013, 5:46:37 AM6/11/13
to bosh-...@cloudfoundry.org
What's exactly that bosh deployment var? the name of the file (BOSH_MPSTOR-2.1-dev.tgz for example) or what's it?


El martes, 11 de junio de 2013 10:03:39 UTC+1, Stefan Farestam escribió:

Stefan Farestam

unread,
Jun 11, 2013, 2:25:58 PM6/11/13
to bosh-...@cloudfoundry.org

$BOSH_DEPLOYMENT is an arbitrary name of your choosing. Here are my settings for your reference:

---
bosh:
  name: paas1-bosh
provider:
  name: openstack
  credentials:
    openstack_username: admin
    openstack_api_key: admin
    openstack_tenant: paas1
    openstack_auth_url: http://169.144.108.203:5000/v2.0/tokens
    openstack_region: ''
resources:
  persistent_disk: 16384
  cloud_properties:
    instance_type: paas1.microbosh

Dr Nic Williams

unread,
Jun 11, 2013, 2:28:03 PM6/11/13
to bosh-users
Remember that all instance types used within bosh (microbosh and all bosh VMs) must have an ephemeral disk.

Nic
Dr Nic Williams
Stark & Wayne LLC - consultancy for Cloud Foundry users

dani.mo...@gmail.com

unread,
Jun 12, 2013, 6:01:57 AM6/12/13
to bosh-...@cloudfoundry.org
i'm running it now with this configuration but it still crashes the same way
---
bosh:
  name: MPSTOR-Bosh
provider:
  name: openstack
  credentials:
    openstack_username: user
    openstack_api_key: pass
    openstack_tenant: user
    openstack_auth_url: http://10.0.2.44:5000/v2.0
    openstack_region: RegionOne
resources:
  persistent_disk: 16384
  cloud_properties:
    instance_type: m1.small

but now it says: "bad URI(is not URI?):  (URI::InvalidURIError)"


ubuntu@ubuntu-bosh:~/bosh-bootstrap$ bundle exec bin/bosh-bootstrap deploy


Using provider OpenStack


Confirming: Using OpenStack
[DEPRECATION] Defaulting to json library for json parsing. Please consider using multi_json library for the greatest performance/flexibility.
/home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/uri/common.rb:176:in `split': bad URI(is not URI?):  (URI::InvalidURIError)
    from /home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/uri/common.rb:211:in `parse'
    from /home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/uri/common.rb:747:in `parse'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack/compute.rb:402:in `authenticate'

    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/openstack/compute.rb:311:in `initialize'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/core/service.rb:68:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/core/service.rb:68:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.11.1/lib/fog/compute.rb:44:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/openstack_provider_client.rb:70:in `setup_fog_connection'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers/clients/fog_provider_client.rb:13:in `initialize'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers.rb:21:in `new'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/providers.rb:21:in `provider_client'

    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/helpers/provider.rb:6:in `provider_client'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/address.rb:41:in `address_cli'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/address.rb:56:in `valid_address?'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/cyoi-0.5.1/lib/cyoi/cli/address.rb:19:in `execute!'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:41:in `select_or_provision_public_networking'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:21:in `perform'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/thor_cli.rb:11:in `deploy'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from bin/bosh-bootstrap:11:in `<main>'


Dr Nic Williams

unread,
Jun 12, 2013, 10:14:24 AM6/12/13
to bosh-users
Add /tokens to the end of the URI.
Dr Nic Williams
Stark & Wayne LLC - consultancy for Cloud Foundry users

dani.mo...@gmail.com

unread,
Jun 14, 2013, 5:46:15 AM6/14/13
to bosh-...@cloudfoundry.org
Hi again, i've added the /tokens to the URI but now it fails uploading the stemcell and gives an error 'Unable to connect to the OpenStack Compute API' however if i do 'telnet 10.0.2.44 8774' which is the address of my Compute API it works.




Using provider OpenStack


Confirming: Using OpenStack
[DEPRECATION] Defaulting to json library for json parsing. Please consider using multi_json library for the greatest performance/flexibility.

Confirming: Using address 172.24.4.227
Reusing security group ssh
 -> no additional ports opened
Reusing security group bosh_nats_server
 -> no additional ports opened
Reusing security group bosh_agent_https
 -> no additional ports opened
Reusing security group bosh_blobstore
 -> no additional ports opened
Reusing security group bosh_director
 -> no additional ports opened
Reusing security group bosh_registry
 -> no additional ports opened
Destroying key pair MPSTOR-Bosh... done
Acquiring a key pair MPSTOR-Bosh... done

Confirming: Using key pair MPSTOR-Bosh
Determining stemcell image/file to use... /home/ubuntu/.microbosh/deployments/MPSTOR-Bosh/last_successful_micro-bosh-stemcell-openstack.tgz
bundle install
Fetching source index from https://s3.amazonaws.com/bosh-jenkins-gems/
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies................
Using httpclient (2.2.4)
Using yajl-ruby (1.1.0)
Installing agent_client (1.5.0.pre.736)
Using json (1.8.0)
Using nokogiri (1.5.6)
Using uuidtools (2.1.4)
Using aws-sdk (1.8.5)
Installing bosh_common (1.5.0.pre.736)
Using builder (3.1.4)
Using excon (0.23.0)
Using formatador (0.2.4)
Using mime-types (1.23)
Installing multi_json (1.7.7)
Using net-ssh (2.6.7)
Using net-scp (1.1.1)
Using ruby-hmac (0.4.0)
Using fog (1.12.1)
Using log4r (1.1.10)
Using ruby-atmos-pure (1.0.5)
Installing blobstore_client (1.5.0.pre.736)
Using highline (1.6.19)
Using readwritesettings (3.0.1)
Using cyoi (0.5.1)
Using redcard (1.1.0)
Using thor (0.18.1)
Using bosh-bootstrap (0.11.4) from source at /home/ubuntu/bosh-bootstrap
Installing bosh_cpi (1.5.0.pre.736)
Using sequel (3.43.0)
Using rack (1.5.2)
Using rack-protection (1.5.0)
Using tilt (1.4.1)
Using sinatra (1.4.3)
Using daemons (1.1.9)
Using eventmachine (1.0.3)
Using thin (1.5.1)
Installing bosh_registry (1.5.0.pre.736)
Installing bosh_aws_cpi (1.5.0.pre.736)
Using json_pure (1.8.0)
Using minitar (0.5.4)
Using net-ssh-gateway (1.1.2)
Using netaddr (1.5.0)
Using progressbar (0.9.2)
Using terminal-table (1.4.5)
Installing bosh_cli (1.5.0.pre.736)
Installing bosh_openstack_cpi (1.5.0.pre.736)
Using rest-client (1.6.7)
Installing ruby_vcloud_sdk (1.5.0.pre.736)
Installing bosh_vcloud_cpi (1.5.0.pre.736)
Using membrane (0.0.2)
Installing ruby_vim_sdk (1.5.0.pre.736)
Installing bosh_vsphere_cpi (1.5.0.pre.736)
Using sqlite3 (1.3.7)
Installing bosh_cli_plugin_micro (1.5.0.pre.736)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
bundle exec bosh micro deployment MPSTOR-Bosh
Deployment set to '/home/ubuntu/.microbosh/deployments/MPSTOR-Bosh/micro_bosh.yml'
bundle exec bosh -n micro deploy /home/ubuntu/.microbosh/deployments/MPSTOR-Bosh/last_successful_micro-bosh-stemcell-openstack.tgz

Verifying stemcell...
File exists and readable                                     OK
Using cached manifest...
Stemcell properties                                          OK

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


Deploy Micro BOSH
  unpacking stemcell (00:13:04)                                                                 
Uploading stemcell                |oo                     | 1/11 00:14:56  ETA: 02:08:51create stemcell failed: Unable to connect to the OpenStack Compute API. Check task debug log for details.:
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_openstack_cpi-1.5.0.pre.736/lib/cloud/openstack/helpers.rb:18:in `cloud_error'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_openstack_cpi-1.5.0.pre.736/lib/cloud/openstack/cloud.rb:56:in `rescue in initialize'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_openstack_cpi-1.5.0.pre.736/lib/cloud/openstack/cloud.rb:52:in `initialize'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cpi-1.5.0.pre.736/lib/cloud/provider.rb:11:in `new'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cpi-1.5.0.pre.736/lib/cloud/provider.rb:11:in `create'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/config.rb:68:in `cloud'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:67:in `cloud'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:226:in `block (2 levels) in create_stemcell'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:92:in `step'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:225:in `block in create_stemcell'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:211:in `create_stemcell'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:136:in `create'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:112:in `block in create_deployment'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:105:in `with_lifecycle'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/deployer/instance_manager.rb:111:in `create_deployment'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli_plugin_micro-1.5.0.pre.736/lib/bosh/cli/commands/micro.rb:171:in `perform'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli-1.5.0.pre.736/lib/cli/command_handler.rb:57:in `run'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli-1.5.0.pre.736/lib/cli/runner.rb:59:in `run'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli-1.5.0.pre.736/lib/cli/runner.rb:18:in `run'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/bosh_cli-1.5.0.pre.736/bin/bosh:7:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/bin/bosh:19:in `load'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/bin/bosh:19:in `<main>'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `eval'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `<main>'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p429@global/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner': Command failed with status (1): [bundle exec bosh -n micro deploy /home/ubu...] (RuntimeError)
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429@global/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429@global/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/helpers/bundle.rb:9:in `block in bundle'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler.rb:218:in `block in with_clean_env'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler.rb:205:in `with_original_env'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler.rb:211:in `with_clean_env'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/helpers/bundle.rb:7:in `bundle'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/microbosh.rb:71:in `block in deploy_or_update'
    from /home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/fileutils.rb:125:in `chdir'
    from /home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/fileutils.rb:125:in `cd'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/microbosh.rb:69:in `deploy_or_update'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/microbosh.rb:43:in `block in deploy'
    from /home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/fileutils.rb:125:in `chdir'
    from /home/ubuntu/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/fileutils.rb:125:in `cd'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/microbosh.rb:40:in `deploy'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:75:in `perform_microbosh_deploy'
    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/cli/commands/deploy.rb:24:in `perform'

    from /home/ubuntu/bosh-bootstrap/lib/bosh-bootstrap/thor_cli.rb:11:in `deploy'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /home/ubuntu/.rvm/gems/ruby-1.9.3-p429/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from bin/bosh-bootstrap:11:in `<main>'



gowri...@gmail.com

unread,
Jul 2, 2014, 1:16:38 AM7/2/14
to bosh-...@cloudfoundry.org, dani.mo...@gmail.com
Hi,

Thanks for the detailed instructions. I followed the topic and even I am stuck at same stage  'Unable to connect to the OpenStack Compute API' , any suggestions ?

Thanks,
...
Reply all
Reply to author
Forward
0 new messages