Overview¶
This directory contains Terraform configuration files that let you deploy the system project. This example is a good entry point for testing the reference architecture and learning how it can be incorportated into your own infrastructure as code processes.
Architecture¶
For an explanation of the components of the sandboxes reference architecture and the interaction flow, read the main Architecture section.
Before you begin¶
In this section you prepare a folder for deployment.
- Open the Cloud Console
-
Activate Cloud Shell \ At the bottom of the Cloud Console, a Cloud Shell session starts and displays a command-line prompt.
-
In Cloud Shell, clone this repository
-
Export variables for the working directories
Preparing the Sandboxes Folder¶
In this section you prepare your environment for deploying the system project.
-
Go to the Manage Resources page in the Cloud Console in the IAM & Admin menu.
-
Click Create folder, then choose Folder.
-
Enter a name for your folder. This folder will be used to contain the system and sandbox projects.
-
Click Create
-
Copy the folder ID from the Manage resources page, you will need this value later for use as Terraform variable.
Deploying the reference architecture¶
-
Set the project ID and region in the corresponding Terraform environment variables
-
Change directory into the Terraform example directory and initialize Terraform.
-
Apply the configuration. Answer
yes
when prompted, after reviewing the resources that Terraform intends to create.
Creating a sandbox¶
Now that the system project has been deployed, create a sandbox using the example cli.
-
Change directory into the example command-line tool directory
-
Install there required Python libraries
-
Create a Sandbox using the cli
Next steps¶
Your sandboxes infrastructure is ready, you may continue to use the example cli to create and delete sandboxes. At this point it is recommended that you:
- Review the detailed object and operating model
- Adapt the CLI to meet your organization's requirements