-
Notifications
You must be signed in to change notification settings - Fork 106
Azure storage-cli integration #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add blobstore_configs.json.erb (combines buildpacks/droplets/packages/resource_pool)
- Update job specs to render one template
- Pre-start now writes storage_cli_config_{buildpacks,droplets,packages,resource_pool}.json
Co-Authored-By: johha <johannes.haass@sap.com>
jobs/cloud_controller_clock/templates/blobstore_configs.json.erb
Outdated
Show resolved
Hide resolved
jobs/cloud_controller_clock/templates/blobstore_configs.json.erb
Outdated
Show resolved
Hide resolved
jobs/cloud_controller_clock/templates/blobstore_configs.json.erb
Outdated
Show resolved
Hide resolved
jobs/cloud_controller_clock/templates/blobstore_configs.json.erb
Outdated
Show resolved
Hide resolved
jochenehret
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on bbl dev env, works.
|
question why do we need to render the .json files at pre-start time, rather than have them rendered via bosh templates? |
|
|
Ah, I see. BOSH templating sadly isn't super flexible for this sort of thing. I went down a rabbit hole today trying to see if there was any good way to share templating logic, but didn't find much. Still, it's unfortunate that we need to introduce an additional possible failure point in pre-start task for some templating... Is it possible to do something like the shared_job_templates instead? I think it would be something like 4 different templates in that directory: And then in each of the 3 jobs that needs them, use a symlink. You can see how this is done with setup_local_blobstore or any of the other files in that directory. I know this is less DRY than your method (4 files with duplicate content instead of 3), but has the advantage of being contained to the template rendering step of a BOSH deploy. |
We thought the shared_templates folder is a bit outdated and not used really, and that symlinks are not the preferred option, https://github.com/cloudfoundry/capi-release/tree/develop/shared_job_templates, commit 2f640cd. That is why we decided against symlinking. We tried with having a template in the shared_templates folder without symlink, that did not work out. |
|
My main concern is that if an error is encountered during pre-start, that is much harder for an operator to resolve than if it occurs during template rendering, since it will pause a deployment midway. I would think it'd be preferable to avoid more pre-start logic unless it was necessary. Maybe I'm missing something, but what about symlinks makes it worth the operational trade-off? Is it possible to have a step in pre-packaging to render the template variations to each job instead of symlinks? Of course, pre_packaging is discouraged by BOSH as well... |
|
That is true, your thought about not having it in pre-start sounds reasonable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we have a similar test for "cloud_controller_worker" and "cloud_controller_clock"?
New optional property in manifest: cc.[scope].blobstore_provider for each of buildpacks, droplets, packages, and resource_pool.
Default is nil (unset). If you set it to AzureRM, the job renders a storage_cli_config_[scope].json using the values under cc.[scope].connection_config (e.g., azure_storage_account_name, azure_storage_access_key, container_name, etc.).
If you leave it unset or set a non-Azure value, the template renders {} and existing behaviour is unchanged.
Manifest example:
A short explanation of the proposed change:
bosh-azure-storage-cli based blobstore client integration
An explanation of the use cases your change solves
bosh-azure-storage-cli based blobstore client is a potential replacement for deprecated fog libraries like azure fog
Links to any other associated PRs
Extend bosh-azure-storage-cli: new blob commands + upload timeout bosh-azure-storage-cli#22
ADR: Use Bosh Storage CLIs for Blobstore Operations cloud_controller_ng#4443
POC: bosh-azure-storage-cli based blobstore client cloud_controller_ng#4397
I have viewed signed and have submitted the Contributor License Agreement
I have made this pull request to the
developbranchI have run CF Acceptance Tests on bosh lite