Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/motd #47

Merged
merged 6 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"set-git-config-line-endings": "git config --global core.autocrlf input",
"set-git-config-gpg-program": "git config --global --add gpg.program /usr/bin/gpg"
},
"postAttachCommand": {
"print-message-of-the-day": "bash /etc/update-motd.d/00-header"
},
"customizations": {
"vscode": {
"extensions": [
Expand Down
44 changes: 44 additions & 0 deletions hashiqube/basetools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,50 @@ cat <<EOF | sudo tee /etc/update-motd.d/00-header
#!/bin/bash
/usr/bin/toilet --gay -f standard hashiqube0 -w 170
printf "%s"

if [[ \$CODESPACES == true ]]; then
printf "\n"
printf '\e[33;0;36m'"Welcome! You are running HashiQube in a Github Codespace. The information below will help you get started!\n"
printf '\e[33;0;36m'"You are in the /vagrant folder because this lab also runs in Vagrant, and many of the scripts depends on this path.\n"
printf "\n"
printf '\e[33;1;93m'" * Hashiqube Documentation: \e[38;5;198m https://hashiqube.com\n"
printf '\e[33;1;93m'" * Start Vault: \e[38;5;198m bash vault/vault.sh\n"
printf '\e[33;1;93m'" * Access Vault Web UI: \e[38;5;198m Click on the Globe in the Ports Tab in port 8200\n"
printf '\e[33;1;93m'" * Get Vault Root token: \e[38;5;198m cat /etc/vault/init.file'\n"
printf '\e[33;1;93m'" * Get Vault Status: \e[38;5;198m vault status\n"
printf '\e[33;1;93m'" * Start Nomad: \e[38;5;198m bash nomad/nomad.sh\n"
printf '\e[33;1;93m'" * Access Nomad Web UI: \e[38;5;198m Click on the Globe in the Ports Tab in port 4646\n"
printf '\e[33;1;93m'" * Get Nomad Job Status: \e[38;5;198m nomad job status\n"
printf '\e[33;1;93m'" * Get Nomad Server Members:\e[38;5;198m nomad server members\n"
printf '\e[33;1;93m'" * Start Consul: \e[38;5;198m bash consul/consul.sh\n"
printf '\e[33;1;93m'" * Access Consul Web UI: \e[38;5;198m Click on the Globe in the Ports Tab in port 8500\n"
printf '\e[33;1;93m'" * Get Consul Info: \e[38;5;198m consul info\n"
printf '\e[33;1;93m'" * Get Consul Members: \e[38;5;198m consul members -wan\n"
printf '\e[33;1;93m'" * Start Terraform: \e[38;5;198m bash localstack/localstack.sh\n"
printf '\e[33;1;93m'" * Terraform Plan/Apply: \e[38;5;198m cd localstack; terraform plan; terraform apply;\n"
printf "\n"
else
printf "\n"
printf '\e[33;0;36m'"Welcome! You are running HashiQube. The information below will help you get started!\n"
printf '\e[33;0;36m'"You are in the /vagrant folder because this lab also runs in Vagrant, and many of the scripts depends on this path.\n"
printf "\n"
printf '\e[33;1;93m'" * Hashiqube Documentation: \e[38;5;198m https://hashiqube.com\n"
printf '\e[33;1;93m'" * Start Vault: \e[38;5;198m bash vault/vault.sh\n"
printf '\e[33;1;93m'" * Access Vault Web UI: \e[38;5;198m Open http://localhost:8200\n"
printf '\e[33;1;93m'" * Get Vault Root token: \e[38;5;198m cat /etc/vault/init.file'\n"
printf '\e[33;1;93m'" * Get Vault Status: \e[38;5;198m vault status\n"
printf '\e[33;1;93m'" * Start Nomad: \e[38;5;198m bash nomad/nomad.sh\n"
printf '\e[33;1;93m'" * Access Nomad Web UI: \e[38;5;198m Open http://localhost:4646\n"
printf '\e[33;1;93m'" * Get Nomad Job Status: \e[38;5;198m nomad job status\n"
printf '\e[33;1;93m'" * Get Nomad Server Members:\e[38;5;198m nomad server members\n"
printf '\e[33;1;93m'" * Start Consul: \e[38;5;198m bash consul/consul.sh\n"
printf '\e[33;1;93m'" * Access Consul Web UI: \e[38;5;198m Open http://localhost:8500\n"
printf '\e[33;1;93m'" * Get Consul Info: \e[38;5;198m consul info\n"
printf '\e[33;1;93m'" * Get Consul Members: \e[38;5;198m consul members -wan\n"
printf '\e[33;1;93m'" * Start Terraform: \e[38;5;198m bash localstack/localstack.sh\n"
printf '\e[33;1;93m'" * Terraform Plan/Apply: \e[38;5;198m cd localstack; terraform plan; terraform apply;\n"
printf "\n"
fi
EOF

echo -e '\e[38;5;198m'"++++ "
Expand Down
Loading