我是靠谱客的博主 懵懂钢笔,最近开发中收集的这篇文章主要介绍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.

[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
........................
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]:~$

Youtube Video:

最后

以上就是懵懂钢笔为你收集整理的How to Share GCP Images with Other Users and Projects的全部内容,希望文章能够帮你解决How to Share GCP Images with Other Users and Projects所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部