boot your sh
List of steps for installing libsh:
- git clone https://github.com/aaronaddleman/libsh
- add libsh to your init files:
- .zshrc
- .zshenv
- cp .libshrc_example to $HOME/.libshrc
- (optional) create $HOME/.sh.d/ and any filename.sh or filename.env.sh file will be loaded
echo "source $(pwd)/libsh.sh \"fn\"" >> $HOME/.zshrc
echo "source $(pwd)/libsh.sh \"env\"" >> $HOME/.zshenv
cp .libshrc_example $HOME/.libshrc
source $LIBSH_REPO_PATH/libsh.sh \"fn\"" >> $HOME/.zshrc
source $LIBSH_REPO_PATH/libsh.sh \"env\"" >> $HOME/.zshenv
cp .libshrc_example $HOME/.libshrc
libsh.sh
- This is the main file that loads libsh files and environment variables.
.libshrc_example
- Example configuration file for settings to be used in your shell and libsh.
$HOME/.config/libsh/hc_vaults.json
- Configuration file for multiple HashiCorp Vault servers
Creating a file like the following allows you to select vaults
cat $HOME/.config/libsh/hc_vaults.json
[
{
"name": "name_of_vault",
"url": "https://hostname.of.vault.org:8200",
"auth_user": "yourAccount",
"auth_method": "ldap"
},
{
"name": "another_vault",
"url": "https://hostname.of.vault.org:8200",
"auth_user": "yourAccount",
"auth_method": "manual"
}
]
To run LIBSH inside jupyterlabs:
-
install docker
-
git clone https://github.com/aaronaddleman/libsh
-
source libsh
source libsh/libsh.sh fn
-
run function
jupyter_labs_docker_base $PWD
-
wait for it to run bootstrapping
-
keep an eye out for something that looks like:
Executing the command: jupyter lab info Wrote default config file to ~/.config/code-server/config.yaml info Using config file ~/.config/code-server/config.yaml info Using user-data-dir ~/.local/share/code-server info code-server 3.4.1 48f7c2724827e526eeaa6c2c151c520f48a61259 info HTTP server listening on https://0.0.0.0:8080 info - Using password from ~/.config/code-server/config.yaml info - To disable use `--auth none` info - Using generated certificate and key for HTTPS Generating a RSA private key ...............................................+++++
and for this something like this
To access the notebook, open this file in a browser: file:///home/addlema/.local/share/jupyter/runtime/nbserver-599-open.html Or copy and paste one of these URLs: https://12e4fce42da3:8888/?token=872e23100b584bd35d1d084161c7297897a45f6fc0deb459 or https://127.0.0.1:8888/?token=872e23100b584bd35d1d084161c7297897a45f6fc0deb459
-
based on the info above you can now point your browser to these urls:
# jupterlabs https://127.0.0.1:8888/?token=872e23100b584bd35d1d084161c7297897a45f6fc0deb459
and
# code-server https://177.0.0.1:8080
-
open up a terminal in jupyterlabs and type the following
bash src/libsh/scripts/install_the_sink.sh
then go for a walk around the block... this takes a long time...
-
at some point your asked for your country code(s)
2 for america 85 for Los Angeles
-
let the install continue
-
at some point you should see
__ __ ____ / /_ ____ ___ __ __ ____ _____/ /_ / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ / /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / \____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ /____/ ....is now installed!
-
at this point, ohmyzsh has started a new shell... type the command
exit
-
run the command
ohmyzsh_install_spaceship
-
exit the shell(s)
-
start a new one
-
and your done