diff --git a/.bash_profile.khan b/.bash_profile.khan index e9b9d2b..e0f9ae2 100644 --- a/.bash_profile.khan +++ b/.bash_profile.khan @@ -50,9 +50,6 @@ if [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "arm64" ]; then alias brew86="arch -x86_64 /usr/local/bin/brew $@" fi -# Add a mykeeper alias to run keeper with KA config -alias mykeeper="keeper --config $HOME/.keeper-config.json" - if [ "$(uname -s)" = "Darwin" ]; then # Setting this allows us to store ssh-keys in the keychain without generating # a warning. See ssh-add man page. diff --git a/.zprofile.khan b/.zprofile.khan index ebf6194..e324eaf 100644 --- a/.zprofile.khan +++ b/.zprofile.khan @@ -52,9 +52,6 @@ if [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "arm64" ]; then alias brew86="arch -x86_64 /usr/local/bin/brew $@" fi -# Add a mykeeper alias to run keeper with KA config -alias mykeeper="keeper --config $HOME/.keeper-config.json" - # Setting this allows us to store ssh-keys in the keychain without generating # a warning. See ssh-add man page. export APPLE_SSH_ADD_BEHAVIOR=macos diff --git a/bin/mac-setup-keeper.sh b/bin/mac-setup-keeper.sh deleted file mode 100755 index c64c611..0000000 --- a/bin/mac-setup-keeper.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env sh - -# Bail on any errors -set -e - -# Install in $HOME by default, but can set an alternate destination via $1. -ROOT=${1-$HOME} -mkdir -p "$ROOT" - -# the directory all repositories will be cloned to -REPOS_DIR="$ROOT/khan" - -# derived path location constants -DEVTOOLS_DIR="$REPOS_DIR/devtools" -KACLONE_BIN="$DEVTOOLS_DIR/ka-clone/bin/ka-clone" - -# Load shared setup functions. -. "$DEVTOOLS_DIR"/khan-dotfiles/shared-functions.sh - -# We want to run this only with the brew version of python, NOT OSX's python3 -install_keeper $(brew --prefix)/bin/python3 -echo - -create_default_keeper_config - -echo -echo "To test keeper is working, run: mykeeper list" -echo "(KA alias mykeeper='keeper --config \$HOME/.keeper-config.json')" diff --git a/setup.sh b/setup.sh index 66f154f..c8ba055 100755 --- a/setup.sh +++ b/setup.sh @@ -335,8 +335,6 @@ install_deps # pre-reqs: clone_repos, install_and_setup_gcloud install_hooks # pre-req: clone_repos download_db_dump # pre-req: install_deps create_pg_databases # pre-req: install_deps -create_default_keeper_config # pre-req: update_userinfo -install_keeper echo echo "---------------------------------------------------------------------" diff --git a/shared-functions.sh b/shared-functions.sh index f0314b3..613e8c5 100644 --- a/shared-functions.sh +++ b/shared-functions.sh @@ -228,55 +228,6 @@ pip3_install() { || "$PIP3" install "$@" } -# Creates keeper config for command line access -# This is interactive -create_default_keeper_config() { - config_file=${HOME}/.keeper-config.json - if [ -e "${config_file}" ]; then - if [ "$(get_yn_input "Keeper config exists, do you want to recreate it now?" "n")" = "y" ]; then - rm -f ${config_file} - fi - fi - - if [ ! -e "${config_file}" ]; then - gitemail=$(git config kaclone.email) - echo "Keeper Command Line setup" - echo "-------------------------" - read -p "Enter your KA email (or blank if ${gitemail} is correct): " email - email=${email:-$gitemail} - - echo - echo "Keeper Master Password" - echo "----------------------" - echo "If you've setup keeper, enter your master password." - echo - echo "If you have not setup keeper, use your browser to set it up" - echo "at https://khanacademy.org/r/keeper" - echo "If you want to do this later (not recommended), just hit enter" - echo "and run mac-setup-keeper.sh script later." - echo - - read -s -p "Keeper Master Password: " master_password - - echo - cat << EOF > ${config_file} -{ -"server": "https://keepersecurity.com/api/v2/", -"user": "${email}", -"password": "${master_password}", -"sso_master_password": true, -"mfa_duration": "12_hours", -"mfa_token": "", -"mfa_type": "", -"debug": false, -"login_v3": false, -"plugins": [], -"commands": [] -} -EOF - fi -} - maybe_generate_ssh_keys() { # Create a public key if need be. info "Checking for ssh keys" @@ -310,20 +261,6 @@ maybe_generate_ssh_keys() { return 0 } -install_keeper() { - # NOTE(miguel): we have had issues in our deploy system and with devs - # in their local environment with keeper throttling requests since - # we have upgraded from 16.5.18. So we are moving keeper back to version - # 16.5.18. The last version we had issues with was 16.8.24. - # Version 16.5.18 is what we use in jenkins so we want to match that - # https://github.com/Khan/aws-config/commit/fd89852562ca3719f8936c04c847ad73d4ba82f8 - version=16.5.18 - pip3_install -q keepercommander==${version} - # Show the keeper version (and warning if out of date) - keeper version - echo "(Any warning above about the latest version can probably be ignored)" -} - # If we exit unexpectedly, log this warning. # Scripts should call "trap exit_warning EXIT" near the top to enable, # then "trap - EXIT" just before exiting on success.