This repository is derived from Bart Van Bos' excellent tsb-single-vm.
The idea is to leverage rake for provisioning TSB.
For learning Rake, I recommend Jim Weirich's two presentations:
-
Provision the VM. See instructions in the terraform subdirectory's readme file.
-
Ssh onto the VM
gcloud compute ssh ubuntu@tsb-vm
-
Before proceeding, check on the status of
cloud-init
to make sure the VM setup is complete:cloud-init status
-
On the VM, copy
config.yaml.template
to a file nameconfig.yaml
and edit it as follows:a. Under
tsb_repo
, enter your credentials.b. Select a scenario from the 'scenarios/' subdirectory. Alternatively build your own scenario.
-
Install tools kubectl, k9s, k3d, istioctl, tctl, vcluster, and step cli:
./install-tools.sh
-
Install TSB:
rake
Under the scenarios
directory, create a new directory named after your new scenario.
The contents of your scenario directory must include three files:
-
topology.yaml
: a list ofclusters
. For each cluster, at the very least supply a name. Fieldsregion
andzone
are optional, and are useful for specifying locality. Designate the management plane cluster withis_mp: true
. Workload clusters are onboarded by default. Can optionally specify not to onboard a workload cluster withonboard_cluster: false
. See existing scenarios for an example of a topology. -
deploy.sh
: a script that applies Kubernetes and TSB resources to build a scenario (deploy an application, configure ingress, etc..). This script is often accompanied with Kubernetes and TSB yaml files that are applied by the script. See existing scenarios for an example. -
info.sh
: a script that outputs any information you wish the user to have including sample commands to exercise or generate a load against a deployed application.