{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry/bosh-notes/issues/4","labels_url":"https://api.github.com/repos/cloudfoundry/bosh-notes/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/bosh-notes/issues/4/comments","events_url":"https://api.github.com/repos/cloudfoundry/bosh-notes/issues/4/events","html_url":"https://github.com/cloudfoundry/bosh-notes/issues/4","id":68656685,"number":4,"title":"Stemcell builder improvements","user":{"login":"allomov","id":122246,"avatar_url":"https://avatars.githubusercontent.com/u/122246?v=3","gravatar_id":"","url":"https://api.github.com/users/allomov","html_url":"https://github.com/allomov","followers_url":"https://api.github.com/users/allomov/followers","following_url":"https://api.github.com/users/allomov/following{/other_user}","gists_url":"https://api.github.com/users/allomov/gists{/gist_id}","starred_url":"https://api.github.com/users/allomov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allomov/subscriptions","organizations_url":"https://api.github.com/users/allomov/orgs","repos_url":"https://api.github.com/users/allomov/repos","events_url":"https://api.github.com/users/allomov/events{/privacy}","received_events_url":"https://api.github.com/users/allomov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-15T11:38:00Z","updated_at":"2015-09-22T03:49:07Z","closed_at":null,"body":"Currently it is hard to build stemcells, especially if you want to build them to a new clouds.\r\n\r\nThere are several reasons for it:\r\n- you have to patch bosh, I had to patch bosh-release, bosh-stemcell, bosh-dev projects except of stemcell_builder.\r\n- it takes a lot of time to check your changes had necessary effects\r\n- you can’t build “light” stemcells for new infrastructures easily using current BOSH stemcell builder.\r\n\r\nI suppose that live would be much more better after BOSH will go from compiling MicroBOSH into stemcell, but still there are some possible ways to improve it.\r\n\r\nHere are some suggestions to improve stemcell builder:\r\n- **Run stemcell builder locally**. I had customers that didn’t wanted to use any external infrastructure (like AWS) to build stemcell, this meant they wanted to run them into their IaaS. Vagrant box didn’t played well in such situations because of absence of nested virtualization.\r\n- **Build “light” stemcells for external clouds**. Some clouds doesn’t have “custom images” as a feature. And the only one option there is to build instance templates from existing VMs. For this kind of solutions it is necessary to run stemcell builder on the cloud instence and build stemcell into attached disks or a system disk.\r\n- **Rollback of state of file system after failed stages**. Currently you spend a lot of time rebuilding stemcell after small changes that leaded to errors. I suggest to use something like aufs to keep state of file system to rollback after stage failed. This will speed up development process.\r\n- **Declarative way to define stages**. That's ok to have such DSL as BOSH currently has, but it would be much more easier for people not to mess with ruby code in stage_collection.rb file, but to pass some .yml manifest to the builder.\r\n\r\nAlso I have a strange feeling that it would be better to rewrite stemcell builder in go lang :)\r\n\r\nWhat do you think ? "},"comment":{"url":"https://api.github.com/repos/cloudfoundry/bosh-notes/issues/comments/142171519","html_url":"https://github.com/cloudfoundry/bosh-notes/issues/4#issuecomment-142171519","issue_url":"https://api.github.com/repos/cloudfoundry/bosh-notes/issues/4","id":142171519,"user":{"login":"cppforlife","id":185847,"avatar_url":"https://avatars.githubusercontent.com/u/185847?v=3","gravatar_id":"","url":"https://api.github.com/users/cppforlife","html_url":"https://github.com/cppforlife","followers_url":"https://api.github.com/users/cppforlife/followers","following_url":"https://api.github.com/users/cppforlife/following{/other_user}","gists_url":"https://api.github.com/users/cppforlife/gists{/gist_id}","starred_url":"https://api.github.com/users/cppforlife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppforlife/subscriptions","organizations_url":"https://api.github.com/users/cppforlife/orgs","repos_url":"https://api.github.com/users/cppforlife/repos","events_url":"https://api.github.com/users/cppforlife/events{/privacy}","received_events_url":"https://api.github.com/users/cppforlife/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T03:49:06Z","updated_at":"2015-09-22T03:49:06Z","body":"> I suppose that live would be much more better after BOSH will go from compiling MicroBOSH into stemcell, but still there are some possible ways to improve it. \r\n\r\nYes. We already started to benefit from it, when it's necessary to make CPI changes. The only time it's necessary to build a stemcell now is if you want to change the agent or make changes to the OS.\r\n\r\n> Run stemcell builder locally\r\n\r\nWas docker available in such environment?\r\n\r\n> Rollback of state of file system after failed stages\r\n\r\nHave you see resume_from mentioned in https://github.com/cloudfoundry/bosh/tree/master/bosh-stemcell#when-things-go-sideways?\r\n\r\n> Declarative way to define stages\r\n\r\nAgreed. I do want to preserve certain level of enforcement that all Ubuntu's are the same, regardless which cloud it's for."}}