cloudfoundry-attic / bosh-init

bosh-init is a tool used to create and update the Director VM
Apache License 2.0
31 stars 33 forks source link

bosh-init command to compile CPIs #9

Open drnic opened 9 years ago

drnic commented 9 years ago

I want to package the bosh-init CLI plus a pre-compiled CPI into docker images.

Progress:

I need a way to compile the CPI in the gist above; so it can then be bundled into the Dockerfile.

Currently I think the only path is to try to bosh-init deploy and pass in stemcells AND manifest.

Could we have a dedicated command that just does the CPI compilation please?

/cc @cppforlife

drnic commented 9 years ago

BTW, once a CPI is pre-packaged into a docker image with bosh-init, then we shouldn't need to also pass the CPI release into bosh-init deploy as well. Would be good to only have to pass in stemcell & release tgz.

cppforlife commented 9 years ago

What do you think about having the manifest point to locations (file or https) for releases and stemcells. For example:

releases:
- {name: bosh, url: https://bosh.io/d/github.com/cloudfoundry/bosh?v=156}
- {name: bosh-aws-cpi, url: https://bosh.io/d/github.com/cloudfoundry-incubator/bosh-aws-cpi?v=4}

resource_pools:
- name: default
  stemcell:
    name: bosh-aws-xen-ubuntu-trusty-go_agent
    url: https://bosh.io/d/stemcells/bosh-aws-xen-ubuntu-trusty-go_agent?v=2889

Given above manifest command to deploy it would be:

bosh-init deploy manifest.yml
bosh-init delete manifest.yml

If you want to reference local assets, it could look something like this:

releases:
- {name: bosh, url: file://bosh-156.tgz}
- {name: bosh-aws-cpi, url: file://bosh-aws-cpi-release-156.tgz}

resource_pools:
- name: default
  stemcell:
    name: bosh-aws-xen-ubuntu-trusty-go_agent
    url: file://~/Downloads/bosh-stemcell-2889-aws-xen-ubuntu-trusty-go_agent.tgz
cppforlife commented 9 years ago

Oh and once that's done we could add a command bosh-init prepare that downloads assets and also installs CPI?

Btw keep in mind that bosh-init leaves a state file which needs to be saved before you destroy your Docker container.

allomov commented 9 years ago

Nice feature with url field in releases:

releases:
- {name: bosh, url: https://bosh.io/d/github.com/cloudfoundry/bosh?v=156}
- {name: bosh-aws-cpi, url: https://bosh.io/d/github.com/cloudfoundry-incubator/bosh-aws-cpi?v=4}

Is there a place to read more about it ? (I was almost ready to write proposal for it :) )

cppforlife commented 9 years ago

@allomov not yet. there is not much else from what i described above.