我是靠谱客的博主 懵懂钢笔,这篇文章主要介绍How to Share GCP Images with Other Users and Projects,现在分享给大家,希望可以做个参考。

Last updated on August 9, 2019

We always can share Compute Engine images, snapshots, and disks with other users outside of your project or organization. Basically users with read access to those resources can use them to complete operations in other projects and organizations. For example, if you grant a user read access to an image or snapshot in your project, they can use those resources to create persistent disks in their own projects.

Here is detailed steps how to share GCP (Google Cloud Platform) compute engine image cross user accounts and projects.

1. Log into your GCP

log_into_gcp.png?resize=800%2c328&ssl=1log_into_gcp.png?resize=800%2c328&ssl=1 1.1_cp.png?resize=800%2c413&ssl=11.1_cp.png?resize=800%2c413&ssl=1

2. Create a new image from Compute Engine ‘s images menu

new_image.png?resize=800%2c464&ssl=1new_image.png?resize=800%2c464&ssl=1 create_image.png?resize=800%2c394&ssl=1create_image.png?resize=800%2c394&ssl=1

3. Share Project with other users in IAM

4_add_a_new_member_for_iam.png?resize=800%2c444&ssl=14_add_a_new_member_for_iam.png?resize=800%2c444&ssl=1

4. Accept Google Developers Console project invitation

accept_gmail_invitation.png?resize=800%2c536&ssl=1accept_gmail_invitation.png?resize=800%2c536&ssl=1

5. Confirm project and image in another GCP account and activate Google Cloud Share.

5_google_platform_shell.png?resize=800%2c318&ssl=15_google_platform_shell.png?resize=800%2c318&ssl=1

6. Use Google Cloud Share command to copy image from one project to another project

6_copy_images_cross_projects.png?resize=800%2c407&ssl=16_copy_images_cross_projects.png?resize=800%2c407&ssl=1

Note: Use project_id in the command , not project name.

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[email protected]:~$ gcloud compute images list --project macro-key-14516 NAME PROJECT FAMILY DEPRECATED STATUS centos-6-v20180716 centos-cloud centos-6 READY centos-7-v20180716 centos-cloud centos-7 READY
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
........................ sql-2017-express-windows-2016-dc-v20180710 windows-sql-cloud sql-exp-2017-win-2016 READY sql-2017-standard-windows-2016-dc-v20180710 windows-sql-cloud sql-std-2017-win-2016 READY sql-2017-web-windows-2016-dc-v20180710 windows-sql-cloud sql-web-2017-win-2016 READY [email protected]:~$ gcloud projects list PROJECT_ID NAME PROJECT_NUMBER macro-key-14516 51Sec-GCP-1 1080804179409 sec-2-21000 51sec2 335678927754 [email protected]:~$ gcloud compute --project=sec-2-21000 images create image-2 --source-image=image-1-51sec-original --source-image-project=macro-key-14516 Created [https://www.googleapis.com/compute/v1/projects/sec-2-213000/global/images/image-2]. NAME PROJECT FAMILY DEPRECATED STATUS image-2 sec-2-21000 READY [email protected]:~$
复制代码
1

Youtube Video:

最后

以上就是懵懂钢笔最近收集整理的关于How to Share GCP Images with Other Users and Projects的全部内容,更多相关How内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(83)

评论列表共有 0 条评论

立即
投稿
返回
顶部