Last active
April 11, 2024 15:14
-
-
Save byronjones-elsevier/6a9cd10f512fc8411e095658e4d5bf93 to your computer and use it in GitHub Desktop.
onboarding.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Installing Homebrew - SUDO REQUIRED" | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
echo "Confirming Python2 version" | |
python --version | |
echo "Confirming Python 3 version" | |
python3 --version | |
echo "Installing Python PYENV and PYENV-VIRTUALENV" | |
brew install pyenv pyenv-virtualenv | |
echo "Installing Git CLI" | |
brew install git | |
echo "Installing Git HUB CLI" | |
brew install hub | |
echo "Installing Github CLI" | |
brew install gh | |
echo "Installing the NANO cli text editor" | |
brew install nano | |
echo "Creating the ZSH Profile for PYENV" | |
touch ~/.zprofile | |
echo "export PYENV_ROOT=$HOME/.pyenv/" > ~/.zprofile | |
echo "export PATH=$PYENV_ROOT/bin:$PATH" > ~/.zprofile | |
echo "eval ""$(pyenv init -)""" > ~/.zprofile | |
echo "eval ""$(pyenv virtualenv-init -)""" > ~/.zprofile | |
cp .zprofile .zshrc | |
echo "Checking PYENV Available Versions" | |
pyenv install --list | |
echo "Installing Docker Desktop" | |
brew install docker | |
docker --version | |
echo "Installing Ansible" | |
brew install ansible | |
echo "Installing TFENV" | |
brew unlink terraform | |
brew install tfenv | |
tfenv --version | |
tfenv install 1.0.11 | |
tfenv list | |
tfenv use 1.0.11 | |
echo "DEPREACTED - Installing SAML2AWS" | |
#echo "Configuration Instructions: https://elsevier.atlassian.net/wiki/spaces/TIO/pages/89152038429/ACCESS+How+to+Install+and+use+saml2aws" | |
#echo "You may want to add this to your bash/zsh profile: alias awslogon=\"saml2aws login --force && eval \$(saml2aws script) && export AWS_PROFILE=saml\" " | |
#brew install saml2aws | |
echo "Installing GO-AWS-SSO" | |
brew tap theurichde/go-aws-sso && brew install go-aws-sso | |
echo "Installing AWS CLI" | |
brew install awscli | |
echo "Installing WGet" | |
brew install wget | |
echo "Installing Powershell" | |
brew install powershell | |
echo "Installing K9S" | |
brew install K9S | |
echo "Installing KubeCTL" | |
brew install kubectl | |
echo "Installing Helm" | |
brew install Helm | |
echo "Installing miniKube" | |
brew install minikube | |
echo "Installing EKSCTL" | |
brew install EKSCTL | |
echo "Installing Find (the Mac version is old, and has issues with EKS-Control)" | |
brew install findutils | |
ln -f -s /usr/local/bin/gfind /usr/local/bin/find | |
echo "Install JQ" | |
brew install jq | |
echo "Install PIPENV" | |
brew install pipenv | |
echo "Installing latest BASH version" | |
brew install bash | |
echo "Installing VirtualBox - SUDO REQUIRED" | |
brew install VirtualBox | |
## Skip OpenShift, no longer used at Elsevier | |
## | |
## echo "Install OpenShift-CLI v3.6.0" | |
## #Download OpenShift-CLI v3.6.0 from: https://github.com/openshift/origin/releases/download/v3.6.0/openshift-origin-client-tools-v3.6.0-c4dd4cf-mac.zip | |
## cd ~/Downloads | |
## wget https://github.com/openshift/origin/releases/download/v3.6.0/openshift-origin-client-tools-v3.6.0-c4dd4cf-mac.zip -P ~/Downloads | |
## unzip ~/Downloads/openshift-origin-client-tools-v3.6.0-c4dd4cf-mac.zip -d ~/Downloads/openshift-origin-client-tools-v3.6.0-c4dd4cf-mac/ | |
## ls ~/Downloads/openshift-origin-client-tools-v3.6.0-c4dd4cf-mac | |
## cp ~/Downloads/openshift-origin-client-tools-v3.6.0-c4dd4cf-mac/oc /usr/local/bin | |
## echo "When you try to run OC, you will get a permissions issue." | |
## echo "Go to: Mac > System Preferences > Security & Privacy > General > \"Allow apps downloaded from\" " | |
## echo "to allow the app." | |
## oc version | |
echo "Creating ~/.ssh Directory" | |
mkdir ~/.ssh && cd ~/.ssh | |
chmod 700 ~/.ssh | |
echo "Creating ~/.ssh/id_rsa SSH Key" | |
printf "Please provide your username (Enter defaults to '$(id -nru)@science.regn.net') : " \ | |
&& read -r AD_ACCOUNT \ | |
&& AD_ACCOUNT=${AD_ACCOUNT:-$(id -nru)@science.regn.net} \ | |
&& ssh-keygen -t rsa -b 4096 -C "${AD_ACCOUNT}" | |
chmod 600 ~/.ssh/id_rsa | |
chmod 644 ~/.ssh/id_rsa.pub | |
ls -Al ~/.ssh | |
echo "Starting SSH Agent" | |
eval "$(ssh-agent -s)" | |
echo "Creating SSH Config File" | |
touch ~/.ssh/config | |
echo "Host *" > ~/.ssh/config | |
echo " AddKeysToAgent yes" > ~/.ssh/config | |
echo " UseKeychain yes" > ~/.ssh/config | |
echo " IdentityFile ~/.ssh/id_rsa" > ~/.ssh/config | |
echo "Adding SSH Key to Mac Keychain" | |
ssh-add -K ~/.ssh/id_rsa | |
echo "Copying SSH Public Key to clipboard, so you can paste it into:" | |
echo "https://github.com/settings/ssh/new" | |
pbcopy < ~/.ssh/id_rsa.pub | |
echo "After adding your SSH Key to Github, be sure to click the 'Configure SSO' button, and authorize your ssh key in all three Elsevier Organizations." | |
echo "You should also create a Github Personal Access Token, and add it to your profile as GITHUB_TOKEN=[key]" | |
echo "The Github Personal Access Token also needs the 'Configure SSO' button clicked and authorized in all three environments." | |
echo "Installing Visual Studio Code" | |
brew install --cask visual-studio-code | |
echo "Installing Visual Studio Code Extensions" | |
code --install extension 'aaron-bond.better-comments' | |
code --install extension 'alexcvzz.vscode-sqlite' | |
code --install extension 'codezombiech.gitignore' | |
code --install extension 'CoenraadS.bracket-pair-colorizer-2' | |
code --install extension 'dbaeumer.vscode-eslint' | |
code --install extension 'dogan-kasap.vscode-github-gist' | |
code --install extension 'donjayamanne.githistory' | |
code --install extension 'donjayamanne.jquerysnippets' | |
code --install extension 'eamodio.gitlens' | |
code --install extension 'esbenp.prettier-vscode' | |
code --install extension 'formulahendry.code-runner' | |
code --install extension 'golang.go' | |
code --install extension 'hashicorp.terraform' | |
code --install extension 'humao.rest-client' | |
code --install extension 'kenhowardpdx.vscode-gist' | |
code --install extension 'mechatroner.rainbow-csv' | |
code --install extension 'mhutchie.git-graph' | |
code --install extension 'mikestead.dotenv' | |
code --install extension 'mohsen1.prettify-json' | |
code --install extension 'ms-azuretools.vscode-azureappservice' | |
code --install extension 'ms-azuretools.vscode-azureresourcegroups' | |
code --install extension 'ms-azuretools.vscode-docker' | |
code --install extension 'ms-dotnettools.csharp' | |
code --install extension 'ms-kubernetes-tools.vscode-kubernetes-tools' | |
code --install extension 'ms-mssql.data-workspace-vscode' | |
code --install extension 'ms-mssql.mssql' | |
code --install extension 'ms-mssql.sql-database-projects-vscode' | |
code --install extension 'ms-python.python' | |
code --install extension 'ms-python.vscode-pylance' | |
code --install extension 'ms-toolsai.jupyter' | |
code --install extension 'ms-toolsai.jupyter-keymap' | |
code --install extension 'ms-toolsai.jupyter-renderers' | |
code --install extension 'ms-vscode-remote.remote-containers' | |
code --install extension 'ms-vscode-remote.remote-ssh' | |
code --install extension 'ms-vscode-remote.remote-ssh-edit' | |
code --install extension 'ms-vscode-remote.remote-wsl' | |
code --install extension 'ms-vscode-remote.vscode-remote-extensionpack' | |
code --install extension 'ms-vscode.azure-account' | |
code --install extension 'ms-vscode.cpptools' | |
code --install extension 'ms-vscode.powershell' | |
code --install extension 'ms-vsliveshare.vsliveshare' | |
code --install extension 'mtxr.sqltools' | |
code --install extension 'naumovs.color-highlight' | |
code --install extension 'oderwat.indent-rainbow' | |
code --install extension 'quicktype.quicktype' | |
code --install extension 'redhat.java' | |
code --install extension 'redhat.vscode-xml' | |
code --install extension 'redhat.vscode-yaml' | |
code --install extension 'ritwickdey.LiveServer' | |
code --install extension 'rust-lang.rust' | |
code --install extension 'techer.open-in-browser' | |
code --install extension 'twxs.cmake' | |
code --install extension 'VisualStudioExptTeam.vscodeintellicode' | |
code --install extension 'vscjava.vscode-java-debug' | |
code --install extension 'vscjava.vscode-java-dependency' | |
code --install extension 'vscjava.vscode-java-pack' | |
code --install extension 'vscjava.vscode-java-test' | |
code --install extension 'vscjava.vscode-maven' | |
code --install extension 'wholroyd.jinja' |
Quoted the echo commands where needed
Line 21: Added the Github GH CLI app
Line 55: Deprecated SAML2AWS
Line 60: Added GO-AWS-SSO
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Commented out OpenShift, no longer used.