Demo: Shared VPC
1. Demo: Shared VPC
Next, let's watch a demo that describes how to set up SharedVPC. We'll see what must be done to configure the host project and service projects. At the organization level, my login Stephanie. Wong currently has org admin and SharedVPC admin privileges. I can also assign the SharedVPC admin role to somebody else in my org. Switching over to my host project, I created a custom VPC called vpc1 and two subnets development and production. I also created two fireball rules, one to allow SSH to all instances in the network and one to allow ICMP traffic between instances in these subnets. In the SharedVPC page, first enable host project to be the host project by clicking set up SharedVPC. I'm going to select sharing individual subnets. This option allows you to share specific subnets in the host project VPC with your service project. Then select the vpc1 dev and prod subnets. Let's attach two service projects, development and production. Make sure the compute engine API has been enabled in each service project before attaching them. Here, you can edit the default permissions given to this service project. Then click save. We can now see host project is the SharedVPC host with two subnets and it has two attached service projects. This is also where you can add additional host project users and admins. Now I'm going to log into my development project owner account, John, who only has permission to that project. Switching to the development project, create a new VM. And add a development tag. Then select network shared with me from the host project so that you can select the dev subnet. Once it's done creating, copy the internal IP of the instance since you'll need it just in a second. Next, I'll switch to Mary's account, who is the owner of the production project. Create a new VM in the production subnet and add a production tag. Making sure to change the zone to the one in the production subnet region, select the prod subnet. When both VMs are done creating, you can see I can SSH into the prod instance and ping the dev instance's internal IP address since I've created the right firewall rules in the host project SharedVPC.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.