eitansuez / minitsb-rake

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Readme

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:

  1. Basic Rake
  2. Power Rake

Basic recipe

  1. Provision the VM. See instructions in the terraform subdirectory's readme file.

  2. Ssh onto the VM

    gcloud compute ssh ubuntu@tsb-vm
  3. Before proceeding, check on the status of cloud-init to make sure the VM setup is complete:

    cloud-init status
  4. On the VM, copy config.yaml.template to a file name config.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.

  5. Install tools kubectl, k9s, k3d, istioctl, tctl, vcluster, and step cli:

    ./install-tools.sh
  6. Install TSB:

    rake

Scenario convention

Under the scenarios directory, create a new directory named after your new scenario.

The contents of your scenario directory must include three files:

  1. topology.yaml: a list of clusters. For each cluster, at the very least supply a name. Fields region and zone are optional, and are useful for specifying locality. Designate the management plane cluster with is_mp: true. Workload clusters are onboarded by default. Can optionally specify not to onboard a workload cluster with onboard_cluster: false. See existing scenarios for an example of a topology.

  2. 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.

  3. 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.

About


Languages

Language:Ruby 76.0%Language:Shell 20.8%Language:HCL 3.2%