Skip to content

Conversation

@serdarozerr
Copy link

Context

This PR prepares the codebase for replacing the Fog library. Azure support through Fog will be removed in the future, so we need to start migrating away from it step by step.

Solution

A Go-based storage-cli client is being developed in this repository: https://github.com/cloudfoundry/storage-cli/
The project is still under development, and missing features are being added gradually. This client needs config json to run. With this PR we added .erb files to generate config files during deployment.

Links to any other associated PRs

  • I have viewed signed and have submitted the Contributor License Agreement

  • I have made this pull request to the develop branch

  • I have run CF Acceptance Tests on bosh lite

- templates updated to be compatible with storage-cli.
- All providers supported by storage-cli added into templates
- package for storage-cli created
- blob storage-cli dev version added to be tested
- Since these json's also consumed by storage-cli and this custom field not exist at storage-cli config struct. Even though go lang did not complain about extra fields, we should not add.
@serdarozerr serdarozerr changed the title Feature/storage cli Storage CLI Client Dec 16, 2025
- storage-cli/storage-cli-0.0.1-linux-amd64 uploaded into capi-release-blobs bucket
options["credentials_source"] = "static"
options["access_key_id"] = l.p("#{scope}.aws_access_key_id")
options["secret_access_key"] = l.p("#{scope}.aws_secret_access_key")
options["region"]=l.p("#{scope}.region")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"region" is not required by the original config, and it defaults to "us-east-1" (like AzureCloud for azure environment)

add_optional(options, "port", l.p("#{scope}.port", nil))
add_optional(options, "ssl_verify_peer", l.p("#{scope}.ssl_verify_peer", nil))
add_optional(options, "use_ssl", l.p("#{scope}.use_ssl", nil))
add_optional(options, "singnature_version", l.p("#{scope}.singnature_version", nil))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelling error: singnature_version -> signature_version

ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we stick to the naming like in cf-deployment.yml for webdav?
ca_cert:
blobstore_timeout:
password:
private_endpoint:
public_endpoint:
username:

add_optional(options, "port", l.p("#{scope}.port", nil))
add_optional(options, "ssl_verify_peer", l.p("#{scope}.ssl_verify_peer", nil))
add_optional(options, "use_ssl", l.p("#{scope}.use_ssl", nil))
add_optional(options, "singnature_version", l.p("#{scope}.singnature_version", nil))
Copy link
Contributor

@kathap kathap Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same spelling error as above and in all the other jsons ;)

@@ -0,0 +1,9 @@
storage-cli-package
============
storage-cli, a command line interface for interacting with storage provider like;Azure, Aliyun, Google, AWS and WebDav. It is used for BOSH deployments instead of outdated rubyfog tools.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean:
... provider like: Azure, ...

'host' => 'localhost',
'ssl_verify_peer' => 'verfiy',
'use_ssl' => 'true',
'singnature_version' => 'v4',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above ;) si(n)gnature_version

'aws_secret_access_key' => 'secret',
'region' => 'us-east1',
'host' => 'localhost',
'ssl_verify_peer' => 'verfiy',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verfiy -> verify, same in line 168 and in the other config jsons spec ;)


context "when provider is non-Azure for #{scope}" do
it 'renders {}' do
describe 'When Provider AWS' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny naming nit (no blocker):

  • in RSpec it reads a bit more naturally as context "when provider is AWS" (using “is”). It makes the example output read like a sentence, reads better in failure output and matches the usual when style. (Same for all other when parts).
  • Also maybe switch to lowercasing. lowercasing when helps the nested description read smoothly in failure messages. E.g. ... when provider is AzureRM ... feels more natural than ... When Provider ...

describe template_path do
let(:template) { job.template(template_path) }

it 'renders with valid config' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny wording suggestion:
"maps required properties into the rendered config"

)
end

it 'renders with optionals' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny wording suggestion:
"includes optional properties when provided"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants