From a6c0b43329f5f6ac1a50740b5ad5c9cc32a429fe Mon Sep 17 00:00:00 2001 From: renaynay Date: Wed, 15 Jan 2020 16:51:32 +0100 Subject: [PATCH] made some clarifying changes to documents regarding volumes and updated quick start --- _docs/defining_tests.md | 20 ++++++++++---------- _docs/quick_start.md | 42 ++++++++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/_docs/defining_tests.md b/_docs/defining_tests.md index 5d4474f..d05e0de 100644 --- a/_docs/defining_tests.md +++ b/_docs/defining_tests.md @@ -224,13 +224,13 @@ Task runners are first defined at the root level of the test definition document task-runners: - name: task_1 volumes: - - name: myOutputFile # this volume will have read-write permissions, as that is the default - path: /path/to/output.json + - name: myVolume # this volume will have read-write permissions, as that is the default + path: /path/to/volume script: - inline: curl http://localhost:4000 >> output.json + inline: curl http://localhost:4000 >> /path/to/volume/output.json - name: task_2 script: - inline: print ${/path/to/output.json} + inline: cat /path/to/volume/output.json - name: task_3 script: inline: curl http://localhost:4000 >> output_2.json @@ -569,14 +569,14 @@ For example, the contents of a volume can be used to determine a subsequent proc task-runners: - name: task_1 volumes: - - name: myOutputFile - path: /path/to/output.json + - name: myVolume + path: /path/to/volume permissions: ro script: - inline: curl http://localhost:4000 >> output.json + inline: curl http://localhost:4000 >> /path/to/volume/output.json - name: task_2 script: - inline: print ${/path/to/output.json} + inline: cat /path/to/volume/output.json tests: - name: test_1 description: run a test @@ -595,12 +595,12 @@ tests: - name: common-network phases: - name: phase_1 - description: this phase runs first and writes to the volume "myOutputFile" + description: this phase runs first and writes to the file "output.json" in the volume "myVolume" tasks: - type: task_1 timeout: 3 m - name: phase_2 - description: this phase runs second and reads from myOutputFile + description: this phase runs second and reads from "output.json" in the volume "myVolume" tasks: - type: task_2 timeout: 3 m diff --git a/_docs/quick_start.md b/_docs/quick_start.md index 3efc081..90933eb 100644 --- a/_docs/quick_start.md +++ b/_docs/quick_start.md @@ -7,12 +7,19 @@ permalink: /quick_start ## TL;DR * [Sign up](https://genesis.whiteblock.io/) -* Install the [CLI](#run-your-test-definition-file) -* Download and [run](#run-your-test-definition-file) this Geth sample test: +* Install the CLI or download from [source](https://github.com/whiteblock/genesis-cli). +```bash +curl -sSf https://assets.whiteblock.io/cli/install.sh | sh +``` +* Clone our [repository](https://github.com/whiteblock/genesis-examples) of ready-made examples +```bash +git clone https://github.com/whiteblock/genesis-examples.git +``` +* Navigate to the `go-ethereum/simple-geth/` directory +* [Run](#run-your-test-definition-file) a Geth testnet: ```bash - curl https://raw.githubusercontent.com/whiteblock/genesis-examples/master/tutorials/tutorial.yaml >> geth.yaml - genesis run geth.yaml + genesis run geth.yaml ``` Looking to quickly build your own test definition file? Use the instructions below. @@ -62,13 +69,16 @@ sidecars: task-runners: - name: task_1 script: - inline: curl http://localhost:4000 >> output.json + inline: curl http://localhost:4000 >> /path/to/volume/output.json volumes: - - name: myOutputFile # name of the volume - path: /path/to/output.json # path where the volume should be located + - name: myVolume # name of the volume + path: /path/to/volume # path where the volume should be located - name: task_2 script: - inline: print ${output.json} + inline: cat /path/to/volume/output.json + volumes: + - name: myVolume # name of the volume + path: /path/to/volume # path where the volume should be located - name: task_3 script: inline: sleep 120 # pause for two minutes before moving on to the next task or process @@ -157,22 +167,28 @@ tests: description: this phase runs second and reads from output.json tasks: - type: task_2 - - type: task_3 + - type: task_3 + - name: phase_3 + description: this phase runs third and sleeps for 2 minutes + tasks: + - type: task_3 ``` ## Run your Test Definition File -### Step 1 - Download the Genesis CLI +### Step 1 - Sign Up +Sign up using the [Whiteblock Genesis Dashboard](https://genesis.whiteblock.io/) +### Step 2 - Install the Genesis CLI ```bash curl -sSf https://assets.whiteblock.io/cli/install.sh | sh ``` or download from [source](https://github.com/whiteblock/genesis-cli). -### Step 2 - Run your Test +### Step 3 - Run your Test ```bash -genesis run +genesis run ``` -### Step 3 - View Logs from the Test +### Step 4 - View Logs from the Test * Log into the [Genesis Dashboard](https://genesis.whiteblock.io/login). * Navigate to Logs in the left sidebar.