You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Azure | 🚧 PoC in Progress|[PoC](https://github.com/cloudfoundry/cloud_controller_ng/pull/4397) done with `bosh-azure-storage-cli`|
10
+
| AWS | 🧭 Open for Contribution||
11
+
| GCP | 🧭 Open for Contribution||
12
+
|Alibaba Cloud| 🧭 Open for Contribution||
13
13
14
14
15
15
## Context
@@ -20,21 +20,23 @@ These Ruby gems are largely unmaintained, introducing risks such as:
20
20
* Blocking Ruby version upgrades
21
21
* Potential for unpatched CVEs
22
22
23
-
Bosh faces similar issues, as it is also written in Ruby and must interact with blobstores. To address this, BOSH introduced standalone CLI tools (e.g., `bosh-azure-storage-cli`, `bosh-s3cli`) which shell out from Ruby to handle all blobstore operations:
23
+
Bosh faces similar issues, as it is also written in Ruby and interacts with blobstores. To address this, Bosh introduced standalone CLI tools which shell out from Ruby to handle all blobstore operations:
This approach decouples core logic from Ruby gems and has proven to be robust in production.
30
30
These CLIs are implemented in Go and use the respective provider SDKs.
31
-
All BOSH storage CLIs currently implement a common interface with the following commands: `put`, `get`, `delete`, `exists`, and `sign`.
31
+
All Bosh storage CLIs implement a common interface with the following commands: `put`, `get`, `delete`, `exists`, and `sign`.
32
32
33
33
A [PoC](https://github.com/cloudfoundry/cloud_controller_ng/pull/4397) has shown that `bosh-azure-storage-cli` can be successfully used in Cloud Controller to push apps.
34
34
35
+
This ADR does not propose breaking changes to existing Bosh storage CLI commands or their output, but outlines necessary additions to support Cloud Controller use cases. It highlights shared concerns and encourages collaboration between Bosh and Cloud Controller.
36
+
35
37
## Decision
36
38
37
-
Cloud Controller will introduce support for CLI-based blobstore clients, starting with Azure.
39
+
Cloud Controller will introduce support for CLIbased blobstore clients, starting with Azure.
38
40
Specifically, we will:
39
41
* Add a new blobstore client using `bosh-azure-storage-cli`
40
42
* Shell out from Cloud Controller to perform blobstore operations
@@ -47,20 +49,71 @@ The `bosh-azure-storage-cli` needs to be extended with the following commands:
47
49
*`properties`
48
50
*`ensure-bucket-exists`
49
51
50
-
Other providers (AWS, GCP, Alibaba) will follow. Each will require equivalent blobstore clients and support for the above commands.
51
-
This will eventually allow us to remove all fog-related gems from Cloud Controller.
52
+
Other providers (AWS, GCP, Alibaba Cloud) will follow. Each will require equivalent blobstore clients and support for the above commands.
53
+
This will eventually allow us to remove all fogrelated gems from Cloud Controller.
52
54
53
55
## Consequences
54
56
55
-
* Enables removing of `fog-azure-rm` and all other fog related gems
57
+
* Enables the removal of `fog-azure-rm` and all other fog related gems
56
58
* Reduces long-term maintenance burden and potential security issues
57
59
* Allows providers to be migrated independently
58
60
* Increases initial complexity during migration phase
59
-
* With more consumers, interface changes in the BOSH storage CLIs may require more coordination
61
+
* With more consumers, interface changes in the Bosh storage CLIs may require more coordination
60
62
61
63
## Alternatives Considered
62
64
63
-
* Replace fog with newer Ruby gems → Maintenance risk persists
65
+
* Replace fog with newer Ruby gems → Maintenance risk persists and only a short-term solution
64
66
* Implement own blobstore client in Ruby → High development and testing effort
out, err, status =Open3.capture3(@azure_storage_cli_path.to_s, '-c', @config_file.to_s, 'exists', object_id.to_s)
81
+
returntrueif status.exitstatus.zero?
82
+
returnfalseif status.exitstatus ==3
83
+
rescueException => e
84
+
raiseBlobstoreError, e.inspect
85
+
end
86
+
raiseBlobstoreError, "Failed to check existence of az storage account object, code #{status.exitstatus}, output: '#{out}', error: '#{err}'"unless status.success?
0 commit comments