-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
awoolt.yml | ||
/awoolt.yml | ||
/awoolt | ||
/demo/vault.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
|
||
Interactively browse vault/openbao in the terminal. | ||
|
||
![demo](demo/demo.gif) | ||
|
||
## 🚀 Installation | ||
|
||
```bash | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Output demo/demo.gif | ||
|
||
Set Framerate 60 | ||
Set Height 350 | ||
|
||
Hide | ||
Type "./demo/setup.sh" | ||
Enter | ||
Type "export VAULT_ADDR=http://localhost:8200" | ||
Enter | ||
Type "export CLICOLOR_FORCE=1" | ||
Enter | ||
Type "alias awoolt='./awoolt > /dev/null' && clear" | ||
Enter | ||
Show | ||
|
||
Type "awoolt -e kv" | ||
Enter | ||
Sleep 1 | ||
# select servers | ||
Enter | ||
Sleep 1 | ||
# select vm01 | ||
Enter | ||
Sleep 1 | ||
# select os | ||
Enter | ||
Sleep 1 | ||
# select user02 | ||
Down | ||
Sleep 1 | ||
Enter | ||
Sleep 0.5 | ||
Type "# Values should be printed here. No idea why the demo isn't working :(" | ||
Enter | ||
Sleep 3 | ||
|
||
Hide | ||
Type "./demo/teardown.sh" | ||
Enter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# backup vault token if exists | ||
if [ -f ~/.vault-token ]; then | ||
mv ~/.vault-token ~/.vault-token.bak | ||
fi | ||
|
||
# start vault server in backgroud and save pid | ||
vault server -dev > /dev/null 2>&1 & | ||
VAULT_PID=$! | ||
|
||
# write pid to file | ||
echo $VAULT_PID > ./demo/vault.pid | ||
|
||
export VAULT_ADDR=http://localhost:8200 | ||
|
||
# wait for vault server to start | ||
sleep 3 | ||
|
||
vault secrets enable kv > /dev/null | ||
vault kv enable-versioning kv > /dev/null | ||
vault kv put kv/servers/vm01/os/user01 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm01/os/user02 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm01/os/user03 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm01/web/user01 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm02/os/user01 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm03/os/user01 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm04/os/user01 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm05/os/user01 username=root password=toor > /dev/null | ||
vault kv put kv/servers/vm06/os/user01 username=root password=toor > /dev/null | ||
|
||
# disown the process | ||
disown $VAULT_PID | ||
|
||
# build awoolt | ||
go build . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# read pid from file | ||
VAULT_PID=$(cat ./demo/vault.pid) | ||
|
||
# restore vault token | ||
if [ -f ~/.vault-token.bak ]; then | ||
mv ~/.vault-token.bak ~/.vault-token | ||
fi | ||
|
||
# stop vault server | ||
kill "$VAULT_PID" | ||
|
||
# remove files | ||
rm ./demo/vault.pid | ||
rm awoolt |