Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INSTANCE_ID="$(curl -f -H Metadata-Flavor:Google ${URL}/id)"
SHOULD_HAVE_LOGS="$(curl -f -H Metadata-Flavor:Google ${URL}/attributes/should_have_logs)"

install_daisy() {
if ! gsutil cp gs://compute-image-tools/latest/linux/daisy .; then
if ! gcloud storage cp gs://compute-image-tools/latest/linux/daisy .; then
echo 'BuildFailed: Error pulling Daisy.'
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion daisy_integration_tests/step_copy_gcs_object.wf.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
],
"name": "consumer",
"metadata": {
"startup-script": "gsutil cp ${gcs_file} . \u0026\u0026 gsutil rm ${gcs_file} \u0026\u0026 echo 'SUCCESS ${key}' || echo 'FAILURE ${key}'"
"startup-script": "gcloud storage cp ${gcs_file} . \u0026\u0026 gcloud storage rm ${gcs_file} \u0026\u0026 echo 'SUCCESS ${key}' || echo 'FAILURE ${key}'"
},
"Scopes": [
"https://www.googleapis.com/auth/devstorage.read_write"
Expand Down
3 changes: 1 addition & 2 deletions docs/daisy-passing-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ the Sources bucket:
$client.Headers.Add('Metadata-Flavor', 'Google')
$url_to_query = 'http://metadata.google.internal/computeMetadata/v1/instance/attributes/daisy-sources-path'
$daisy_sources_path = ($client.DownloadString($url_to_query)).Trim()
& gsutil cp "${daisy_sources_path}/file.txt" file.txt
& gcloud storage cp "${daisy_sources_path}/file.txt" file.txt

This approach can be used to quickly and reliably download other scripts,
installers, and even very large files. Any instance created by Daisy will
automatically be given access to the appropriate Sources bucket.