| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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.
go get github.com/cloudfoundry/bosh-gcsclibosh-gcscli --helpbosh-gcscli -c config.json put <path/to/file> <remote-blob>bosh-gcscli -c config.json get <remote-blob> <path/to/file>bosh-gcscli -c config.json delete <remote-blob>bosh-gcscli -c config.json exists <remote-blob>If there is an encryption key present in the config, then an additional header is sent
bosh-gcscli -c config.json sign <remote-blob> <http action> <expiry>Where:
The command line tool expects a JSON configuration file. Run bosh-gcscli --help for details.
export project_id=$(gcloud config get-value project)
export service_account_name=bosh-gcscli-integration-tests
export service_account_email=${service_account_name}@${project_id}.iam.gserviceaccount.com
credentials_file=$(mktemp)
gcloud config set project ${project_id}
gcloud iam service-accounts create ${service_account_name} --display-name "Integration Test Access for bosh-gcscli"
gcloud iam service-accounts keys create ${credentials_file} --iam-account ${service_account_email}
gcloud project add-iam-policy-binding ${project_id} --member serviceAccount:${service_account_email} --role roles/storage.admin
export GOOGLE_SERVICE_ACCOUNT="$(cat ${credentials_file})"
export GOOGLE_APPLICATION_CREDENTIALS="$(cat ${credentials_file})"
export LC_ALL=C # fix `tr` complaining about "illegal byte sequence" on OSXFor 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.
| Back | FazBrowse Home | New Git URL |