Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share google cloud snapshot to another user

Hi I am curious is there a way to share my google cloud snapshot with another person, so that he can easily set up everything?

like image 810
SimonInNYC Avatar asked Jul 19 '16 22:07

SimonInNYC


People also ask

How do I share my Google Cloud instance?

Hover over “IAM & admin” and select “IAM” from the submenu. Click on “ADD” at the top of the page. In the new “Add members” window, add the Google account email address for the users or group you would like to assign the role to. In the “Roles” drop down menu under “Compute Engine” select “Compute Viewer”

How do I share images between projects in GCP?

Granting access to imagesGo to the IAM page in the Google Cloud console of the project that needs access to private images owned by another project. If prompted, select your project from the list. Remember to select the project that needs access to images stored in another project.

What is the difference between image and snapshot in GCP?

A machine image can be used to backup multiple disks at a time. A persistent disk snapshot can only backup a single disk at a time.


2 Answers

Assuming by sharing you mean "another user be able to create a VM which is a copy of mine but in their project". You could create a VM image rather than a snapshot, add the user as a READER on your project, then have them use gcloud compute instance create with --image-project and --image pointing to your VM image.

like image 200
Alexey Alexandrov Avatar answered Oct 09 '22 20:10

Alexey Alexandrov


There are multiple ways to achieve what you want.

  1. If you want the second person to have their own instance which is a duplicate of yours, then what you probably want to do is to take a snapshot of the root persistent disk, and create a new instance from that snapshot. You can find more details on how to do that here:

    https://cloud.google.com/compute/docs/disks/create-root-persistent-disks

    Note that in this case you probably want to add the second person's Google account to your project so that they can interact with the instance you create for them.

  2. Alternatively, you could create an account for the other person on your instance, then configure SSH to allow them to log in. You can find more details on how to set up SSH for Linux instances in Google Cloud here:

    https://cloud.google.com/compute/docs/instances/connecting-to-instance

like image 34
Ramesh Dharan Avatar answered Oct 09 '22 20:10

Ramesh Dharan