Skip to content

Commit

Permalink
Merge pull request #47 from star3am/feature/motd
Browse files Browse the repository at this point in the history
Feature/motd
  • Loading branch information
star3am authored Jul 31, 2024
2 parents 668f599 + dc569fd commit d33a765
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
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

0 comments on commit d33a765

Please sign in to comment.