diff --git a/autotest/autotest.py b/autotest/autotest.py index abb9c971..3c58d6de 100755 --- a/autotest/autotest.py +++ b/autotest/autotest.py @@ -137,20 +137,16 @@ while i < len(actions): with open("nextstep","w") as f: f.write(str(i)) slide, snippet, method, data = actions[i] + _, _, next_method, _ = actions[i+1] + # If this command is immediately followed by ```wait ```, then assume a ```keys ``` + # comes immediately after. Once the appears on screen, send . + if next_method == "wait": + _, _, _, wait_for = actions[i+1] + _, _, _, stop_action = actions[i+2] + i += 2 + data = data.strip() - # Look behind at the last slide to see if 'wait' or 'keys' was defined. - # If so, we need to wait for the specified output and/or terminate the command with the specified keys. - if method == "wait": - wait_for = data - logging.info("Setting wait_for to: {}".format(data)) - i += 1 - continue - if method == "keys": - stop_action = data - logging.info("Setting stop_action to: {}".format(data)) - i += 1 - continue print(hrule()) print(slide.content.replace(snippet.content, ansi(7)(snippet.content))) print(hrule()) @@ -177,6 +173,7 @@ while i < len(actions): result = wait_for_success(wait_for=wait_for) if result is True: if stop_action: + logging.info("Got '{}', running stop_action: {}".format(wait_for, stop_action)) subprocess.check_call(["tmux", "send-keys", "{}".format(stop_action)]) wait_for_success() # Unset wait_for and stop_action so they don't carry over to the next loop. diff --git a/docs/sampleapp.md b/docs/sampleapp.md index 2c4b0274..04702396 100644 --- a/docs/sampleapp.md +++ b/docs/sampleapp.md @@ -135,22 +135,16 @@ Without further ado, let's start our application. cd ~/orchestration-workshop/dockercoins ``` - - - Use Compose to build and run all containers: ```bash docker-compose up ``` + + ] Compose tells Docker to build all container images (pulling @@ -215,22 +209,16 @@ class: extra-details docker-compose logs ``` - - - Stream container logs, starting at the last 10 lines for each container: ```bash docker-compose logs --tail 10 --follow ``` + + ] Tip: use `^S` and `^Q` to pause/resume log output. @@ -324,29 +312,20 @@ class: extra-details - run `top` to see CPU and memory usage (you should see idle cycles) - run `vmstat 1` to see I/O usage (si/so/bi/bo)
(the 4 numbers should be almost zero, except `bo` for logging) ]