orange-cloudfoundry / bosh-cloudstack-cpi-release

a bosh external CPI Provider for CloudStack Iaas
Apache License 2.0
3 stars 0 forks source link

CPI job should not be a long running process #1

Open cppforlife opened 9 years ago

cppforlife commented 9 years ago

Currently CPI jobs are expected to be an executable that bosh-init or the Director can shells out. bosh-init does not even look at the monit file.

gberche-orange commented 9 years ago

thanks Dmitriy for catching this. This is work in progress and we yet have to instanciate the cpi job as part of bosh-init and a bosh standalone deployment.

We're currently waiting to have the vcloud external cpi working [1] to be able to complete the capture of stdout and stderr, (in order to drive our tests with sample exchanges we'll then adapt to cloudstack specificities).

[1] http://cf-bosh.70367.x6.nabble.com/cf-bosh-bosh-io-bosh-related-resources-td267.html

poblin-orange commented 9 years ago

Hello @cppforlife @gberche-orange , the cpi is currently just a bash shell issuing a curl to the cpi-core component. Works well when provisionned from a bosh director. But you are correct, the bosh-init does not launch the monit.

Having a dedicated /permanent rest server has some good aspects :

Any Idea on a way we could instruct bosh-init to launch the cpi-core job ?

poblin-orange commented 9 years ago

@cppforlife @gberche-orange progressing on the cpi implementation. I noticed i had to use a bosh registry. Current bosh registry is iaas specific (aws and cloudstack specific plugins). Was simpler to reimplement it as port of cloudstack cpi-core. I have the feeling the bosh registry function should be part of a CPI : its closely related to how the cpi chooses to manage bootstrap sequence (for instance, vsphere - vcloud cpi use cdrom, not registry ?)

Moreover, the bosh-init process launches systematically the bosh registry.

Could we make bosh-init more generic by allowing the launch of a cpi specific process (could be bosh registry, for aws and openstack, or another job, like our cloudstack cpi-core) ?

cppforlife commented 9 years ago

@poblin-orange we are actually planning to remove registry (work will start right after we finish our az refactors) and replace it with a better CPI inputs/outputs. proposal on bosh-notes to come soon...

meanwhile we are also expecting a tiny PR from azure cpi team to bosh-registry that will make it iaas agnostic just like bosh-init's builtin registry. it makes it iaas agnostic by switching it to use credential based access for all deployed vms. did you run into any problem using builtin bosh-init registry?

poblin-orange commented 9 years ago

@cppforlife I will be looking for this PR. I met no issue with the bosh-init registry, but had issue with the registry while installing our CPI in a full blown bosh deployment. A iaas plugin was required, and i didnt want to fork / extend the registry job for a useless plugin. So just added a small rest service inside cpi-core, exposing bosh-registry API, as a short term solution. We will remove it as soon as registry will be iaas agnostic.

Anyway, the cloudstack CPI need to expose http api, for stemcell/template publication. The ability for bosh-init to launch a job (in our case, cpi-core job) would be helpfull and consistent with full bosh deployment