This is a terraform module for creating workshop environment. Main intention is to provide environments for hand-on practice for:
- Deploy Replicated on VM on GCP
- Configure Google Cloud provider (use service account credential type)
- Create database (one or more)
- Configure replication between database
- Configure backups
- Create Backup
- Restore from Backup
- Run sample application
- Demonstrate node failure
- Demonstrate scaling
This module will:
- Add participants to project
- Add instructors to project
- Create Portal VM for each group/org and instructors
- Grant access permissions to group members to their own group's Portal VM
- Grant access to instructors to all Portal VMs
- Create DNS record Portal VMs
- Create Lets Encrypt certificate to use with the portals
- Create Backup buckets
- Create service account with access to compute and backup buckets
- Create key for service account
- Create a Landing page for workshop attendees to get License, certs, VM info etc.
- Setup access expiry for participants
Administrator - Creator of workshop environment
- Google cloud project
- Terraform
- google-cloud-sdk
- Domain with Hosted Zone on GCP (Get free domain at freenom)
- Verified domain with google
Instructors - Conductors of workshop
- Yugabyte Trial License
- Zoom Session (Required if conducting online)
- Google account (Emails provided should be of a valid Google account. )
- (highly recommended) Workstation with working
gcloud
- Browser
- DBeaver or any other Postgres compatible SQL Tool
- Putty (recommended)
- Java (17 or higher)
Participants
- Google account (Emails provided should be of a valid Google account. )
- (highly recommended) Workstation with working
gcloud
- Browser
- DBeaver or any other Postgres compatible SQL Tool
- Putty (recommended)
- Java (17 or higher)
Create a terraform file with following content
module "workshop" {
source = "github.com/yogendra/yb-terraform-module-workshop-environment-gcp"
gcp-project-id = "project-id"
participants = {
org1 = [ "participant1@org1.com","participant2@org1.com" ]
org2 = [ "participant3@org2.com","participant4@org2.com", "participant5@org3.com"]
}
instructors = [
"instructor1@org3.com","instructor2@org3.com"
]
prefix = "ws01"
expiry = "2022-09-23T00:00:00Z"
domain = "workshops.example.com"
dns-zone = "hosted-dns-zone-name"
cert-email = "mymail@myorg.com"
license-file = "/path/to/license-file.rli"
}
output "instructions" {
value = module.workshop.instructions-url
}
participant
- a map of org name (dns naming compatible, lowercase, number and hyphens only) and participant email list. They can access machine only assigned to them.instructor
- list of emails for instructors. They have access to all the Machines for workshop
In case you need to add more participants or make any change, please refresh the state first before making the change and applying. Mainly the ssh keys get added to machines' metadata for users and you don't want to wipe them out
# Refresh state
terraform apply -refresh-only -auto-approve
This will output set of instructions that you can email to instructors and participants
- Add workshop script to follow
- Prepare yugaware nodes with required tools (yugabyte binary, nc, curl, wget, etc.)