From 64044f7cc49cc52232b5009f761360ac73c9c435 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 10 Jan 2023 11:26:46 -0500 Subject: [PATCH] Updated deploy user credentials and docs --- README.md | 4 +-- scripts/bootstrap.sh | 8 +++--- strap.sh | 58 ++++++++++++++++++++++---------------------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 7ee6c28..f23da58 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Generic server bootstrap to get some of the most basic utilities installed that ## Usage ```bash #!/usr/bin/env bash -## source <(curl -s https://digitalocean-user-data:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/strap.sh) defaults-bootstrap +## source <(curl -s https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/strap.sh) defaults-bootstrap ``` Copy the above into any server post install scripts box and it should get things going pretty quickly. @@ -13,5 +13,5 @@ Copy the above into any server post install scripts box and it should get things For example if you wanted to deploy to ovh you would use the following example. ```bash #!/usr/bin/env bash -source <(curl -s https://imp-bootstap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/strap.sh) bootstrap ovh gluster nosalt +source <(curl -s https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/strap.sh) bootstrap ovh gluster nosalt ``` diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index c00d5e6..06795f6 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -11,7 +11,7 @@ function digitalocean() { # hostname -f export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address) export PUBLIC_IPV6=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/address) -} +} ## Add anything for OVH here. function ovh() { echo Nothing special for DigitalOcean at this stage. @@ -97,7 +97,7 @@ echo Installing Salt case $3 in salt ) install_salt - + ;; nosalt ) echo Not installing salt. @@ -122,6 +122,6 @@ chmod +x /usr/local/bin/ctop ## This may no longer be required going forward, it'll be better to call it on first login instead with args. ## Force install ohmyzsh on first login - # curl -o /root/zsh-setup.sh https://imp-bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/do-userdata/raw/branch/main/scripts/zsh-setup.sh + # curl -o /root/zsh-setup.sh https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/do-userdata/raw/branch/main/scripts/zsh-setup.sh # echo zsh-setup >> ~/.profile - # source ~/.profile \ No newline at end of file + # source ~/.profile diff --git a/strap.sh b/strap.sh index 46da222..b4ebcec 100644 --- a/strap.sh +++ b/strap.sh @@ -4,38 +4,38 @@ set -e ## Basic deps DEBIAN_FRONTEND=noninteractive apt-get install -y curl wget -## source <(curl -s https://imp-bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/strap.sh) defaults-bootstrap +## source <(curl -s https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colinaa/bootstrap-scripts/raw/branch/main/strap.sh) defaults-bootstrap # curl -sL https://sentry.io/get-cli/ | bash # echo 'export SENTRY_DSN=https://4d089076433c4a7aa31bbb2741f053fe@sentry.aenow.com/3' # eval "$(sentry-cli bash-hook)" -curl -o /usr/local/sbin/zsh-setup https://imp-bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/scripts/zsh-setup.sh && chmod +x /usr/local/sbin/zsh-setup -curl -o /usr/local/sbin/bootstrap https://imp-bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/scripts/bootstrap.sh && chmod +x /usr/local/sbin/bootstrap -echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGLT6xx+pXQl6UfiVe0VTZkC45E/2YE/zfNrWb7mLMtI computer@dewitt.improvingmipractices.com" > /root/.ssh/authorized_keys - -## Run bootstrap -case $1 in - bootstrap ) - /usr/local/sbin/bootstrap $2 $3 $4 - ;; - defaults-bootstrap ) - /usr/local/sbin/bootstrap none nogluster nosalt - ;; - * ) - /usr/local/sbin/bootstrap none nogluster nosalt - ;; -esac -#!/usr/bin/env bash -set -e - -## Basic deps -DEBIAN_FRONTEND=noninteractive apt-get install -y curl wget - -## source <(curl -s https://imp-bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/strap.sh) defaults-bootstrap -# curl -sL https://sentry.io/get-cli/ | bash -# echo 'export SENTRY_DSN=https://4d089076433c4a7aa31bbb2741f053fe@sentry.aenow.com/3' -# eval "$(sentry-cli bash-hook)" -curl -o /usr/local/sbin/zsh-setup https://imp-bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/scripts/zsh-setup.sh && chmod +x /usr/local/sbin/zsh-setup -curl -o /usr/local/sbin/bootstrap https://imp-bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colin_/bootstrap-scripts/raw/branch/main/scripts/bootstrap.sh && chmod +x /usr/local/sbin/bootstrap +curl -o /usr/local/sbin/zsh-setup https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colinaa/bootstrap-scripts/raw/branch/main/scripts/zsh-setup.sh && chmod +x /usr/local/sbin/zsh-setup +curl -o /usr/local/sbin/bootstrap https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colinaa/bootstrap-scripts/raw/branch/main/scripts/bootstrap.sh && chmod +x /usr/local/sbin/bootstrap +echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGLT6xx+pXQl6UfiVe0VTZkC45E/2YE/zfNrWb7mLMtI computer@dewitt.improvingmipractices.com" > /root/.ssh/authorized_keys + +## Run bootstrap +case $1 in + bootstrap ) + /usr/local/sbin/bootstrap $2 $3 $4 + ;; + defaults-bootstrap ) + /usr/local/sbin/bootstrap none nogluster nosalt + ;; + * ) + /usr/local/sbin/bootstrap none nogluster nosalt + ;; +esac +#!/usr/bin/env bash +set -e + +## Basic deps +DEBIAN_FRONTEND=noninteractive apt-get install -y curl wget + +## source <(curl -s https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colinaa/bootstrap-scripts/raw/branch/main/strap.sh) defaults-bootstrap +# curl -sL https://sentry.io/get-cli/ | bash +# echo 'export SENTRY_DSN=https://4d089076433c4a7aa31bbb2741f053fe@sentry.aenow.com/3' +# eval "$(sentry-cli bash-hook)" +curl -o /usr/local/sbin/zsh-setup https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colinaa/bootstrap-scripts/raw/branch/main/scripts/zsh-setup.sh && chmod +x /usr/local/sbin/zsh-setup +curl -o /usr/local/sbin/bootstrap https://bootstrap:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/colinaa/bootstrap-scripts/raw/branch/main/scripts/bootstrap.sh && chmod +x /usr/local/sbin/bootstrap echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGLT6xx+pXQl6UfiVe0VTZkC45E/2YE/zfNrWb7mLMtI computer@dewitt.improvingmipractices.com" > /root/.ssh/authorized_keys ## Run bootstrap