Skip to content

HOWTO Create a Bucket for Collaboration

Eddie Belter edited this page Aug 1, 2019 · 2 revisions

For details on bucket CLI and policies, see the 'Buckets' wiki page

Questions to Ask the Collaborator

  • "Do you have a google account? If not, do you mind creating one?"
    • A Google linked account is needed to authenticate bucket access.
  • "Do you have the Google Cloud CLI (gcloud, gsutil) installed? If not, could you have it installed?"

Create the Bucket Using

The hlcloud command is located in the halllab/hlcloud docker

Now that we have our collaborator setup, a google group is needed to manage Hall Lab member access. In this example, we make a bucket to give ownership to the 'hall-lab-supernova-users' group, with access to a collaborator collab@abc.edu. We could specify additional groups, collaborator and even a service account for this bucket. Labels are also needed for the project and pipeline. These are used to track expenses and cloud usage.

$ hlcloud buckets make gs://mgi-test-bucket -p test-project -l test-pipeline -g hall-lab-supernova-users@wustl.edu -c collab@abc.edu
Make bucket: gs://mgi-test-bucket
Labels:
 User: mgi-user
 Project: mgi-project
 Pipeline: mgi-pipeline
Google cloud project: mgi-cloud
Running: gsutil mb gs://mgi-test-bucket
Running: gsutil iam set /tmp/iam.json gs://mgi-test-bucket
Running: gsutil label ch -l user:you -l project:test-project -l pipeline:test-pipeline gs://mgi-test-bucket
Update bucket labels...SUCCESS
Make bucket...SUCCESS

Verify Access

To verify access, create a README, adn copy it to the bucket.

$ hlcloud buckets readme > README

Edit README as needed, then copy to bucket.

$ gsutil cp README gs://mgi-test-bucket

Then, have the collaborator fetch the README, and copy back to the bucket as a different file name.

$ gsutil cp gs://mgi-test-bucket/README .
$ gsutil cp README gs://mgi-test-bucket/README.success

If that goes OK, the bucket is ready for use!

Clone this wiki locally