Name: bosh-gcscli
Owner: Cloud Foundry
Description: GCS for BOSH
Created: 2017-05-23 22:41:55.0
Updated: 2017-05-27 00:41:49.0
Pushed: 2018-05-09 23:09:46.0
Homepage: null
Size: 6946
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Golang CLI for uploading, fetching and deleting content to/from Google Cloud Storage. This tool exists to work with the bosh-cli and director.
This is not an official Google Product.
et github.com/cloudfoundry/bosh-gcscli
-gcscli --help
-gcscli -c config.json put <path/to/file> <remote-blob>
-gcscli -c config.json get <remote-blob> <path/to/file>
-gcscli -c config.json delete <remote-blob>
-gcscli -c config.json exists <remote-blob>```
The command line tool expects a JSON configuration file. Run bosh-gcscli --help
for details.
credentials_source
)static
: A service account key will be provided via the json_key
field.none
: No credentials are provided. The client is reading from a public bucket.gcloud auth application-default login
or a service account).
If they don't exist the client will fall back to none
behavior.gcloud auth login
).
These credentials will be used by the Makefile to create/destroy Google Cloud Storage buckets for testing.gcloud config set project <your project>
Storage Admin
role for your project and set the contents as
the environment variable GOOGLE_APPLICATION_CREDENTIALS
, for example:rt project_id=$(gcloud config get-value project)
rt service_account_name=bosh-gcscli-integration-tests
rt service_account_email=${service_account_name}@${project_id}.iam.gserviceaccount.com
entials_file=$(mktemp)
ud config set project ${project_id}
ud iam service-accounts create ${service_account_name} --display-name "Integration Test Access for bosh-gcscli"
ud iam service-accounts keys create ${credentials_file} --iam-account ${service_account_email}
ud project add-iam-policy-binding ${project_id} --member serviceAccount:${service_account_email} --role roles/storage.admin
rt GOOGLE_APPLICATION_CREDENTIALS="$(cat ${credentials_file})"
make test-fast-int
make clean-gcs
make help
to get started.For details on how to contribute to this project - including filing bug reports and contributing code changes - please see CONTRIBUTING.md.
This tool is licensed under Apache 2.0. Full license text is available in LICENSE.