Skip to content

Commit

Permalink
docs: update screencasts to use apply command (#2624)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Weiße <[email protected]>
  • Loading branch information
daniel-weisse authored Nov 21, 2023
1 parent 71dc517 commit a6cf387
Show file tree
Hide file tree
Showing 8 changed files with 2,672 additions and 2,661 deletions.
11 changes: 7 additions & 4 deletions docs/screencasts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ cd .. && rm -rf ./constellation
```

This will:

+ build the container
+ run the expect based scripts
+ copy recordings into the assets folder of our docs
Expand All @@ -39,13 +40,11 @@ There are three different locations were styling is applied:
1. **The prompt** is styled using [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code).
More explanation and the actual color codes can be found in [Dockerfile](docker/Dockerfile).
2. **Player dimensions** are passed to the [`AsciinemaWidget`](../src/components/AsciinemaWidget/index.js)
when it's [embedded in the docs](../docs/workflows/verify-cli.md#5). Check the `asciinema-player` for a
when it's [embedded in the docs](../docs/workflows/verify-cli.md). Check the `asciinema-player` for a
[full list of options](https://github.com/asciinema/asciinema-player#options).
1. **Everything else** is [styled via CSS](../src/css/custom.css). This includes the option to build a custom
3. **Everything else** is [styled via CSS](../src/css/custom.css). This includes the option to build a custom
[player theme](https://github.com/asciinema/asciinema-player/wiki/Custom-terminal-themes).

###

## GitHub README.md

The GitHub `README.md` doesn't support embedding the JavaScript `asciinema-player`, therefore we generate an
Expand All @@ -57,5 +56,9 @@ The GitHub `README.md` doesn't support embedding the JavaScript `asciinema-playe
pip3 install termtosvg

# Generate SVG. This takes ~10min, since it actually creates a cluster in GCP.
mkdir constellation
./generate-readme-svg.sh
sudo chown -R $USER:$USER ./constellation
cd constellation && constellation iam destroy
cd .. && rm -rf ./constellation
```
20 changes: 10 additions & 10 deletions docs/screencasts/generate-readme-svg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
#

# Create IAM configuration
pushd constellation || exit
constellation config generate gcp
constellation iam create gcp --update-config --projectID constellation-331613 --serviceAccountID constellation-demo --zone europe-west3-b --yes
popd || exit
docker run -it \
-v "${HOME}"/.config/gcloud:/root/.config/gcloud \
-v "$(pwd)"/recordings:/recordings \
-v "$(pwd)"/constellation:/constellation \
screenrecodings /scripts/configure-cluster.expect

docker build -t screenrecodings docker

Expand Down Expand Up @@ -40,9 +41,8 @@ cp readme.svg ../static/img/shell-windowframe.svg
rm readme.svg new_header.cast

# cleanup Constellation
sudo chown -R "$USER":"$USER" ./constellation
pushd constellation || exit
constellation terminate -y
constellation iam destroy -y
rm -rf ./*
popd || exit
docker run -it \
-v "${HOME}"/.config/gcloud:/root/.config/gcloud \
-v "$(pwd)"/recordings:/recordings \
-v "$(pwd)"/constellation:/constellation \
screenrecodings /scripts/terminate-cluster.expect
Loading

0 comments on commit a6cf387

Please sign in to comment.