This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
run-k8s-istio-webinar-full.sh
executable file
·62 lines (48 loc) · 1.88 KB
/
run-k8s-istio-webinar-full.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
set -eu
################################################
# include the magic
################################################
test -f ./demo-magic.sh || curl --silent https://raw.githubusercontent.com/paxtonhare/demo-magic/master/demo-magic.sh > demo-magic.sh
# shellcheck disable=SC1091
. ./demo-magic.sh -n
################################################
# Configure the options
################################################
#
# speed at which to simulate typing. bigger num = faster
#
export TYPE_SPEED=60
# Uncomment to run non-interactively
export PROMPT_TIMEOUT=0
# No wait
export NO_WAIT=false
#
# custom prompt
#
# see http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html for escape sequences
#
#DEMO_PROMPT="${GREEN}➜ ${CYAN}\W "
export DEMO_PROMPT="${GREEN}➜ ${CYAN}$ "
# hide the evidence
clear
### Please run these commands before running the script
# mkdir /var/tmp/test && cd /var/tmp/test
# docker run -it --rm -e USER="$USER" -v $HOME/.ssh:/root/.ssh:ro -v $HOME/.aws:/root/.aws -v $PWD:/mnt ubuntu
# echo $(hostname -I) $(hostname) >> /etc/hosts
# export LETSENCRYPT_ENVIRONMENT="staging" # production
# export MY_DOMAIN="mylabs.dev"
# apt-get update -qq && apt-get install -qq -y curl git pv > /dev/null
# cd /mnt
# git clone https://github.com/ruzickap/k8s-istio-webinar && cd k8s-istio-webinar
# ./run-k8s-istio-webinar-full.sh
sed '/^## Configure AWS/,/^Create policy allowing the cert-manager to change Route 53 settings./d' docs/part-{01..08}/README.md |
sed -n "/^\`\`\`bash.*/,/^\`\`\`$/p;/^-----$/p" |
sed \
-e 's/^-----$/\np ""\np "################################################################################################### Press <ENTER> to continue"\nwait\n/' \
-e 's/^```bash.*/\npe '"'"'/' \
-e 's/^```$/'"'"'/' \
-e '/^sleep/d' \
> README.sh
# shellcheck disable=SC1091,SC1094
source README.sh