From 0631d53ab43d4b58310b8133b597a198544255e9 Mon Sep 17 00:00:00 2001 From: computer Date: Wed, 10 Nov 2021 13:27:42 -0500 Subject: [PATCH] f --- README.md | 2 ++ hasql.nixc.us/.bash_login | 8 ++++++++ hasql.nixc.us/user-data.sh | 13 +++++++------ 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 hasql.nixc.us/.bash_login diff --git a/README.md b/README.md index e69de29..b55fea2 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,2 @@ +## Scope +Digital Ocean droplet "user data" instruction set for bootstrapping a Digital Ocean droplet to certain specifications required for deployment scopes. Each branch should contain a bootstrap instruction set to restore a droplet to the latest update of a configuration. This way one static file can be updated and a droplet can be more like a container designed to be "as ephemeral as possible" diff --git a/hasql.nixc.us/.bash_login b/hasql.nixc.us/.bash_login new file mode 100644 index 0000000..bcc585b --- /dev/null +++ b/hasql.nixc.us/.bash_login @@ -0,0 +1,8 @@ +## Setup ZSH and ohmyzsh theme +# cd /root/ +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended +# echo y|sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +chsh -s $(which zsh) +sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pygmalion"/g' /root/.zshrc +source /root/zshrc +rm -f /root/.bash_login diff --git a/hasql.nixc.us/user-data.sh b/hasql.nixc.us/user-data.sh index d068ec3..92ec1ec 100644 --- a/hasql.nixc.us/user-data.sh +++ b/hasql.nixc.us/user-data.sh @@ -1,8 +1,13 @@ #!/usr/bin/env bash +set -e +export SENTRY_DSN=https://d7eb76933ae046c9a4fd3d29572b1462:3aba191d95a648118e78cc5f81cbd92c@sentry.adventuresinnewmedia.com/43 +eval "$(sentry-cli bash-hook)" + ## digitalocean-user-data sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns ## digitalocean-user-data@nixc.us ## source <(curl -s https://digitalocean-user-data:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/Colin_/do-userdata/raw/branch/master/hasql.nixc.us/user-data.sh) +curl -sL https://sentry.io/get-cli/ | bash export HOSTNAME=$(curl -s http://169.254.169.254/metadata/v1/hostname) echo $HOSTNAME > /etc/hostname hostname -F /etc/hostname @@ -24,12 +29,8 @@ apt-get update apt-get dist-upgrade -y apt-get install -y iftop htop glances zsh glusterfs-server glusterfs-client salt-minion -## Setup ZSH and ohmyzsh theme -# cd /root/ -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended -#echo y|sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -chsh -s $(which zsh) -sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pygmalion"/g' /root/.zshrc +## Force install ohmyzsh on first login +curl -o /root/.bash_login https://digitalocean-user-data:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/Colin_/do-userdata/raw/branch/master/hasql.nixc.us/user-data.sh ## Install docker-compose and docker using convenience scripts curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose