forked from GoogleCloudPlatform/training-data-analyst
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
126edde
commit 978e586
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{# Outputs described in this special qwiklabs template will be surfaced #} | ||
{# back up to the student in the Qwiklabs UI, so you can say things like #} | ||
{# 'enter the name of the ExampleBucket we created for you' #} | ||
|
||
{# Create whatever cloud deployment magic you want here. #} | ||
{# See go/qwiklabs-deployment-manager for the available properties. #} | ||
resources: | ||
- name: allow-ssh | ||
type: compute.v1.firewall | ||
properties: | ||
network: global/networks/default | ||
sourceRanges: ["0.0.0.0/0"] | ||
allowed: | ||
- IPProtocol: TCP | ||
ports: ["22"] | ||
- name: iot | ||
type: compute.v1.instance | ||
properties: | ||
zone: {{ properties['zone'] }} | ||
machineType: zones/{{ properties['zone'] }}/machineTypes/n1-standard-1 | ||
disks: | ||
- deviceName: boot | ||
type: PERSISTENT | ||
boot: true | ||
autoDelete: true | ||
initializeParams: | ||
sourceImage: projects/debian-cloud/global/images/debian-9-stretch-v20170918 | ||
networkInterfaces: | ||
- network: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/global/networks/default | ||
accessConfigs: | ||
- name: External NAT | ||
type: ONE_TO_ONE_NAT |
39 changes: 39 additions & 0 deletions
39
self-paced-labs/cloud-iot-core/labinfra/qwiklabs_test_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
################################### | ||
## Sample Configuration for testing | ||
## Qwiklabs cloud deployments using | ||
## local gcloud tools | ||
## | ||
## Values in here subject to change | ||
## when the environment is launched | ||
## for a given Qwiklabs learner | ||
#################################### | ||
|
||
imports: | ||
- path: qwiklabs.jinja | ||
|
||
# Outputs here for your testing, so you can make | ||
# sure the right values are coming back from | ||
# the deployment. But the values Qwiklabs will | ||
# use are derived directly from the outputs of | ||
# the qwiklabs.jinja template. | ||
# | ||
# These, along with the rest of the file, are | ||
# ignored by Qwiklabs runtime environment | ||
outputs: | ||
|
||
# Similarly, this section should only include the | ||
# special 'qwiklabs' resource, properties available | ||
# for your testing, but all dev work should happen | ||
# under the qwiklabs.jinja template | ||
resources: | ||
- name: qwiklabs | ||
type: qwiklabs.jinja | ||
properties: | ||
zone: us-west1-a | ||
region: us-west1 | ||
userName: googlestudent | ||
userPassword: googlestudent | ||
sshPubKey: A123412341234 | ||
# NOTE: randomize this Uuid if you get namespace | ||
# conflicts when testing (e.g. duplicate bucket name) | ||
qwiklabsUuid: ql-1e433efb3jdfd |