FAQ
I started a chef cookbook bosh_agent today (
https://github.com/drnic/chef-bosh_agent) and thought I'd mention it;
mostly because I'm getting to all the bits which I don't understand in the
world of ops yet.

For example, if I boot up the cookbook in a vagrant/vmware image and run
`bosh_agent` I get some errors about /dev/sr0 missing (whatever its
supposed to be), and eventually getting cranky that there isn't
a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
includes this file on the VM [1])

If you have Memorial Day off tomorrow and want to see it build and fail as
below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin is
optional and used if available.

*$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
*$ cd bosh_agent*
*$ bundle*
*$ kitchen converge*
*$ kitchen verify*
*$ kitchen login*

# inside VM:
*$ PATH=/var/vcap/bosh/bin:$PATH*
*$ bosh_agent -c -I $(cat /etc/infrastructure) -n
https://vcap:vcap@localhost:6969*
#[49120] INFO: Starting agent 1.5.0.pre.674...
#[49120] INFO: Configuring agent...
#[49120] INFO: Configuring instance
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
medium found - /dev/sr0>
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
medium found - /dev/sr0>
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
medium found - /dev/sr0>
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
medium found - /dev/sr0>
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
medium found - /dev/sr0>
#[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
#[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
#[49120] INFO: failed to load infrastructure settings: No bosh cdrom env:
#<Errno::ENOMEDIUM: No medium found - /dev/sr0>
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
`rescue in load_from_cache': could neither load infrastructure settings nor
cached settings from: /var/vcap/bosh/settings.json
(Bosh::Agent::LoadSettingsError)
  from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
`load_from_cache'
from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
`rescue in load'
  from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
`load'
from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
`load'
  from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
`load_settings'
from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
`configure'
  from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
`start'
from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
`run'
  from
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
`<top (required)>'
from /var/vcap/bosh/bin/bosh_agent:23:in `load'
  from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


I'd say I've done the core of the stemcell_builder's bosh_xyz stages. None
of the infrastructure specific stages, networking/clock/modules, etc.

Once we (yes, you the reader, and me) get this running on ubuntu, then its
pretty easy to iterate on other platforms via test-kitchen. Just add the
platforms to the .kitchen.yml file.


[1]
https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

--
Dr Nic Williams
Stark & Wayne LLC - consultancy for Cloud Foundry users
http://drnicwilliams.com
http://starkandwayne.com
cell +1 (415) 860-2185
twitter @drnic

Search Discussions

  • Dr Nic Williams at May 27, 2013 at 4:45 am
    If you want an explanation of the bats tests (in test/integration/ folder)
    and test-kitchen, I made a short screencast a few weeks ago
    http://starkandwayne.com/articles/2013/05/07/tdd-your-devops-with-test-kitchen/

    On Sun, May 26, 2013 at 9:42 PM, Dr Nic Williams wrote:

    I started a chef cookbook bosh_agent today (
    https://github.com/drnic/chef-bosh_agent) and thought I'd mention it;
    mostly because I'm getting to all the bits which I don't understand in the
    world of ops yet.

    For example, if I boot up the cookbook in a vagrant/vmware image and run
    `bosh_agent` I get some errors about /dev/sr0 missing (whatever its
    supposed to be), and eventually getting cranky that there isn't
    a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
    includes this file on the VM [1])

    If you have Memorial Day off tomorrow and want to see it build and fail as
    below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin is
    optional and used if available.

    *$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
    *$ cd bosh_agent*
    *$ bundle*
    *$ kitchen converge*
    *$ kitchen verify*
    *$ kitchen login*

    # inside VM:
    *$ PATH=/var/vcap/bosh/bin:$PATH*
    *$ bosh_agent -c -I $(cat /etc/infrastructure) -n
    https://vcap:vcap@localhost:6969*
    #[49120] INFO: Starting agent 1.5.0.pre.674...
    #[49120] INFO: Configuring agent...
    #[49120] INFO: Configuring instance
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: failed to load infrastructure settings: No bosh cdrom env:
    #<Errno::ENOMEDIUM: No medium found - /dev/sr0>
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
    `rescue in load_from_cache': could neither load infrastructure settings nor
    cached settings from: /var/vcap/bosh/settings.json
    (Bosh::Agent::LoadSettingsError)
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
    `load_from_cache'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
    `rescue in load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
    `load_settings'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
    `configure'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
    `start'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
    `run'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
    `<top (required)>'
    from /var/vcap/bosh/bin/bosh_agent:23:in `load'
    from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


    I'd say I've done the core of the stemcell_builder's bosh_xyz stages. None
    of the infrastructure specific stages, networking/clock/modules, etc.

    Once we (yes, you the reader, and me) get this running on ubuntu, then its
    pretty easy to iterate on other platforms via test-kitchen. Just add the
    platforms to the .kitchen.yml file.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic
  • Matthew Kocher at May 27, 2013 at 7:18 am
    Nice! The cdrom should only be necessary if you're targeting vsphere, but
    I'm not sure where that's configured. Presumably you've seen
    https://github.com/ankurcha/stemcell which afaik wasn't ever finished.

    I'll ping Dmitriy & Amit, they've been doing a lot of work these days with
    turning chef recipes into vm images.


    On Sun, May 26, 2013 at 9:45 PM, Dr Nic Williams wrote:

    If you want an explanation of the bats tests (in test/integration/ folder)
    and test-kitchen, I made a short screencast a few weeks ago
    http://starkandwayne.com/articles/2013/05/07/tdd-your-devops-with-test-kitchen/

    On Sun, May 26, 2013 at 9:42 PM, Dr Nic Williams wrote:

    I started a chef cookbook bosh_agent today (
    https://github.com/drnic/chef-bosh_agent) and thought I'd mention it;
    mostly because I'm getting to all the bits which I don't understand in the
    world of ops yet.

    For example, if I boot up the cookbook in a vagrant/vmware image and run
    `bosh_agent` I get some errors about /dev/sr0 missing (whatever its
    supposed to be), and eventually getting cranky that there isn't
    a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
    includes this file on the VM [1])

    If you have Memorial Day off tomorrow and want to see it build and fail
    as below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin is
    optional and used if available.

    *$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
    *$ cd bosh_agent*
    *$ bundle*
    *$ kitchen converge*
    *$ kitchen verify*
    *$ kitchen login*

    # inside VM:
    *$ PATH=/var/vcap/bosh/bin:$PATH*
    *$ bosh_agent -c -I $(cat /etc/infrastructure) -n
    https://vcap:vcap@localhost:6969*
    #[49120] INFO: Starting agent 1.5.0.pre.674...
    #[49120] INFO: Configuring agent...
    #[49120] INFO: Configuring instance
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: failed to load infrastructure settings: No bosh cdrom env:
    #<Errno::ENOMEDIUM: No medium found - /dev/sr0>
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
    `rescue in load_from_cache': could neither load infrastructure settings nor
    cached settings from: /var/vcap/bosh/settings.json
    (Bosh::Agent::LoadSettingsError)
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
    `load_from_cache'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
    `rescue in load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
    `load_settings'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
    `configure'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
    `start'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
    `run'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
    `<top (required)>'
    from /var/vcap/bosh/bin/bosh_agent:23:in `load'
    from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


    I'd say I've done the core of the stemcell_builder's bosh_xyz stages.
    None of the infrastructure specific stages, networking/clock/modules, etc.

    Once we (yes, you the reader, and me) get this running on ubuntu, then
    its pretty easy to iterate on other platforms via test-kitchen. Just add
    the platforms to the .kitchen.yml file.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic
  • Dr Nic Williams at May 27, 2013 at 2:19 pm
    I'll try to investigate more today.


    ​I am using vsphere infrastructure, as it seems more related to the VM than any other option. Perhaps I need a new vagrant infrastructure?


    I'm still figuring out how bosh_agent splits up infrastructure vs platform; for example, why there is a microcloud platform (which is ubuntu minus networking) but that seems more like an infrastructure concern than platform/OS.

    --
    Dr Nic Williams
    Stark & Wayne LLC - the consultancy for Cloud Foundry
    http://starkandwayne.com
    +1 415 860 2185
    twitter: drnic
    On Mon, May 27, 2013 at 12:18 AM, Matthew Kocher wrote:

    Nice! The cdrom should only be necessary if you're targeting vsphere, but
    I'm not sure where that's configured. Presumably you've seen
    https://github.com/ankurcha/stemcell which afaik wasn't ever finished.
    I'll ping Dmitriy & Amit, they've been doing a lot of work these days with
    turning chef recipes into vm images.
    On Sun, May 26, 2013 at 9:45 PM, Dr Nic Williams wrote:
    If you want an explanation of the bats tests (in test/integration/ folder)
    and test-kitchen, I made a short screencast a few weeks ago
    http://starkandwayne.com/articles/2013/05/07/tdd-your-devops-with-test-kitchen/

    On Sun, May 26, 2013 at 9:42 PM, Dr Nic Williams wrote:

    I started a chef cookbook bosh_agent today (
    https://github.com/drnic/chef-bosh_agent) and thought I'd mention it;
    mostly because I'm getting to all the bits which I don't understand in the
    world of ops yet.

    For example, if I boot up the cookbook in a vagrant/vmware image and run
    `bosh_agent` I get some errors about /dev/sr0 missing (whatever its
    supposed to be), and eventually getting cranky that there isn't
    a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
    includes this file on the VM [1])

    If you have Memorial Day off tomorrow and want to see it build and fail
    as below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin is
    optional and used if available.

    *$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
    *$ cd bosh_agent*
    *$ bundle*
    *$ kitchen converge*
    *$ kitchen verify*
    *$ kitchen login*

    # inside VM:
    *$ PATH=/var/vcap/bosh/bin:$PATH*
    *$ bosh_agent -c -I $(cat /etc/infrastructure) -n
    https://vcap:vcap@localhost:6969*
    #[49120] INFO: Starting agent 1.5.0.pre.674...
    #[49120] INFO: Configuring agent...
    #[49120] INFO: Configuring instance
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: failed to load infrastructure settings: No bosh cdrom env:
    #<Errno::ENOMEDIUM: No medium found - /dev/sr0>
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
    `rescue in load_from_cache': could neither load infrastructure settings nor
    cached settings from: /var/vcap/bosh/settings.json
    (Bosh::Agent::LoadSettingsError)
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
    `load_from_cache'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
    `rescue in load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
    `load_settings'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
    `configure'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
    `start'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
    `run'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
    `<top (required)>'
    from /var/vcap/bosh/bin/bosh_agent:23:in `load'
    from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


    I'd say I've done the core of the stemcell_builder's bosh_xyz stages.
    None of the infrastructure specific stages, networking/clock/modules, etc.

    Once we (yes, you the reader, and me) get this running on ubuntu, then
    its pretty easy to iterate on other platforms via test-kitchen. Just add
    the platforms to the .kitchen.yml file.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic
  • Dr Nic Williams at May 27, 2013 at 2:23 pm
    Thanks for mentioning the stemcell project again; I'd assumed they were reusing the stages shell scripts; looks like they created lots of new ones; but hopefully useful for the other distros/platforms!
    --
    Dr Nic Williams
    Stark & Wayne LLC - the consultancy for Cloud Foundry
    http://starkandwayne.com
    +1 415 860 2185
    twitter: drnic
    On Mon, May 27, 2013 at 12:18 AM, Matthew Kocher wrote:

    Nice! The cdrom should only be necessary if you're targeting vsphere, but
    I'm not sure where that's configured. Presumably you've seen
    https://github.com/ankurcha/stemcell which afaik wasn't ever finished.
    I'll ping Dmitriy & Amit, they've been doing a lot of work these days with
    turning chef recipes into vm images.
    On Sun, May 26, 2013 at 9:45 PM, Dr Nic Williams wrote:
    If you want an explanation of the bats tests (in test/integration/ folder)
    and test-kitchen, I made a short screencast a few weeks ago
    http://starkandwayne.com/articles/2013/05/07/tdd-your-devops-with-test-kitchen/

    On Sun, May 26, 2013 at 9:42 PM, Dr Nic Williams wrote:

    I started a chef cookbook bosh_agent today (
    https://github.com/drnic/chef-bosh_agent) and thought I'd mention it;
    mostly because I'm getting to all the bits which I don't understand in the
    world of ops yet.

    For example, if I boot up the cookbook in a vagrant/vmware image and run
    `bosh_agent` I get some errors about /dev/sr0 missing (whatever its
    supposed to be), and eventually getting cranky that there isn't
    a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
    includes this file on the VM [1])

    If you have Memorial Day off tomorrow and want to see it build and fail
    as below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin is
    optional and used if available.

    *$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
    *$ cd bosh_agent*
    *$ bundle*
    *$ kitchen converge*
    *$ kitchen verify*
    *$ kitchen login*

    # inside VM:
    *$ PATH=/var/vcap/bosh/bin:$PATH*
    *$ bosh_agent -c -I $(cat /etc/infrastructure) -n
    https://vcap:vcap@localhost:6969*
    #[49120] INFO: Starting agent 1.5.0.pre.674...
    #[49120] INFO: Configuring agent...
    #[49120] INFO: Configuring instance
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: failed to load infrastructure settings: No bosh cdrom env:
    #<Errno::ENOMEDIUM: No medium found - /dev/sr0>
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
    `rescue in load_from_cache': could neither load infrastructure settings nor
    cached settings from: /var/vcap/bosh/settings.json
    (Bosh::Agent::LoadSettingsError)
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
    `load_from_cache'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
    `rescue in load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
    `load_settings'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
    `configure'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
    `start'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
    `run'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
    `<top (required)>'
    from /var/vcap/bosh/bin/bosh_agent:23:in `load'
    from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


    I'd say I've done the core of the stemcell_builder's bosh_xyz stages.
    None of the infrastructure specific stages, networking/clock/modules, etc.

    Once we (yes, you the reader, and me) get this running on ubuntu, then
    its pretty easy to iterate on other platforms via test-kitchen. Just add
    the platforms to the .kitchen.yml file.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic
  • Dr Nic Williams at May 28, 2013 at 3:51 am
    https://github.com/drnic/chef-bosh_agent now runs bosh_agent within the
    target VM in http mode; and the README shows you how to install
    agent_client and talk to it.

    On Mon, May 27, 2013 at 7:23 AM, Dr Nic Williams wrote:

    Thanks for mentioning the stemcell project again; I'd assumed they were
    reusing the stages shell scripts; looks like they created lots of new ones;
    but hopefully useful for the other distros/platforms!
    --
    Dr Nic Williams

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

    On Mon, May 27, 2013 at 12:18 AM, Matthew Kocher wrote:

    Nice! The cdrom should only be necessary if you're targeting vsphere,
    but I'm not sure where that's configured. Presumably you've seen
    https://github.com/ankurcha/stemcell which afaik wasn't ever finished.

    I'll ping Dmitriy & Amit, they've been doing a lot of work these days
    with turning chef recipes into vm images.



    On Sun, May 26, 2013 at 9:45 PM, Dr Nic Williams <drnicwilliams@gmail.com
    wrote:
    If you want an explanation of the bats tests (in test/integration/
    folder) and test-kitchen, I made a short screencast a few weeks ago
    http://starkandwayne.com/articles/2013/05/07/tdd-your-devops-with-test-kitchen/


    On Sun, May 26, 2013 at 9:42 PM, Dr Nic Williams <
    drnicwilliams@gmail.com> wrote:
    I started a chef cookbook bosh_agent today (
    https://github.com/drnic/chef-bosh_agent) and thought I'd mention it;
    mostly because I'm getting to all the bits which I don't understand in the
    world of ops yet.

    For example, if I boot up the cookbook in a vagrant/vmware image and
    run `bosh_agent` I get some errors about /dev/sr0 missing (whatever its
    supposed to be), and eventually getting cranky that there isn't
    a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
    includes this file on the VM [1])

    If you have Memorial Day off tomorrow and want to see it build and fail
    as below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin is
    optional and used if available.

    *$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
    *$ cd bosh_agent*
    *$ bundle*
    *$ kitchen converge*
    *$ kitchen verify*
    *$ kitchen login*

    # inside VM:
    *$ PATH=/var/vcap/bosh/bin:$PATH*
    *$ bosh_agent -c -I $(cat /etc/infrastructure) -n
    https://vcap:vcap@localhost:6969*
    #[49120] INFO: Starting agent 1.5.0.pre.674...
    #[49120] INFO: Configuring agent...
    #[49120] INFO: Configuring instance
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM: No
    medium found - /dev/sr0>
    #[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: failed to load infrastructure settings: No bosh cdrom
    env: #<Errno::ENOMEDIUM: No medium found - /dev/sr0>
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
    `rescue in load_from_cache': could neither load infrastructure settings nor
    cached settings from: /var/vcap/bosh/settings.json
    (Bosh::Agent::LoadSettingsError)
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
    `load_from_cache'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
    `rescue in load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
    `load_settings'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
    `configure'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
    `start'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
    `run'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
    `<top (required)>'
    from /var/vcap/bosh/bin/bosh_agent:23:in `load'
    from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


    I'd say I've done the core of the stemcell_builder's bosh_xyz stages.
    None of the infrastructure specific stages, networking/clock/modules, etc.

    Once we (yes, you the reader, and me) get this running on ubuntu, then
    its pretty easy to iterate on other platforms via test-kitchen. Just add
    the platforms to the .kitchen.yml file.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic
  • Dr Nic Williams at May 29, 2013 at 9:47 pm
    I now understand the comments about cdrom for vsphere and the registry for
    aws/openstack (thx ferdy also for helping); and how bosh_agent can be run
    in two configuration modes.

    bin/bosh_agent -c
      => attempts to load the config settings based on the infrastructure

    bin/bosh_agent -c -I aws
      => attempts to load the config settings from an AWS registry; the registry
    HTTP address is provided to the bosh_agent via the AWS user-data [1]

    bin/bosh_agent -c -I vsphere
       => attempts to load the config settings via a mounted fake cdrom

    bin/bosh_agent -c -I openstack
       => attempts to load the config settings from OpenStack registry (same as
    AWS registry - bosh_registry project folder); openstack user-data is
    provided by both user-data and a user-data.json file (the former isn't
    supported by Rackspace)

    And if the settings cannot be found as above, then it looks to
    /var/vcap/bosh/settings.json and loads that.

    Alternately, you can run bosh_agent without loading settings.

    bin/bosh_agent
      => uses the purely default settings [2] from bin/bosh_agent (defaults to
    NATS for communication & vsphere platform)

    bin/bosh_agent -n https://vcap:vcap@0.0.0.0:6868
      => overrides default settings to tell bosh_agent to use https (as used by
    "bosh micro deploy" and mcf)

    etc.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/bosh_aws_cpi/lib/cloud/aws/instance_manager.rb#L159-L166
    [2]
    https://github.com/cloudfoundry/bosh/blob/master/bosh_agent/bin/bosh_agent#L9-22





    On Mon, May 27, 2013 at 8:51 PM, Dr Nic Williams wrote:

    https://github.com/drnic/chef-bosh_agent now runs bosh_agent within the
    target VM in http mode; and the README shows you how to install
    agent_client and talk to it.

    On Mon, May 27, 2013 at 7:23 AM, Dr Nic Williams wrote:

    Thanks for mentioning the stemcell project again; I'd assumed they were
    reusing the stages shell scripts; looks like they created lots of new ones;
    but hopefully useful for the other distros/platforms!
    --
    Dr Nic Williams

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


    On Mon, May 27, 2013 at 12:18 AM, Matthew Kocher <mkocher@pivotallabs.com
    wrote:
    Nice! The cdrom should only be necessary if you're targeting vsphere,
    but I'm not sure where that's configured. Presumably you've seen
    https://github.com/ankurcha/stemcell which afaik wasn't ever finished.

    I'll ping Dmitriy & Amit, they've been doing a lot of work these days
    with turning chef recipes into vm images.



    On Sun, May 26, 2013 at 9:45 PM, Dr Nic Williams <
    drnicwilliams@gmail.com> wrote:
    If you want an explanation of the bats tests (in test/integration/
    folder) and test-kitchen, I made a short screencast a few weeks ago
    http://starkandwayne.com/articles/2013/05/07/tdd-your-devops-with-test-kitchen/


    On Sun, May 26, 2013 at 9:42 PM, Dr Nic Williams <
    drnicwilliams@gmail.com> wrote:
    I started a chef cookbook bosh_agent today (
    https://github.com/drnic/chef-bosh_agent) and thought I'd mention it;
    mostly because I'm getting to all the bits which I don't understand in the
    world of ops yet.

    For example, if I boot up the cookbook in a vagrant/vmware image and
    run `bosh_agent` I get some errors about /dev/sr0 missing (whatever its
    supposed to be), and eventually getting cranky that there isn't
    a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
    includes this file on the VM [1])

    If you have Memorial Day off tomorrow and want to see it build and
    fail as below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin
    is optional and used if available.

    *$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
    *$ cd bosh_agent*
    *$ bundle*
    *$ kitchen converge*
    *$ kitchen verify*
    *$ kitchen login*

    # inside VM:
    *$ PATH=/var/vcap/bosh/bin:$PATH*
    *$ bosh_agent -c -I $(cat /etc/infrastructure) -n
    https://vcap:vcap@localhost:6969*
    #[49120] INFO: Starting agent 1.5.0.pre.674...
    #[49120] INFO: Configuring agent...
    #[49120] INFO: Configuring instance
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: failed to load infrastructure settings: No bosh cdrom
    env: #<Errno::ENOMEDIUM: No medium found - /dev/sr0>
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
    `rescue in load_from_cache': could neither load infrastructure settings nor
    cached settings from: /var/vcap/bosh/settings.json
    (Bosh::Agent::LoadSettingsError)
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
    `load_from_cache'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
    `rescue in load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
    `load_settings'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
    `configure'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
    `start'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
    `run'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
    `<top (required)>'
    from /var/vcap/bosh/bin/bosh_agent:23:in `load'
    from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


    I'd say I've done the core of the stemcell_builder's bosh_xyz stages.
    None of the infrastructure specific stages, networking/clock/modules, etc.

    Once we (yes, you the reader, and me) get this running on ubuntu, then
    its pretty easy to iterate on other platforms via test-kitchen. Just add
    the platforms to the .kitchen.yml file.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic
  • Dr Nic Williams at May 29, 2013 at 10:04 pm
    Added this discovery to the bosh_agent README before MattR asks me to -
    https://github.com/cloudfoundry/bosh/pull/220


    On Wed, May 29, 2013 at 2:46 PM, Dr Nic Williams wrote:

    I now understand the comments about cdrom for vsphere and the registry for
    aws/openstack (thx ferdy also for helping); and how bosh_agent can be run
    in two configuration modes.

    bin/bosh_agent -c
    => attempts to load the config settings based on the infrastructure

    bin/bosh_agent -c -I aws
    => attempts to load the config settings from an AWS registry; the
    registry HTTP address is provided to the bosh_agent via the AWS user-data
    [1]

    bin/bosh_agent -c -I vsphere
    => attempts to load the config settings via a mounted fake cdrom

    bin/bosh_agent -c -I openstack
    => attempts to load the config settings from OpenStack registry (same as
    AWS registry - bosh_registry project folder); openstack user-data is
    provided by both user-data and a user-data.json file (the former isn't
    supported by Rackspace)

    And if the settings cannot be found as above, then it looks to
    /var/vcap/bosh/settings.json and loads that.

    Alternately, you can run bosh_agent without loading settings.

    bin/bosh_agent
    => uses the purely default settings [2] from bin/bosh_agent (defaults to
    NATS for communication & vsphere platform)

    bin/bosh_agent -n https://vcap:vcap@0.0.0.0:6868
    => overrides default settings to tell bosh_agent to use https (as used by
    "bosh micro deploy" and mcf)

    etc.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/bosh_aws_cpi/lib/cloud/aws/instance_manager.rb#L159-L166
    [2]
    https://github.com/cloudfoundry/bosh/blob/master/bosh_agent/bin/bosh_agent#L9-22





    On Mon, May 27, 2013 at 8:51 PM, Dr Nic Williams wrote:

    https://github.com/drnic/chef-bosh_agent now runs bosh_agent within the
    target VM in http mode; and the README shows you how to install
    agent_client and talk to it.


    On Mon, May 27, 2013 at 7:23 AM, Dr Nic Williams <drnicwilliams@gmail.com
    wrote:
    Thanks for mentioning the stemcell project again; I'd assumed they were
    reusing the stages shell scripts; looks like they created lots of new ones;
    but hopefully useful for the other distros/platforms!
    --
    Dr Nic Williams

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


    On Mon, May 27, 2013 at 12:18 AM, Matthew Kocher <
    mkocher@pivotallabs.com> wrote:
    Nice! The cdrom should only be necessary if you're targeting vsphere,
    but I'm not sure where that's configured. Presumably you've seen
    https://github.com/ankurcha/stemcell which afaik wasn't ever finished.

    I'll ping Dmitriy & Amit, they've been doing a lot of work these days
    with turning chef recipes into vm images.



    On Sun, May 26, 2013 at 9:45 PM, Dr Nic Williams <
    drnicwilliams@gmail.com> wrote:
    If you want an explanation of the bats tests (in test/integration/
    folder) and test-kitchen, I made a short screencast a few weeks ago
    http://starkandwayne.com/articles/2013/05/07/tdd-your-devops-with-test-kitchen/


    On Sun, May 26, 2013 at 9:42 PM, Dr Nic Williams <
    drnicwilliams@gmail.com> wrote:
    I started a chef cookbook bosh_agent today (
    https://github.com/drnic/chef-bosh_agent) and thought I'd mention
    it; mostly because I'm getting to all the bits which I don't understand in
    the world of ops yet.

    For example, if I boot up the cookbook in a vagrant/vmware image and
    run `bosh_agent` I get some errors about /dev/sr0 missing (whatever its
    supposed to be), and eventually getting cranky that there isn't
    a /var/vcap/bosh/settings.json yet (for example, micro-cloudfoundry
    includes this file on the VM [1])

    If you have Memorial Day off tomorrow and want to see it build and
    fail as below in a VM. Only needs vagrant 1.2.X+ installed. VMWare plugin
    is optional and used if available.

    *$ git clone git@github.com:drnic/chef-bosh_agent.git bosh_agent*
    *$ cd bosh_agent*
    *$ bundle*
    *$ kitchen converge*
    *$ kitchen verify*
    *$ kitchen login*

    # inside VM:
    *$ PATH=/var/vcap/bosh/bin:$PATH*
    *$ bosh_agent -c -I $(cat /etc/infrastructure) -n
    https://vcap:vcap@localhost:6969*
    #[49120] INFO: Starting agent 1.5.0.pre.674...
    #[49120] INFO: Configuring agent...
    #[49120] INFO: Configuring instance
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM): #<Errno::ENOMEDIUM:
    No medium found - /dev/sr0>
    #[49120] INFO: udevadm: #<Bosh::Exec::Result:0x00000001ddd550>
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: Waiting for /dev/sr0 (ENOMEDIUM or ENOTBLK)
    #[49120] INFO: failed to load infrastructure settings: No bosh cdrom
    env: #<Errno::ENOMEDIUM: No medium found - /dev/sr0>
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:52:in
    `rescue in load_from_cache': could neither load infrastructure settings nor
    cached settings from: /var/vcap/bosh/settings.json
    (Bosh::Agent::LoadSettingsError)
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:47:in
    `load_from_cache'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:29:in
    `rescue in load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:25:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/settings.rb:14:in
    `load'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:61:in
    `load_settings'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent/bootstrap.rb:35:in
    `configure'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:98:in
    `start'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/lib/bosh_agent.rb:77:in
    `run'
    from
    /var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.674/bin/bosh_agent:102:in
    `<top (required)>'
    from /var/vcap/bosh/bin/bosh_agent:23:in `load'
    from /var/vcap/bosh/bin/bosh_agent:23:in `<main>'


    I'd say I've done the core of the stemcell_builder's bosh_xyz stages.
    None of the infrastructure specific stages, networking/clock/modules, etc.

    Once we (yes, you the reader, and me) get this running on ubuntu,
    then its pretty easy to iterate on other platforms via test-kitchen. Just
    add the platforms to the .kitchen.yml file.


    [1]
    https://github.com/cloudfoundry/bosh/blob/master/stemcell_builder/stages/mcf_dirs/assets/settings.json

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic

    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic


    --
    Dr Nic Williams
    Stark & Wayne LLC - consultancy for Cloud Foundry users
    http://drnicwilliams.com
    http://starkandwayne.com
    cell +1 (415) 860-2185
    twitter @drnic

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbosh-dev @
postedMay 27, '13 at 4:42a
activeMay 29, '13 at 10:04p
posts8
users2

2 users in discussion

Dr Nic Williams: 7 posts Matthew Kocher: 1 post

People

Translate

site design / logo © 2021 Grokbase