Skip to content

Instantly share code, notes, and snippets.

@mswezey23
Last active August 19, 2020 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mswezey23/852e73832fcdd8c15eacca36fe307b51 to your computer and use it in GitHub Desktop.
Save mswezey23/852e73832fcdd8c15eacca36fe307b51 to your computer and use it in GitHub Desktop.
#!/bin/bash
### Functions ###
# get password from AWS Secrets Manager
function getCliSecrets {
RAW_SECRETS="$(aws secretsmanager get-secret-value --secret-id mgmt/cliTool/artifactory --region us-east-1)"
USERNAME="$(echo $RAW_SECRETS | jq -r '.SecretString' | jq -r '.username')"
PASSWORD="$(echo $RAW_SECRETS | jq -r '.SecretString' | jq -r '.password')"
API_KEY="$(echo $RAW_SECRETS | jq -r '.SecretString' | jq -r '.api_key')"
}
### Commands Begin ###
#echo "Installing Software..."
# Brew
#/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
#echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.bash_profile
#source ~/.bash_profile
# Python
#brew install pyenv
# workaround line below
# brew uninstall --ignore-dependencies readline
#pyenv install 3.6.9
#pyenv global 3.6.9
#echo -e "\nexport PATH=\""$(pyenv root)/shims:\$PATH\""" >> ~/.bash_profile
#source ~/.bash_profile
# undo workaround on line 10
# brew install readline
# maintaince items
# brew install pipx
# pip3 install --upgrade pip
# Setup pip.conf
#getCliSecrets
#mkdir ~/.pip
#echo "[global]" > ~/.pip/pip.conf
#echo "extra-index-url=https://${USERNAME}:${PASSWORD}@upside.jfrog.io/upside/api/pypi/upside-python/simple" >> ${HOME}/.pip/pip.conf
# getupsidecli
#pipx install getupsidecli
#sudo chmod -R 775 ~/.local/
#sudo chmod 775 /home/ec2-user/
# setup shortcuts
eval "$(curl -fsSL https://gist.githubusercontent.com/upside-github3/c8ad97c70f5664ad50c0ab55d266d5f3/raw)"
sudo cp ~/.cli_shortcuts.sh /opt/sourcefiles
sudo cp ~/.bash_profile /opt/sourcefiles
# sudo echo 'export PATH="/home/ec2-user/.local/bin:$PATH"' >> /opt/sourcefiles/.bash_profile
echo "Install Advance Access Server"
curl -C - https://pkg.scaleft.com/scaleft_yum.repo | sudo tee /etc/yum.repos.d/scaleft.repo
sudo rpm --import https://dist.scaleft.com/pki/scaleft_rpm_key.asc
sudo yum -y repolist
sudo yum -y install scaleft-server-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment