From 761fae9b8a92d71f5d2f7d07e85c16a27148b47e Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 15 Jul 2022 14:53:20 -0700 Subject: [PATCH 001/147] Remove things I'm pretty confident we don't want --- .gitignore | 4 - .idea/vcs.xml | 6 - .ruby-version | 1 - Brewfile-core | 38 - Brewfile-extra | 48 - Brewfile-osx | 22 - Gemfile | 5 - Gemfile.lock | 17 - README.md | 42 +- assets/com.divisiblebyzero.Spectacle.plist | 174 --- assets/com.googlecode.iterm2.plist | 1199 -------------------- assets/cron.txt | 1 - bootstrap.sh | 16 - capi-workspace-docker/Dockerfile | 91 -- install-core.sh | 47 - install-extras.sh | 29 - install-scripts/brew-bundle.sh | 32 - install-scripts/brew.sh | 23 - install-scripts/bundler.sh | 6 - install-scripts/dock.sh | 6 - install-scripts/go.sh | 36 - install-scripts/ide-prefs.sh | 12 - install-scripts/iterm2.sh | 7 - install-scripts/keyboard.sh | 6 - install-scripts/misc.sh | 11 - install-scripts/mysql.sh | 45 - install-scripts/postgres.sh | 32 - install-scripts/ruby.sh | 18 - install-scripts/spectacle.sh | 9 - install-scripts/system-name.sh | 7 - install-scripts/tmux.sh | 15 - install-scripts/ubuntu.sh | 94 -- install-scripts/vim.sh | 20 - install-scripts/xcode.sh | 17 - install.sh | 29 - 35 files changed, 2 insertions(+), 2163 deletions(-) delete mode 100644 .idea/vcs.xml delete mode 100644 .ruby-version delete mode 100644 Brewfile-core delete mode 100644 Brewfile-extra delete mode 100644 Brewfile-osx delete mode 100644 Gemfile delete mode 100644 Gemfile.lock delete mode 100644 assets/com.divisiblebyzero.Spectacle.plist delete mode 100644 assets/com.googlecode.iterm2.plist delete mode 100644 assets/cron.txt delete mode 100755 bootstrap.sh delete mode 100644 capi-workspace-docker/Dockerfile delete mode 100755 install-core.sh delete mode 100755 install-extras.sh delete mode 100755 install-scripts/brew-bundle.sh delete mode 100755 install-scripts/brew.sh delete mode 100755 install-scripts/bundler.sh delete mode 100755 install-scripts/dock.sh delete mode 100755 install-scripts/go.sh delete mode 100755 install-scripts/ide-prefs.sh delete mode 100755 install-scripts/iterm2.sh delete mode 100755 install-scripts/keyboard.sh delete mode 100755 install-scripts/misc.sh delete mode 100755 install-scripts/mysql.sh delete mode 100755 install-scripts/postgres.sh delete mode 100755 install-scripts/ruby.sh delete mode 100755 install-scripts/spectacle.sh delete mode 100755 install-scripts/system-name.sh delete mode 100755 install-scripts/tmux.sh delete mode 100755 install-scripts/ubuntu.sh delete mode 100755 install-scripts/vim.sh delete mode 100755 install-scripts/xcode.sh delete mode 100755 install.sh diff --git a/.gitignore b/.gitignore index 2471f12..904a7ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -.idea/ launchagent-daily-install.log -Brewfile-core.lock.json -Brewfile-extra.lock.json -Brewfile-osx.lock.json diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 0cadbc1..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.5.5 diff --git a/Brewfile-core b/Brewfile-core deleted file mode 100644 index 24c6988..0000000 --- a/Brewfile-core +++ /dev/null @@ -1,38 +0,0 @@ -tap 'cloudfoundry/tap' -tap 'k14s/tap' -tap 'pivotal/tap' -tap 'buildpacks/tap' - -# Core utilities -brew 'git' -brew 'wget' -brew 'coreutils' -brew 'direnv' - -# Core services -brew 'docker', overwrite: true, link: true - -# Kubernetes binaries -brew 'kubernetes-cli' - -# CloudFoundry binaries -brew 'bbr' -brew 'cloudfoundry/tap/bbl' -brew 'cloudfoundry/tap/bosh-cli' -brew 'cloudfoundry/tap/credhub-cli' -brew 'ytt' -brew 'vendir' -brew 'kapp' -brew 'kbld' -brew 'buildpacks/tap/pack' - -# Fun CLI gizmos -brew 'gti' - -# Language support -brew 'go' -brew 'python', link: true, overwrite: true -brew 'shellcheck' -brew 'java' - -cask 'docker' diff --git a/Brewfile-extra b/Brewfile-extra deleted file mode 100644 index 1e1ec36..0000000 --- a/Brewfile-extra +++ /dev/null @@ -1,48 +0,0 @@ -tap 'businesscritical/tap' -tap 'derailed/k9s' -tap 'homebrew/cask-fonts' - -brew 'ack' -brew 'adr-tools' -brew 'aria2' -brew 'bash' -brew 'bash-completion' -brew 'bat' -brew 'bbr' -brew 'cloudfoundry/tap/bbl' -brew 'cloudfoundry/tap/bosh-cli' -brew 'cloudfoundry/tap/credhub-cli' -brew 'coreutils' -brew 'derailed/k9s/k9s' -brew 'dishy' -brew 'fasd' -brew 'git-secrets' -brew 'helm' -brew 'httpie' -brew 'ipcalc' -brew 'jq' -brew 'minikube' -brew 'proxychains-ng' -brew 'pstree' -brew 'python-yq' -brew 's3cmd' -brew 'ssh-copy-id' -brew 'tig' -brew 'tldr' -brew 'tmux' -brew 'tree' -brew 'watch' - -cask 'tuple' -cask 'flycut' -cask 'homebrew/cask-fonts/font-hack-nerd-font' -cask 'goland' -cask 'google-cloud-sdk' -cask 'iterm2' -cask 'rubymine' -cask 'sequel-pro' -cask 'spectacle' -cask 'visual-studio-code' -# slack cask intentionally removed for bad behavior - hijacking slack links, memory bloat. - -cask 'zoom' diff --git a/Brewfile-osx b/Brewfile-osx deleted file mode 100644 index 41dd491..0000000 --- a/Brewfile-osx +++ /dev/null @@ -1,22 +0,0 @@ -#TODO: move the following to be extra-only install? -tap 'universal-ctags/universal-ctags' -brew 'ripgrep' -brew 'fd' -brew 'git-author' -brew 'lastpass-cli' -brew 'yarn' -brew 'node' -brew 'awscli' -brew 'chruby' - -brew 'vault' - -brew 'mysql' -brew 'docker', overwrite: true, link: true -brew 'postgresql@9.6', restart_service: true, link: true -brew 'autojump' - - -brew 'ruby-install' - -brew 'universal-ctags/universal-ctags/universal-ctags', args: ['HEAD'] diff --git a/Gemfile b/Gemfile deleted file mode 100644 index f840684..0000000 --- a/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://rubygems.org' - -gem 'plist' -gem 'rainbow' -gem 'thor' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index d033e97..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,17 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - plist (3.4.0) - rainbow (3.0.0) - thor (0.20.3) - -PLATFORMS - ruby - -DEPENDENCIES - plist - rainbow - thor - -BUNDLED WITH - 2.1.4 diff --git a/README.md b/README.md index a35ee71..601585e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ Hello there! This repo is intended to provide light-weight setup to developing o ![capi](https://im-01.gifer.com/9Y0s.gif) ## Dependencies -* Mac OSX Sierra * pip ## Installation @@ -15,54 +14,17 @@ Hello there! This repo is intended to provide light-weight setup to developing o git clone git@github.com:cloudfoundry/capi-workspace.git && cd capi-workspace ``` -You can now either install via `./install.sh` or `./install-core.sh`. +You can now either install via some command I'll put here later. -Or curl the bootstrap script, which will create the `workspace` directory and clone this repo for you. -This is primarily intended for quickly setting up virtual workstations. - -``` -bash <(curl -s https://raw.githubusercontent.com/cloudfoundry/capi-workspace/main/bootstrap.sh) -``` **Make sure you ssh in as the "pivotal" user** -## Manual steps (to be automated later) -* Open System Preferences / Users & Groups / / Login Items - * Add `flycut` from Applications - * Add `spectacle` from Applications -* Log out/Log in - * This will cause Flycut and Spectacle to run and ask for permissions -* Open up Rubymine manually and select `License Server` and copy in the the rubymine license from the labs license server (http://omaha.pivotallabs.com:8080/licenseServer in the SF office) - - If you are not on a Pivotal Network, you need to VPN into one in order to access this server. -* Install the `mine` cli shortcut (RubyMine -> Tools -> Create Command-line Launcher...) -* If you are using Goland do the same two previous steps for Goland -* If you have access to the private CAPI backlog, add a secure note called `tracker_api_token` to LastPass with your Pivotal Tracker API token. This token will be used in scripts such as `claim_bosh_lite` to pull story titles currently in flight. - ## Contributing to this repo -* kindly consider when a change is worth making to `install-core.sh` versus `install.sh`. * [bash-it](https://github.com/Bash-it/bash-it) We use bash-it to organize and streamline our bash settings. This includes stuff like color schemes, aliases, shell settings, and the shell prompt formatting. Adding "plugins" to `custom-bash-it-plugins` will cause them to be installed in every new shell. ## What this installation does -`install-core.sh`: intended to be more friendly for developers who don't want this repository to take over their machine. This is intended to be the minimal set of things required for working with a CAPI repository. -* Only installs core utilities, languages, services, and binaries. -* Is NOT responsible for installing & configuring any editors (nvim/vscode/intellij) -* Is NOT responsible for installing tools for improving developer workflows (jq/rg) -* Is NOT responsible for applying any git configuration -* Is NOT responsible for loading in scripts that need to be `source`'d. -* Is NOT responsible for modifying your `$PATH` to include `script` - -`./install.sh`: runs `install-core.sh` and configures the machine with many more packages/preferences - -## install.sh or install-core.sh ? - -`install-core.sh` is a subset of `install.sh` and is intended to be less invasive to the machine, without compromising on provisioning a workstation suitable to working on CAPI projects. - -For fresh workstations && full-time CAPI developers, install.sh might make more sense. - -For folks working on multiple projects, `install-core.sh` might make more sense. - -For folks with existing workstations & configuration, `install-core.sh` might make more sense. +Stuff, important stuff. Stuff that makes a difference. ## Directory Overview diff --git a/assets/com.divisiblebyzero.Spectacle.plist b/assets/com.divisiblebyzero.Spectacle.plist deleted file mode 100644 index e9b2c25..0000000 --- a/assets/com.divisiblebyzero.Spectacle.plist +++ /dev/null @@ -1,174 +0,0 @@ - - - - - MakeLarger - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERoAgAIQfIADWk1ha2VMYXJnZXLSExQVFlokY2xhc3NuYW1lWCRjbGFzc2VzXxAR - U3BlY3RhY2xlU2hvcnRjdXSiFxhfEBFTcGVjdGFjbGVTaG9ydGN1dFhOU09iamVjdF8Q - D05TS2V5ZWRBcmNoaXZlctEbHFRyb290gAEIERojLTI3PEJLVVpiaWxucHJ9go2Wqq3B - ytzf5AAAAAAAAAEBAAAAAAAAAB0AAAAAAAAAAAAAAAAAAADm - - MakeSmaller - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERoAgAIQe4ADW01ha2VTbWFsbGVy0hMUFRZaJGNsYXNzbmFtZVgkY2xhc3Nlc18Q - EVNwZWN0YWNsZVNob3J0Y3V0ohcYXxARU3BlY3RhY2xlU2hvcnRjdXRYTlNPYmplY3Rf - EA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1VaYmlsbnByfoOOl6uu - wsvd4OUAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA5w== - - MoveToBottomHalf - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERkAgAIQfYADXxAQTW92ZVRvQm90dG9tSGFsZtITFBUWWiRjbGFzc25hbWVYJGNs - YXNzZXNfEBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0WE5T - T2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJpbG5w - coWKlZ6ytcnS5OfsAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAO4= - - MoveToCenter - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzEQkAgAIQCIADXE1vdmVUb0NlbnRlctITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNf - EBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0WE5TT2JqZWN0 - XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJpbG5wcn+Ej5is - r8PM3uHmAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAOg= - - MoveToFullscreen - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERkAgAIQLoADXxAQTW92ZVRvRnVsbHNjcmVlbtITFBUWWiRjbGFzc25hbWVYJGNs - YXNzZXNfEBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0WE5T - T2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJpbG5w - coWKlZ6ytcnS5OfsAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAO4= - - MoveToLeftHalf - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERkAgAIQe4ADXk1vdmVUb0xlZnRIYWxm0hMUFRZaJGNsYXNzbmFtZVgkY2xhc3Nl - c18QEVNwZWN0YWNsZVNob3J0Y3V0ohcYXxARU3BlY3RhY2xlU2hvcnRjdXRYTlNPYmpl - Y3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1VaYmlsbnBygYaR - mq6xxc7g4+gAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA6g== - - MoveToLowerLeft - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERMAgAIQe4ADXxAPTW92ZVRvTG93ZXJMZWZ00hMUFRZaJGNsYXNzbmFtZVgkY2xh - c3Nlc18QEVNwZWN0YWNsZVNob3J0Y3V0ohcYXxARU3BlY3RhY2xlU2hvcnRjdXRYTlNP - YmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1VaYmlsbnBy - hImUnbG0yNHj5usAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA7Q== - - MoveToLowerRight - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERMAgAIQfIADXxAQTW92ZVRvTG93ZXJSaWdodNITFBUWWiRjbGFzc25hbWVYJGNs - YXNzZXNfEBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0WE5T - T2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJpbG5w - coWKlZ6ytcnS5OfsAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAO4= - - MoveToNextDisplay - - YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBARVSRudWxs1AkKCwwNDg0PWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzEACAAoADXxARTW92ZVRvTmV4dERpc3BsYXnSEhMUFVokY2xhc3NuYW1lWCRjbGFz - c2VzXxARU3BlY3RhY2xlU2hvcnRjdXSiFhdfEBFTcGVjdGFjbGVTaG9ydGN1dFhOU09i - amVjdF8QD05TS2V5ZWRBcmNoaXZlctEaG1Ryb290gAEIERojLTI3PEJLVVpiaWttb4OI - k5yws8fQ4uXqAAAAAAAAAQEAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAOw= - - MoveToNextThird - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERgAgAIQfIADXxAPTW92ZVRvTmV4dFRoaXJk0hMUFRZaJGNsYXNzbmFtZVgkY2xh - c3Nlc18QEVNwZWN0YWNsZVNob3J0Y3V0ohcYXxARU3BlY3RhY2xlU2hvcnRjdXRYTlNP - YmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1VaYmlsbnBy - hImUnbG0yNHj5usAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA7Q== - - MoveToPreviousDisplay - - YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBARVSRudWxs1AkKCwwNDg0PWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzEACAAoADXxAVTW92ZVRvUHJldmlvdXNEaXNwbGF50hITFBVaJGNsYXNzbmFtZVgk - Y2xhc3Nlc18QEVNwZWN0YWNsZVNob3J0Y3V0ohYXXxARU3BlY3RhY2xlU2hvcnRjdXRY - TlNPYmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGhtUcm9vdIABCBEaIy0yNzxCS1VaYmlr - bW+HjJegtLfL1Obp7gAAAAAAAAEBAAAAAAAAABwAAAAAAAAAAAAAAAAAAADw - - MoveToPreviousThird - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERgAgAIQe4ADXxATTW92ZVRvUHJldmlvdXNUaGlyZNITFBUWWiRjbGFzc25hbWVY - JGNsYXNzZXNfEBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0 - WE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJp - bG5wcoiNmKG1uMzV5+rvAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAPE= - - MoveToRightHalf - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERkAgAIQfIADXxAPTW92ZVRvUmlnaHRIYWxm0hMUFRZaJGNsYXNzbmFtZVgkY2xh - c3Nlc18QEVNwZWN0YWNsZVNob3J0Y3V0ohcYXxARU3BlY3RhY2xlU2hvcnRjdXRYTlNP - YmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1VaYmlsbnBy - hImUnbG0yNHj5usAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA7Q== - - MoveToTopHalf - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzERkAgAIQfoADXU1vdmVUb1RvcEhhbGbSExQVFlokY2xhc3NuYW1lWCRjbGFzc2Vz - XxARU3BlY3RhY2xlU2hvcnRjdXSiFxhfEBFTcGVjdGFjbGVTaG9ydGN1dFhOU09iamVj - dF8QD05TS2V5ZWRBcmNoaXZlctEbHFRyb290gAEIERojLTI3PEJLVVpiaWxucHKAhZCZ - rbDEzd/i5wAAAAAAAAEBAAAAAAAAAB0AAAAAAAAAAAAAAAAAAADp - - MoveToUpperLeft - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzEREAgAIQe4ADXxAPTW92ZVRvVXBwZXJMZWZ00hMUFRZaJGNsYXNzbmFtZVgkY2xh - c3Nlc18QEVNwZWN0YWNsZVNob3J0Y3V0ohcYXxARU3BlY3RhY2xlU2hvcnRjdXRYTlNP - YmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1VaYmlsbnBy - hImUnbG0yNHj5usAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA7Q== - - MoveToUpperRight - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzEREAgAIQfIADXxAQTW92ZVRvVXBwZXJSaWdodNITFBUWWiRjbGFzc25hbWVYJGNs - YXNzZXNfEBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0WE5T - T2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJpbG5w - coWKlZ6ytcnS5OfsAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAO4= - - RedoLastMove - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzEQsAgAIQBoADXFJlZG9MYXN0TW92ZdITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNf - EBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0WE5TT2JqZWN0 - XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJpbG5wcn+Ej5is - r8PM3uHmAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAOg= - - SUEnableAutomaticChecks - - SUHasLaunchedBefore - - SULastCheckTime - 2018-10-03T18:29:33Z - UndoLastMove - - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QWW1vZGlmaWVyc1RuYW1lV2tleUNvZGVWJGNs - YXNzEQkAgAIQBoADXFVuZG9MYXN0TW92ZdITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNf - EBFTcGVjdGFjbGVTaG9ydGN1dKIXGF8QEVNwZWN0YWNsZVNob3J0Y3V0WE5TT2JqZWN0 - XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktVWmJpbG5wcn+Ej5is - r8PM3uHmAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAOg= - - - diff --git a/assets/com.googlecode.iterm2.plist b/assets/com.googlecode.iterm2.plist deleted file mode 100644 index 498170f..0000000 --- a/assets/com.googlecode.iterm2.plist +++ /dev/null @@ -1,1199 +0,0 @@ - - - - - AppleAntiAliasingThreshold - 1 - AppleScrollAnimationEnabled - 0 - AppleSmoothFixedFontsSizeThreshold - 1 - AppleWindowTabbingMode - manual - CheckTestRelease - - Custom Color Presets - - Calamity - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.20000000298023224 - Color Space - sRGB - Green Component - 0.15686275064945221 - Red Component - 0.18431372940540314 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.30196079611778259 - Color Space - sRGB - Green Component - 0.39215686917304993 - Red Component - 0.98823529481887817 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.61176472902297974 - Color Space - sRGB - Green Component - 0.96470588445663452 - Red Component - 0.64705884456634521 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.64705884456634521 - Color Space - sRGB - Green Component - 0.84313726425170898 - Red Component - 0.91372549533843994 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 0.78039216995239258 - Color Space - sRGB - Green Component - 0.47450980544090271 - Red Component - 0.23137255012989044 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.44705882668495178 - Color Space - sRGB - Green Component - 0.14901961386203766 - Red Component - 0.97647058963775635 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 0.87058824300765991 - Color Space - sRGB - Green Component - 0.82745099067687988 - Red Component - 0.45490196347236633 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 1 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.61176472902297974 - Color Space - sRGB - Green Component - 0.96470588445663452 - Red Component - 0.64705884456634521 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.64705884456634521 - Color Space - sRGB - Green Component - 0.84313726425170898 - Red Component - 0.91372549533843994 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.78039216995239258 - Color Space - sRGB - Green Component - 0.47450980544090271 - Red Component - 0.23137255012989044 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.44705882668495178 - Color Space - sRGB - Green Component - 0.14901961386203766 - Red Component - 0.97647058963775635 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.87058824300765991 - Color Space - sRGB - Green Component - 0.82745099067687988 - Red Component - 0.45490196347236633 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.53333336114883423 - Color Space - sRGB - Green Component - 0.42352941632270813 - Red Component - 0.49411764740943909 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.30196079611778259 - Color Space - sRGB - Green Component - 0.39215686917304993 - Red Component - 0.98823529481887817 - - Background Color - - Alpha Component - 1 - Blue Component - 0.20000000298023224 - Color Space - sRGB - Green Component - 0.15686275064945221 - Red Component - 0.18431372940540314 - - Badge Color - - Alpha Component - 1 - Blue Component - 0.23529411852359772 - Color Space - sRGB - Green Component - 0.18431372940540314 - Red Component - 0.21568627655506134 - - Bold Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Cursor Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Cursor Guide Color - - Alpha Component - 1 - Blue Component - 0.23529411852359772 - Color Space - sRGB - Green Component - 0.18431372940540314 - Red Component - 0.21568627655506134 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.20000000298023224 - Color Space - sRGB - Green Component - 0.15686275064945221 - Red Component - 0.18431372940540314 - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Link Color - - Alpha Component - 1 - Blue Component - 0.78039216995239258 - Color Space - sRGB - Green Component - 0.47450980544090271 - Red Component - 0.23137255012989044 - - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Selection Color - - Alpha Component - 1 - Blue Component - 0.53333336114883423 - Color Space - sRGB - Green Component - 0.42352941632270813 - Red Component - 0.49411764740943909 - - - - Default Bookmark Guid - 0D6FD5A1-C66A-44A3-908C-45C018D3CB76 - HotkeyMigratedFromSingleToMulti - - LoadPrefsFromCustomFolder - - NSNavLastRootDirectory - ~/workspace/capi-workspace/assets - NSNavPanelExpandedSizeForOpenMode - {712, 448} - NSQuotedKeystrokeBinding - - NSRepeatCountBinding - - NSScrollAnimationEnabled - - NSScrollViewShouldScrollUnderTitlebar - - NSTableView Columns v2 KeyBingingTable - - YnBsaXN0MDDUAQIDBAUGNjdYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoK4HCA8aGxwdHh8gJjAxMlUkbnVsbNIJCgsOWk5TLm9iamVjdHNWJGNsYXNzogwN - gAKACoAN0xAJChEVGVdOUy5rZXlzoxITFIADgASABaMWFxiABoAHgAiACVpJZGVudGlm - aWVyVVdpZHRoVkhpZGRlblEwI0BowAAAAAAACNIhIiMkWiRjbGFzc25hbWVYJGNsYXNz - ZXNcTlNEaWN0aW9uYXJ5oiMlWE5TT2JqZWN00xAJCicrGaMSExSAA4AEgAWjLC0YgAuA - DIAIgAlRMSNAdKGdsi0OVtIhIjM0Xk5TTXV0YWJsZUFycmF5ozM1JVdOU0FycmF5XxAP - TlNLZXllZEFyY2hpdmVy0Tg5VUFycmF5gAEACAARABoAIwAtADIANwBGAEwAUQBcAGMA - ZgBoAGoAbABzAHsAfwCBAIMAhQCJAIsAjQCPAJEAnACiAKkAqwC0ALUAugDFAM4A2wDe - AOcA7gDyAPQA9gD4APwA/gEAAQIBBAEGAQ8BFAEjAScBLwFBAUQBSgAAAAAAAAIBAAAA - AAAAADoAAAAAAAAAAAAAAAAAAAFM - - NSTableView Sort Ordering v2 KeyBingingTable - - YnBsaXN0MDDUAQIDBAUGFBVYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS - AAGGoKMHCA1VJG51bGzSCQoLDFpOUy5vYmplY3RzViRjbGFzc6CAAtIODxARWiRjbGFz - c25hbWVYJGNsYXNzZXNeTlNNdXRhYmxlQXJyYXmjEBITV05TQXJyYXlYTlNPYmplY3Rf - EA9OU0tleWVkQXJjaGl2ZXLRFhdVQXJyYXmAAQgRGiMtMjc7QUZRWFlbYGt0g4ePmKqt - swAAAAAAAAEBAAAAAAAAABgAAAAAAAAAAAAAAAAAAAC1 - - NSTableView Supports v2 KeyBingingTable - - NSWindow Frame NSFontPanel - 1726 355 445 103 0 0 2560 1418 - NSWindow Frame SessionsPreferences - 269 126 606 469 0 0 2560 1418 - NSWindow Frame SharedPreferences - 1397 767 796 486 0 0 2560 1418 - NSWindow Frame UKCrashReporter - 230 834 592 584 0 0 2560 1418 - NSWindow Frame iTerm Window 0 - 671 56 1273 1354 0 0 2560 1417 - NSWindow Frame iTerm Window 1 - 1 965 665 452 0 0 2560 1417 - New Bookmarks - - - ASCII Anti Aliased - - Ambiguous Double Width - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.20000000298023224 - Color Space - sRGB - Green Component - 0.15686275064945221 - Red Component - 0.18431372940540314 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.30196079611778259 - Color Space - sRGB - Green Component - 0.39215686917304993 - Red Component - 0.98823529481887817 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.61176472902297974 - Color Space - sRGB - Green Component - 0.96470588445663452 - Red Component - 0.64705884456634521 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.64705884456634521 - Color Space - sRGB - Green Component - 0.84313726425170898 - Red Component - 0.91372549533843994 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 0.78039216995239258 - Color Space - sRGB - Green Component - 0.47450980544090271 - Red Component - 0.23137255012989044 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.44705882668495178 - Color Space - sRGB - Green Component - 0.14901961386203766 - Red Component - 0.97647058963775635 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 0.87058824300765991 - Color Space - sRGB - Green Component - 0.82745099067687988 - Red Component - 0.45490196347236633 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 1 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.61176472902297974 - Color Space - sRGB - Green Component - 0.96470588445663452 - Red Component - 0.64705884456634521 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.64705884456634521 - Color Space - sRGB - Green Component - 0.84313726425170898 - Red Component - 0.91372549533843994 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.78039216995239258 - Color Space - sRGB - Green Component - 0.47450980544090271 - Red Component - 0.23137255012989044 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.44705882668495178 - Color Space - sRGB - Green Component - 0.14901961386203766 - Red Component - 0.97647058963775635 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.87058824300765991 - Color Space - sRGB - Green Component - 0.82745099067687988 - Red Component - 0.45490196347236633 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.53333336114883423 - Color Space - sRGB - Green Component - 0.42352941632270813 - Red Component - 0.49411764740943909 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.30196079611778259 - Color Space - sRGB - Green Component - 0.39215686917304993 - Red Component - 0.98823529481887817 - - BM Growl - - Background Color - - Alpha Component - 1 - Blue Component - 0.20000000298023224 - Color Space - sRGB - Green Component - 0.15686275064945221 - Red Component - 0.18431372940540314 - - Background Image Location - - Badge Color - - Alpha Component - 1 - Blue Component - 0.23529411852359772 - Color Space - sRGB - Green Component - 0.18431372940540314 - Red Component - 0.21568627655506134 - - Blinking Cursor - - Blur - - Bold Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Character Encoding - 4 - Close Sessions On End - - Columns - 80 - Command - - Cursor Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Cursor Guide Color - - Alpha Component - 1 - Blue Component - 0.23529411852359772 - Color Space - sRGB - Green Component - 0.18431372940540314 - Red Component - 0.21568627655506134 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.20000000298023224 - Color Space - sRGB - Green Component - 0.15686275064945221 - Red Component - 0.18431372940540314 - - Custom Command - No - Custom Directory - Recycle - Default Bookmark - No - Description - Default - Disable Window Resizing - - Flashing Bell - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Guid - 0D6FD5A1-C66A-44A3-908C-45C018D3CB76 - Horizontal Spacing - 1 - Idle Code - 0 - Jobs to Ignore - - rlogin - ssh - slogin - telnet - - Keyboard Map - - 0x2d-0x40000 - - Action - 11 - Text - 0x1f - - 0x32-0x40000 - - Action - 11 - Text - 0x00 - - 0x33-0x40000 - - Action - 11 - Text - 0x1b - - 0x34-0x40000 - - Action - 11 - Text - 0x1c - - 0x35-0x40000 - - Action - 11 - Text - 0x1d - - 0x36-0x40000 - - Action - 11 - Text - 0x1e - - 0x37-0x40000 - - Action - 11 - Text - 0x1f - - 0x38-0x40000 - - Action - 11 - Text - 0x7f - - 0xf700-0x220000 - - Action - 10 - Text - [1;2A - - 0xf700-0x240000 - - Action - 10 - Text - [1;5A - - 0xf700-0x260000 - - Action - 10 - Text - [1;6A - - 0xf700-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x41 - - 0xf701-0x220000 - - Action - 10 - Text - [1;2B - - 0xf701-0x240000 - - Action - 10 - Text - [1;5B - - 0xf701-0x260000 - - Action - 10 - Text - [1;6B - - 0xf701-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x42 - - 0xf702-0x220000 - - Action - 10 - Text - [1;2D - - 0xf702-0x240000 - - Action - 10 - Text - [1;5D - - 0xf702-0x260000 - - Action - 10 - Text - [1;6D - - 0xf702-0x280000 - - Action - 10 - Text - b - - 0xf703-0x220000 - - Action - 10 - Text - [1;2C - - 0xf703-0x240000 - - Action - 10 - Text - [1;5C - - 0xf703-0x260000 - - Action - 10 - Text - [1;6C - - 0xf703-0x280000 - - Action - 10 - Text - f - - 0xf704-0x20000 - - Action - 10 - Text - [1;2P - - 0xf705-0x20000 - - Action - 10 - Text - [1;2Q - - 0xf706-0x20000 - - Action - 10 - Text - [1;2R - - 0xf707-0x20000 - - Action - 10 - Text - [1;2S - - 0xf708-0x20000 - - Action - 10 - Text - [15;2~ - - 0xf709-0x20000 - - Action - 10 - Text - [17;2~ - - 0xf70a-0x20000 - - Action - 10 - Text - [18;2~ - - 0xf70b-0x20000 - - Action - 10 - Text - [19;2~ - - 0xf70c-0x20000 - - Action - 10 - Text - [20;2~ - - 0xf70d-0x20000 - - Action - 10 - Text - [21;2~ - - 0xf70e-0x20000 - - Action - 10 - Text - [23;2~ - - 0xf70f-0x20000 - - Action - 10 - Text - [24;2~ - - 0xf729-0x20000 - - Action - 10 - Text - [1;2H - - 0xf729-0x40000 - - Action - 10 - Text - [1;5H - - 0xf72b-0x20000 - - Action - 10 - Text - [1;2F - - 0xf72b-0x40000 - - Action - 10 - Text - [1;5F - - - Link Color - - Alpha Component - 1 - Blue Component - 0.78039216995239258 - Color Space - sRGB - Green Component - 0.47450980544090271 - Red Component - 0.23137255012989044 - - Mouse Reporting - - Name - Default - Non Ascii Font - Monaco 12 - Non-ASCII Anti Aliased - - Normal Font - HackNerdFontComplete-Regular 12 - Option Key Sends - 0 - Prompt Before Closing 2 - - Right Option Key Sends - 0 - Rows - 25 - Screen - -1 - Scrollback Lines - 0 - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.85098040103912354 - Color Space - sRGB - Green Component - 0.80784314870834351 - Red Component - 0.83529412746429443 - - Selection Color - - Alpha Component - 1 - Blue Component - 0.53333336114883423 - Color Space - sRGB - Green Component - 0.42352941632270813 - Red Component - 0.49411764740943909 - - Send Code When Idle - - Shortcut - - Silence Bell - - Sync Title - - Tags - - Terminal Type - xterm-256color - Transparency - 0.0 - Unlimited Scrollback - - Use Bold Font - - Use Bright Bold - - Use Italic Font - - Use Non-ASCII Font - - Vertical Spacing - 1 - Visual Bell - - Window Type - 0 - Working Directory - /Users/pivotal - - - NoSyncHaveWarnedAboutPasteConfirmationChange - - NoSyncInstallationId - 6E329242-3B8B-42CB-A3BF-524A60A498F5 - NoSyncPermissionToShowTip - - NoSyncTimeOfFirstLaunchOfVersionWithTip - 541129983.80371904 - PointerActions - - Button,1,1,, - - Action - kContextMenuPointerAction - - Button,2,1,, - - Action - kPasteFromClipboardPointerAction - - Gesture,ThreeFingerSwipeDown,, - - Action - kPrevWindowPointerAction - - Gesture,ThreeFingerSwipeLeft,, - - Action - kPrevTabPointerAction - - Gesture,ThreeFingerSwipeRight,, - - Action - kNextTabPointerAction - - Gesture,ThreeFingerSwipeUp,, - - Action - kNextWindowPointerAction - - - PrefsCustomFolder - /Users/pivotal/workspace/capi-workspace/assets - SUEnableAutomaticChecks - - SUFeedAlternateAppNameKey - iTerm - SUFeedURL - https://iterm2.com/appcasts/testing.xml?shard=15 - SUHasLaunchedBefore - - SUSendProfileInfo - - UKCrashReporterLastCrashReportDate - 1538100096 - WordCharacters - /-+\~_. - findMode_iTerm - 0 - iTerm Version - 3.2.1beta6 - - diff --git a/assets/cron.txt b/assets/cron.txt deleted file mode 100644 index 46f8758..0000000 --- a/assets/cron.txt +++ /dev/null @@ -1 +0,0 @@ -0 23 * * * (trap 'open http://dn.ht/picklecat/' ERR; cd ~/workspace/capi-workspace && ./install.sh) &> /tmp/capi-workspace.log diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100755 index 1dcd68f..0000000 --- a/bootstrap.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# run this script on newly provisions VMs to create remote workstations -# bash <(curl -s https://raw.githubusercontent.com/cloudfoundry/capi-workspace/main/bootstrap.sh) - -mkdir -p ~/workspace -cd ~/workspace -echo "Cloning the capi-workspace repo" -git clone https://github.com/cloudfoundry/capi-workspace.git - -cd capi-workspace -echo "Installing required packages and tools, you may be prompted for your sudo password." -./install.sh -cd ~ - -echo "All done! Disconnect and log back in to ensure you have everything." - diff --git a/capi-workspace-docker/Dockerfile b/capi-workspace-docker/Dockerfile deleted file mode 100644 index 7c2bc1d..0000000 --- a/capi-workspace-docker/Dockerfile +++ /dev/null @@ -1,91 +0,0 @@ -FROM ruby:2.7-buster - - -RUN apt-get update - -RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata - -RUN apt-get install -y \ - git \ - wget \ - curl \ - apt-utils \ - tmux \ - ruby \ - default-mysql-server \ - ruby-dev \ - postgresql-contrib \ - postgresql \ - libpq5 \ - libpq-dev \ - ripgrep \ - fd-find \ - nodejs \ - npm \ - sudo \ - neovim \ - lastpass-cli \ - software-properties-common \ - apt-transport-https \ - openssh-server - - -#Luan's nvim deps -RUN apt-get install -y \ - golang - -RUN gem install bundler -RUN service mysql start && \ - echo 'mysql-server mysql-server/root_password password password' | debconf-set-selections && \ - echo 'mysql-server mysql-server/root_password_again password password' | debconf-set-selections - -#Install Credhub CLI -RUN mkdir /tmp/credhub -p && \ - cd /tmp/credhub && \ - wget https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/2.9.0/credhub-linux-2.9.0.tgz && \ - tar xf credhub*tgz && \ - chmod +x credhub && \ - mv credhub /usr/bin && \ - cd / && \ - rm -rf /tmp/credhub - -RUN service ssh restart - -#Install Bosh CLI -RUN wget https://github.com/cloudfoundry/bosh-cli/releases/download/v6.4.1/bosh-cli-6.4.1-linux-amd64 && \ - mv bosh-cli-6.4.1-linux-amd64 /usr/bin/bosh && \ - chmod +x /usr/bin/bosh - -# Capi user section -RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -RUN useradd -rm -d /home/capi -s /bin/bash -g root -G sudo -u 1001 capi -p capi -USER capi -WORKDIR /home/capi - -RUN mkdir /home/capi/tmp -ENV TMUX_TMPDIR=/home/capi/tmp - -RUN git clone https://github.com/luan/nvim ~/.config/nvim - -RUN nvim +UpdateRemotePlugins +qall && \ - nvim +GoInstallBinaries +qall - -# The command to update plugins keeps exiting 0 on docker build, even though it still installs the plugins, swallowing error for now -RUN nvim +'PlugInstall --sync' +qa; exit 0 - -RUN set -ex && \ - bundle config path ~/.gem/ruby && \ - mkdir ~/workspace && \ - cd workspace && \ - git clone https://github.com/cloudfoundry/capi-release.git && \ - cd capi-release && \ - ./scripts/update - -RUN cd ~/workspace/capi-release/src/cloud_controller_ng && \ - bundle install - -# Allow tmux to create a tmux session when attaching -RUN echo 'new-session -n $HOST' > ~/.tmux.conf - -CMD sleep infinity diff --git a/install-core.sh b/install-core.sh deleted file mode 100755 index 03b6a7c..0000000 --- a/install-core.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -################################## -# Core CAPI workspace installation -# -# The current goals listed in README.md are stale. This script aims -# to represent the most minimal, objective representation of what it -# means to develop on CAPI projects. -# -# Ultimately, this means stripping away a lot of excess configuration -# and utilities. -################################## - -: "${FULL_CAPI_INSTALL:=false}" - -if [ "$(uname)" = "Darwin" ]; then - IS_OSX=true -else - IS_OSX=false - ./install-scripts/ubuntu.sh -fi - -# install brew and its packages -source ./install-scripts/brew.sh -if [ "$IS_OSX" = true ]; then - source ./install-scripts/xcode.sh -else - echo "Skipping Xcode installation for non OSX install" -fi -source ./install-scripts/brew-bundle.sh -# ruby setup -echo "Installing ruby" -source ./install-scripts/ruby.sh -source ./install-scripts/bundler.sh -echo "Installing databases" -# daemons to launch databases at startup -source ./install-scripts/mysql.sh -source ./install-scripts/postgres.sh - -# Golang setup -source ./install-scripts/go.sh - -# Depends on existence of GOPATH, created earlier on -source ./install-scripts/clone-repos.sh - -# Concourse "fly" -source ./install-scripts/fly.sh diff --git a/install-extras.sh b/install-extras.sh deleted file mode 100755 index f32e421..0000000 --- a/install-extras.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -e -# bash-it / terminal -source ./install-scripts/bash.sh -source ./install-scripts/bash-it.sh -source ./install-scripts/vim.sh -source ./install-scripts/tmux.sh - -# git setup -source ./install-scripts/git-config.sh -source ./install-scripts/git-hooks.sh -source ./install-scripts/git-author.sh - -# update cred-alert-cli -source ./install-scripts/update-cred-alert.sh - -if [ "$(uname)" = "Darwin" ]; then - echo "Installing OSX only scripts" - source ./install-scripts/ide-prefs.sh - source ./install-scripts/iterm2.sh - source ./install-scripts/keyboard.sh - source ./install-scripts/dock.sh - source ./install-scripts/spectacle.sh -else - source ./install-scripts/git-author-linux.sh -fi - -source ./install-scripts/misc.sh diff --git a/install-scripts/brew-bundle.sh b/install-scripts/brew-bundle.sh deleted file mode 100755 index bba0821..0000000 --- a/install-scripts/brew-bundle.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -set -e - - -core_capi_brewfile="${PWD}/Brewfile-core" -extra_capi_brewfile="${PWD}/Brewfile-extra" - -osx_capi_brewfile="${PWD}/Brewfile-osx" - -echo "Installing from the Brewfile..." -brew update || echo "brew update failed, but continuing" -brew tap Homebrew/bundle -if ! brew bundle check --file "$core_capi_brewfile"; then - brew bundle --file "$core_capi_brewfile" -fi - -if [ "$(uname)" = "Darwin" ]; then - echo "Trying to install OSX forumalas" - - if ! brew bundle check --file "$osx_capi_brewfile"; then - echo "Installing OSX specific Brew formulas" - brew bundle --file "$osx_capi_brewfile" - fi -fi - -if [ "$FULL_CAPI_INSTALL" = true ]; then - if ! brew bundle check --file "$extra_capi_brewfile"; then - brew bundle --file "$extra_capi_brewfile" - fi -fi - diff --git a/install-scripts/brew.sh b/install-scripts/brew.sh deleted file mode 100755 index 44eabe9..0000000 --- a/install-scripts/brew.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -e - -# Install brew -function install_brew { - if ! which brew > /dev/null ; then - echo "Installing Homebrew" - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \ - > /home/pivotal/.profile - eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) - fi - fi -} - -install_brew diff --git a/install-scripts/bundler.sh b/install-scripts/bundler.sh deleted file mode 100755 index f19a396..0000000 --- a/install-scripts/bundler.sh +++ /dev/null @@ -1,6 +0,0 @@ -#/bin/bash - -if [[ ! $(which bundle) ]] || [[ "$(bundle -v)" != "Bundler version 2.1.4" ]]; then - echo "Installing bundler" - gem install bundler -v 2.1.4 -fi diff --git a/install-scripts/dock.sh b/install-scripts/dock.sh deleted file mode 100755 index 20d1f93..0000000 --- a/install-scripts/dock.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set +e -defaults delete com.apple.dock persistent-apps >/dev/null 2>&1 || true -killall Dock -set -e diff --git a/install-scripts/go.sh b/install-scripts/go.sh deleted file mode 100755 index f892203..0000000 --- a/install-scripts/go.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -set -e - -echo "Creating go/src and workspace..." -go_src=${HOME}/go/src -if [ ! -e ${go_src} ]; then - mkdir -pv ${HOME}/go/src -fi - -if [ -L ${go_src} ]; then - echo "${go_src} exists, but is a symbolic link" -fi - -GO_UTILS=( - github.com/rakyll/hey - github.com/maxbrunsfeld/counterfeiter - github.com/onsi/ginkgo/ginkgo - github.com/onsi/gomega - github.com/XenoPhex/i18n4go/i18n4go - github.com/sgreben/yeetgif/cmd/gif -) - -echo "Running $(go version)" -for gopkg in "${GO_UTILS[@]}"; do - echo "Getting/Updating $gopkg" - GOPATH=$HOME/go go get -u $gopkg -done - -if [ "$(uname)" = "Linux" ]; then - go env -w CC=gcc -fi - -if ! which golangci-lint 2>&1 > /dev/null ; then - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | - sh -s -- -b $(go env GOPATH)/bin -fi diff --git a/install-scripts/ide-prefs.sh b/install-scripts/ide-prefs.sh deleted file mode 100755 index af3cc2e..0000000 --- a/install-scripts/ide-prefs.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e - -if [ ! -d ~/workspace/pivotal_ide_prefs ]; then - git clone https://github.com/pivotal/pivotal_ide_prefs.git ~/workspace/pivotal_ide_prefs -fi - -pushd ~/workspace/pivotal_ide_prefs > /dev/null - ./cli/bin/ide_prefs install --ide=rubymine - ./cli/bin/ide_prefs install --ide=goland -popd > /dev/null diff --git a/install-scripts/iterm2.sh b/install-scripts/iterm2.sh deleted file mode 100755 index 1d7505a..0000000 --- a/install-scripts/iterm2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e - -current_directory=$PWD -preferences_path="/Users/$(whoami)/Library/Preferences/com.googlecode.iterm2.plist" - -cp -f "${current_directory}/assets/com.googlecode.iterm2.plist" "${preferences_path}" diff --git a/install-scripts/keyboard.sh b/install-scripts/keyboard.sh deleted file mode 100755 index b583d0b..0000000 --- a/install-scripts/keyboard.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e - -defaults write -g KeyRepeat -int 2 -defaults write -g InitialKeyRepeat -int 15 diff --git a/install-scripts/misc.sh b/install-scripts/misc.sh deleted file mode 100755 index 826f46f..0000000 --- a/install-scripts/misc.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -# Misc things can go here -TARGET=/usr/local/bin -SOURCE=$HOME/workspace/capi-release/scripts # notice this NOT capi-workspace, if you are adding content to this file (REFACTOR!) - -if [ ! -h $TARGET/fixcommitter ] && [ ! -f $TARGET/fixcommitter ]; then - sudo ln -s $SOURCE/fixcommitter $TARGET/fixcommitter -fi diff --git a/install-scripts/mysql.sh b/install-scripts/mysql.sh deleted file mode 100755 index 31d5468..0000000 --- a/install-scripts/mysql.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -set -e - -MYSQL_PASSWORD="${MYSQL_PASSWORD:-password}" - -if [ "$(uname)" = "Darwin" ]; then - brew services restart mysql - # Is mysql running? - for i in $(seq 60); do - if mysql -uroot -p"$MYSQL_PASSWORD" -e 'show databases' > /dev/null 2>&1; then - echo "MySQL is running" - break - else - sleep 1 - fi - done - - # Change the admin password - if ! mysql -uroot -p"$MYSQL_PASSWORD" -e 'show databases' > /dev/null 2>&1; then - echo "Setting MySQL admin password" - mysqladmin -uroot password password - else - echo "MySQL admin password already set" - fi -else - sudo service mysql start - # Is mysql running? - for i in $(seq 60); do - if sudo service mysql status; then - echo "MySQL is running" - break - else - sleep 1 - fi - done - - # Change the admin password - if ! mysql -uroot -p"$MYSQL_PASSWORD" -e 'show databases' > /dev/null 2>&1; then - echo "Setting MySQL admin password" - sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$MYSQL_PASSWORD';" - else - echo "MySQL admin password already set" - fi -fi - diff --git a/install-scripts/postgres.sh b/install-scripts/postgres.sh deleted file mode 100755 index a637ba5..0000000 --- a/install-scripts/postgres.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -e - -if [ "$(uname)" = "Darwin" ]; then - - brew link postgresql@9.6 --force - brew services start postgresql@9.6 - - # Is postgres running? - for i in $(seq 60); do - if brew services list | grep postgresql | grep -q started; then - break - else - sleep 1 - fi - done - - # Change the admin password - # How does this actually change the password? - if ! psql -U postgres -c "select 1" &> /dev/null; then - echo "Setting postgres user" - createuser -U "$(whoami)" --superuser postgres - else - echo "postgres user already created" - fi -else - sudo sed -i 's/peer/trust/' "$(find /etc/postgresql -name pg_hba.conf)" - sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" - sudo service postgresql restart -fi - - diff --git a/install-scripts/ruby.sh b/install-scripts/ruby.sh deleted file mode 100755 index c5e4d39..0000000 --- a/install-scripts/ruby.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -source "/usr/local/share/chruby/chruby.sh" -RUBY_VERSION="3.1.2" - -if [ ! -e ~/.rubies/ruby-${RUBY_VERSION} ]; then - ruby-install --no-reinstall ruby ${RUBY_VERSION} -fi - -echo "ruby-${RUBY_VERSION}" > ~/.ruby-version - -#seems like we need to source twice to get the new ruby? -source "/usr/local/share/chruby/chruby.sh" - -chruby ${RUBY_VERSION} -gem update --system diff --git a/install-scripts/spectacle.sh b/install-scripts/spectacle.sh deleted file mode 100755 index 7c75814..0000000 --- a/install-scripts/spectacle.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -e - -desired_prefs="${HOME}/workspace/capi-workspace/assets/com.divisiblebyzero.Spectacle.plist" -current_prefs="${HOME}/Library/Preferences/com.divisiblebyzero.Spectacle.plist" - -if ! diff "${desired_prefs}" "${current_prefs}"; then - cp -f "${desired_prefs}" "${current_prefs}" -fi diff --git a/install-scripts/system-name.sh b/install-scripts/system-name.sh deleted file mode 100755 index 3c988b3..0000000 --- a/install-scripts/system-name.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -echo "Setting system name to $1" -sudo scutil --set ComputerName $1 -sudo scutil --set HostName $1 -sudo scutil --set LocalHostName $1 -sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string $1 diff --git a/install-scripts/tmux.sh b/install-scripts/tmux.sh deleted file mode 100755 index a149531..0000000 --- a/install-scripts/tmux.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e - -echo "Installing (Luan's) tmux configuration" -set +e - test -f "${HOME}/.tmux.conf" && mv -f "${HOME}/.tmux.conf" "${HOME}/.tmux.conf.bak" - test -d "${HOME}/.tmux" && rm -rf "${HOME}/.tmux.bak" && mv "${HOME}/.tmux" "${HOME}/.tmux.bak" - test -d "${HOME}/.config/tmux" && rm -rf "${HOME}/.config/tmux.bak" && mv -f "${HOME}/.config/tmux" "${HOME}/.config/tmux.bak" -set -e - -### luan's tmux install -git clone https://github.com/luan/tmuxfiles.git "${HOME}/.config/tmux" -"${HOME}/.config/tmux/install" -### end of tmux install - diff --git a/install-scripts/ubuntu.sh b/install-scripts/ubuntu.sh deleted file mode 100755 index 89b42a3..0000000 --- a/install-scripts/ubuntu.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -set -ex - -echo "Updating apt packages" -sudo apt update -echo "Upgrading Linux distribution" -sudo apt dist-upgrade -y - -sudo apt install -y \ - build-essential \ - docker.io \ - libmysqlclient-dev \ - libpq-dev \ - libpq5 \ - libxslt-dev \ - mysql-server \ - postgresql \ - python-pip \ - python-setuptools - -curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &&\ - sudo apt-get install -y nodejs nginx && sudo npm install yarn -g - -# fun dependencies -sudo apt install -y \ - cowsay \ - figlet \ - sl - -# install linux only dependencies here -# Install lastpass-cli from source (the Ubuntu package is broken) -echo "Installing lastpass-cli from source" -if [[ ! -d ~/workspace/lastpass-cli ]]; then - pushd ~/workspace - git clone https://github.com/lastpass/lastpass-cli.git - popd -fi - -# linuxbrew doesn't install git stuff where we expect it to -sudo ln -sf /home/linuxbrew/.linuxbrew/share/git-core /usr/local/share/git-core - -pushd /tmp/ - if ! command -v nvim &> /dev/null - then - curl -LO https://github.com/neovim/neovim/releases/download/v0.8.0/nvim-linux64.deb - sudo dpkg -i nvim-linux64.deb - fi - - if ! command -v fd &> /dev/null - then - curl -LO https://github.com/sharkdp/fd/releases/download/v8.2.1/fd_8.2.1_amd64.deb - sudo dpkg -i fd_8.2.1_amd64.deb - fi - - if ! command -v ripgrep &> /dev/null - then - curl -LO https://github.com/BurntSushi/ripgrep/releases/download/12.1.1/ripgrep_12.1.1_amd64.deb - sudo dpkg -i ripgrep_12.1.1_amd64.deb - fi - - - if ! command -v ruby-install &>/dev/null - then - wget -O ruby-install-0.8.1.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.1.tar.gz - tar -xzvf ruby-install-0.8.1.tar.gz - cd ruby-install-0.8.1/ - sudo make install - fi - - - wget http://es.archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb - sudo dpkg -i libffi7_3.3-4_amd64.deb - - - wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz - tar -xzvf chruby-0.3.9.tar.gz - cd chruby-0.3.9/ - sudo make install - cd .. - rm -r chruby-0.3.9/ -popd - - -sudo apt install -y openssl libcurl4-openssl-dev libxml2 libssl-dev libxml2-dev pinentry-curses xclip cmake build-essential pkg-config lastpass-cli - - - - -# .config directory is required by lastpass-cli -mkdir -p "${HOME}/.config" -mkdir -p "${HOME}/.local/share/lpass" -#sudo apt install universal-ctags - diff --git a/install-scripts/vim.sh b/install-scripts/vim.sh deleted file mode 100755 index e127a96..0000000 --- a/install-scripts/vim.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -e - -grep -q "github.com/luan/nvim" ~/.config/nvim/.git/config || - ((chmod -f -R +w $HOME/.vim/gopath/pkg/mod/golang.org/x || true) ; rm -rf ${HOME}/.config/nvim ${HOME}/.vim* ${HOME}/.local/share/nvim && - git clone https://github.com/luan/nvim ~/.config/nvim) - -echo "Install python-client for neovim..." -python3 -m pip install --user --upgrade pynvim - -echo "Add yamllint for neomake..." -pip3 install -q yamllint - -mkdir -p ~/.config/nvim/user -pushd ~/.config/nvim/user - ln -sf ~/workspace/capi-workspace/assets/*.vim . -popd - -nvim +UpdateRemotePlugins +qall -nvim +GoInstallBinaries +qall diff --git a/install-scripts/xcode.sh b/install-scripts/xcode.sh deleted file mode 100755 index aec87c2..0000000 --- a/install-scripts/xcode.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -set -e - -# Install x-code and accept license manually -# We basically do this solely to get git -function install_xcode { - if [[ ! $(xcode-select -p)=='/Library/Developer/CommandLineTools' ]]; then - echo "Installing XCode developer tools" - sudo xcodebuild -license - xcode-select --install - else - echo "XCode detected, skipping install" - fi -} - -install_xcode diff --git a/install.sh b/install.sh deleted file mode 100755 index 8fb03d7..0000000 --- a/install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -set -e - -: "${FULL_CAPI_INSTALL:=true}" - -function install { - -cd "$(dirname "$0")" - -# first switch remote to https so that we can pull without keys in -git remote set-url origin https://github.com/cloudfoundry/capi-workspace - -# make sure we're up to date -git pull - -# restore remote to ssh -git remote set-url origin git@github.com:cloudfoundry/capi-workspace - -source ./install-core.sh -source ./install-extras.sh - -# Add gem dependencies for CAPI-Workspace -bundle - -echo "Please set your computer name using \"./install-scripts/system-name.sh \" if you have not already. Thanks!" -} - -install From acd2c0cd877c9af81d9fef5c521ee93baf45da41 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 15 Jul 2022 15:00:14 -0700 Subject: [PATCH 002/147] Initial new script - you need to hold its hand and it doesn't work for postgres and neovim with luan at the moment - is missing all helper scripts and bash it config --- README.md | 6 +++- set-up-new-machine.sh | 78 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100755 set-up-new-machine.sh diff --git a/README.md b/README.md index 601585e..f55c1df 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,11 @@ Hello there! This repo is intended to provide light-weight setup to developing o git clone git@github.com:cloudfoundry/capi-workspace.git && cd capi-workspace ``` -You can now either install via some command I'll put here later. +You can now set up by doing the following: +1. create gcp machine `gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud` +1. ssh onto said machine `gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" --ssh-flag="-A"` +1. babysiting `set-up-new-machine.sh` while it maybe runs +1. when you're done delete you gcp machine `gcloud compute instances delete capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" -q` **Make sure you ssh in as the "pivotal" user** diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh new file mode 100755 index 0000000..6f7ee41 --- /dev/null +++ b/set-up-new-machine.sh @@ -0,0 +1,78 @@ +#!/bin/sh + +sudo apt update +sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y +# dependencies to run tests +sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs npm -y +# ruby dependencies - this is to keep noninteractive mode on ruby-install command +sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y +# install golang for things we use golang for +sudo DEBIAN_FRONTEND=noninteractive apt install golang -y +# install dependencies for luan's neovim config +sudo apt install ripgrep fd-find -y +# clean up anything not needed +sudo apt autoremove -y + +# make workspace +mkdir ~/workspace + +# tmux setup with luan +cd ~/workspace +git clone https://github.com/luan/tmuxfiles.git +cd tmuxfiles +./install +cd ../.. + +# neovim (there is no vim) need at least 7.0 neovim for luan vim config +wget https://github.com/neovim/neovim/releases/download/v0.7.2/nvim-linux64.deb +sudo apt install ./nvim-linux64.deb -y +rm nvim-linux64.deb +git clone https://github.com/luan/nvim ~/.config/nvim + +# setup mysql +sudo service mysql start +sudo service mysql status # might need loop here depending how long status takes +sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';" + +# setup postgres +sudo sed -i 's/peer/trust/' "$(find /etc/postgresql -name pg_hba.conf)" +sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" +sudo service postgresql restart + +# ruby-install +wget -O ruby-install-0.8.3.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.3.tar.gz +tar -xzvf ruby-install-0.8.3.tar.gz +cd ruby-install-0.8.3/ +sudo make install +ruby-install -V +cd .. +rm -rf ruby-install-* + +# install ruby 3.1 +ruby-install 3.1 + +# chruby +wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz +tar -xzvf chruby-0.3.9.tar.gz +cd chruby-0.3.9/ +sudo make install +cd .. +rm -rf chruby-* + +# add chruby to shell +cat >> ~/.$(basename $SHELL)rc <> ~/.ruby-version < Date: Fri, 15 Jul 2022 15:07:54 -0700 Subject: [PATCH 003/147] missing frontend non interactive --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6f7ee41..5bf54a9 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -9,7 +9,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev lib # install golang for things we use golang for sudo DEBIAN_FRONTEND=noninteractive apt install golang -y # install dependencies for luan's neovim config -sudo apt install ripgrep fd-find -y +sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y # clean up anything not needed sudo apt autoremove -y From 386221c5f6c1c5acd91e00338172faee78a2500a Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 15 Jul 2022 15:17:45 -0700 Subject: [PATCH 004/147] exec $SHELL in the middle of a script ends the script --- set-up-new-machine.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 5bf54a9..ca4baa3 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -64,11 +64,9 @@ cat >> ~/.$(basename $SHELL)rc <> ~/.ruby-version < Date: Fri, 22 Jul 2022 13:44:49 -0700 Subject: [PATCH 005/147] print out more versions, get bosh and credhub and cf cli - comment out nvim stuff based on talk with Alex, add it in or some other vim config another time --- set-up-new-machine.sh | 50 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index ca4baa3..003a692 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -8,13 +8,14 @@ sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y # install golang for things we use golang for sudo DEBIAN_FRONTEND=noninteractive apt install golang -y +go version # install dependencies for luan's neovim config sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y # clean up anything not needed sudo apt autoremove -y # make workspace -mkdir ~/workspace +mkdir -p ~/workspace # tmux setup with luan cd ~/workspace @@ -23,11 +24,11 @@ cd tmuxfiles ./install cd ../.. -# neovim (there is no vim) need at least 7.0 neovim for luan vim config -wget https://github.com/neovim/neovim/releases/download/v0.7.2/nvim-linux64.deb -sudo apt install ./nvim-linux64.deb -y -rm nvim-linux64.deb -git clone https://github.com/luan/nvim ~/.config/nvim +# # neovim (there is no vim) need at least 7.0 neovim for luan vim config +# wget https://github.com/neovim/neovim/releases/download/v0.7.2/nvim-linux64.deb +# sudo DEBIAN_FRONTEND=noninteractive apt install ./nvim-linux64.deb -y +# rm nvim-linux64.deb +# git clone https://github.com/luan/nvim ~/.config/nvim # setup mysql sudo service mysql start @@ -67,12 +68,43 @@ EOF cat >> ~/.ruby-version <> ~/.$(basename $SHELL)rc < Date: Fri, 22 Jul 2022 13:54:16 -0700 Subject: [PATCH 006/147] forgot sudo when moving to usr/bin --- set-up-new-machine.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 003a692..6fb412e 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -74,8 +74,8 @@ ruby -v # install bosh cli wget https://github.com/cloudfoundry/bosh-cli/releases/download/v7.0.1/bosh-cli-7.0.1-linux-amd64 -mv bosh-cli-*-linux-amd64 /usr/bin/bosh chmod +x /usr/bin/bosh +sudo mv bosh-cli-*-linux-amd64 /usr/bin/bosh bosh --version # install credhub cli @@ -84,7 +84,7 @@ cd /tmp/credhub wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.3/credhub-linux-2.9.3.tgz tar xf credhub*tgz chmod +x credhub -mv credhub /usr/bin +sudo mv credhub /usr/bin rm -rf /tmp/credhub credhub --version From 16c12fd935099145551534970aafed9812db90e7 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 22 Jul 2022 13:59:49 -0700 Subject: [PATCH 007/147] use bin/bash bin/sh doesn't know source and I'd like to use source --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6fb412e..9f6ebdd 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y From 07151ea87a8745e04d181be8e067dd7aadb4b1f9 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 22 Jul 2022 14:23:39 -0700 Subject: [PATCH 008/147] fix cf cli path --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 9f6ebdd..57a33a4 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -92,7 +92,7 @@ credhub --version cd ~/workspace git clone https://github.com/cloudfoundry/cli.git cat >> ~/.$(basename $SHELL)rc < Date: Fri, 22 Jul 2022 14:26:19 -0700 Subject: [PATCH 009/147] if you're going to switch renaming after chmod, you should pay more attention --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 57a33a4..c91102c 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -74,7 +74,7 @@ ruby -v # install bosh cli wget https://github.com/cloudfoundry/bosh-cli/releases/download/v7.0.1/bosh-cli-7.0.1-linux-amd64 -chmod +x /usr/bin/bosh +chmod +x bosh-cli-*-linux-amd64 sudo mv bosh-cli-*-linux-amd64 /usr/bin/bosh bosh --version From 0676b56b3f97bbc49cedb1e55a5ef85b143c4e4b Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 22 Jul 2022 14:58:29 -0700 Subject: [PATCH 010/147] install go from website, use sh, tell folks to source bashrc when done - also remove tools installed for neovim - don't source bashrc inside script cause bashrc checks for that and doesn't run - tell people to source bashrc when done (or open new shell) - install go from site to get latest (ubuntu pack is behind) --- README.md | 1 + set-up-new-machine.sh | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f55c1df..c7e3712 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ You can now set up by doing the following: 1. create gcp machine `gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud` 1. ssh onto said machine `gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" --ssh-flag="-A"` 1. babysiting `set-up-new-machine.sh` while it maybe runs +1. run `source ~/.$(basename $SHELL)rc` if you don't bother to restart the shell in order to get the things added to it (chruby, cf cli that's built from source code) 1. when you're done delete you gcp machine `gcloud compute instances delete capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" -q` **Make sure you ssh in as the "pivotal" user** diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index c91102c..2590bb2 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y @@ -6,11 +6,8 @@ sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs npm -y # ruby dependencies - this is to keep noninteractive mode on ruby-install command sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y -# install golang for things we use golang for -sudo DEBIAN_FRONTEND=noninteractive apt install golang -y -go version # install dependencies for luan's neovim config -sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y +# sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y # clean up anything not needed sudo apt autoremove -y @@ -40,6 +37,15 @@ sudo sed -i 's/peer/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart +# install golang to get latest +wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz +# set go and cf cli on path +cat >> ~/.$(basename $SHELL)rc <> ~/.ruby-version <> ~/.$(basename $SHELL)rc < Date: Wed, 27 Jul 2022 16:46:20 -0700 Subject: [PATCH 011/147] initial attempt at pipeline to create and destroy - no automatic starting of jobs, must manually click the build button --- pipeline.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pipeline.yml diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..0f4e3fe --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,60 @@ +resources: +- name: capi-workspace + type: git + source: + branch: new-workstations + uri: https://github.com/cloudfoundry/capi-workspace + +jobs: + - name: create-and-setup-workspace + plan: + - get: capi-workspace + - task: do-stuff + config: + platform: linux + image_resource: + type: registry-image + source: + repository: google/cloud-sdk + params: + GCP_SERVICE_ACCOUNT_KEY: ((arya_gcp_json_key)) + inputs: + - name: capi-workspace + run: + path: bash + args: + - -c + - | + set -e + gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) + echo "Creating some michael VM" + gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud + echo "wait 30 for instance to be up" + sleep 30 + echo "copy capi-workspace over" + gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" -q --command 'mkdir -p ~/workspace' + gcloud compute scp --recurse capi-workspace/ --zone "us-central1-a" "pivotal@capi-ws-michael:~/workspace" --project "cf-capi-arya" -q + echo "run set-up-new-machine.sh on workstation" + gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' + echo "you should probably check to see if this worked now, it probably did!" + + - name: delete-workspace + plan: + - task: be-gone + config: + platform: linux + image_resource: + type: registry-image + source: + repository: google/cloud-sdk + params: + GCP_SERVICE_ACCOUNT_KEY: ((arya_gcp_json_key)) + run: + path: bash + args: + - -c + - | + set -e + gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) + echo "deleting some michael VM" + gcloud compute instances delete capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" -q \ No newline at end of file From 0a4350d9431c8a2318683ac864009e7b033269ba Mon Sep 17 00:00:00 2001 From: Alex Rocha Date: Fri, 29 Jul 2022 11:34:08 -0500 Subject: [PATCH 012/147] Updating docs to include flag `--boot-disk-type=pd-balanced` Default disk type e2 instances is pd-standard and, from the docs, is `suited for large data processing workloads that primarily use sequential I/Os` `pd-balanced` is the recommended disk type for general purpose computing and bumps Max read IOPS from 1000 to 12000 https://cloud.google.com/compute/docs/disks/performance#pd-balanced_3 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c7e3712..7c39b92 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Hello there! This repo is intended to provide light-weight setup to developing o ``` You can now set up by doing the following: -1. create gcp machine `gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud` +1. create gcp machine `gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud` 1. ssh onto said machine `gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" --ssh-flag="-A"` 1. babysiting `set-up-new-machine.sh` while it maybe runs 1. run `source ~/.$(basename $SHELL)rc` if you don't bother to restart the shell in order to get the things added to it (chruby, cf cli that's built from source code) From e396e1e53b845f5de207c157e1ad2edf92f09165 Mon Sep 17 00:00:00 2001 From: Alex Rocha Date: Fri, 29 Jul 2022 11:47:28 -0500 Subject: [PATCH 013/147] Setting boot-disk-type in the pipeline --- pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 0f4e3fe..19dd306 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -28,7 +28,7 @@ jobs: set -e gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) echo "Creating some michael VM" - gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud + gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud echo "wait 30 for instance to be up" sleep 30 echo "copy capi-workspace over" From fa23cc6f9b1f348fa6cc36970bb5db547085c188 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 29 Jul 2022 16:37:19 -0500 Subject: [PATCH 014/147] add CF to path in bashrc use snapd to install credhub, ruby, golang --- set-up-new-machine.sh | 52 ++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 2590bb2..9879877 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -38,25 +38,28 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz +sudo snap install --classic --channel=1.18/stable go + +#wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz +#sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz # set go and cf cli on path -cat >> ~/.$(basename $SHELL)rc <> ~/.$(basename $SHELL)rc <> ~/.bashrc + +#mkdir -p /tmp/credhub +#cd /tmp/credhub +#wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.3/credhub-linux-2.9.3.tgz +#tar xf credhub*tgz +#chmod +x credhub +#sudo mv credhub /usr/bin +#rm -rf /tmp/credhub +#credhub --version # set up cf cli cd ~/workspace git clone https://github.com/cloudfoundry/cli.git cd cli git switch v8 -PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin" +echo 'PATH="$PATH:$HOME/workspace/cli/out:/snap/bin/go"' >> ~/.bashrc make build cf --version From 2b7c8b92afc1a080d78a99e2e2cef8fdaab99958 Mon Sep 17 00:00:00 2001 From: Alex Rocha Date: Fri, 29 Jul 2022 22:22:17 +0000 Subject: [PATCH 015/147] Revert "add CF to path in bashrc" This reverts commit fbc255b1d0d65a74c4006e3e04e02941b02562e1. --- set-up-new-machine.sh | 52 +++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 9879877..2590bb2 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -38,28 +38,25 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -sudo snap install --classic --channel=1.18/stable go - -#wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz -#sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz +wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz # set go and cf cli on path -#cat >> ~/.$(basename $SHELL)rc <> ~/.$(basename $SHELL)rc <> ~/.bashrc - -#mkdir -p /tmp/credhub -#cd /tmp/credhub -#wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.3/credhub-linux-2.9.3.tgz -#tar xf credhub*tgz -#chmod +x credhub -#sudo mv credhub /usr/bin -#rm -rf /tmp/credhub -#credhub --version +mkdir -p /tmp/credhub +cd /tmp/credhub +wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.3/credhub-linux-2.9.3.tgz +tar xf credhub*tgz +chmod +x credhub +sudo mv credhub /usr/bin +rm -rf /tmp/credhub +credhub --version # set up cf cli cd ~/workspace git clone https://github.com/cloudfoundry/cli.git cd cli git switch v8 -echo 'PATH="$PATH:$HOME/workspace/cli/out:/snap/bin/go"' >> ~/.bashrc +PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin" make build cf --version From cfb9838b1331647004abc1490e1f7c91d0aeccd6 Mon Sep 17 00:00:00 2001 From: Alex Rocha Date: Fri, 29 Jul 2022 22:44:06 +0000 Subject: [PATCH 016/147] Adding helper scripts --- set-up-new-machine.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 2590bb2..ab5878e 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -102,6 +102,13 @@ cf --version # helper bash functions (deploy only new capi, claim bosh ite) +echo "source ~/workspace/capi-workspace/lib/pullify.bash >/dev/null" >> ~/.bashrc +echo "source ~/workspace/capi-workspace/lib/target-bosh.bash >/dev/null" >> ~/.bashrc +echo "source ~/workspace/capi-workspace/lib/claim-bosh-lite.bash >/dev/null" >> ~/.bashrc +echo "source ~/workspace/capi-workspace/lib/unclaim-bosh-lite.bash >/dev/null" >> ~/.bashrc +echo 'PATH="$PATH:$HOME/workspace/capi-workspace/bin"' >> ~/.bashrc +source ~/.bashrc + # clone things into workspace cd ~/workspace git clone https://github.com/cloudfoundry/capi-release.git From 9c9af6318ce461f3d114ed7afc596508a9297126 Mon Sep 17 00:00:00 2001 From: Alex Rocha Date: Fri, 29 Jul 2022 23:08:35 +0000 Subject: [PATCH 017/147] remove unneeded source of bashrc --- set-up-new-machine.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index ab5878e..8fbafc3 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -107,7 +107,6 @@ echo "source ~/workspace/capi-workspace/lib/target-bosh.bash >/dev/null" >> ~/.b echo "source ~/workspace/capi-workspace/lib/claim-bosh-lite.bash >/dev/null" >> ~/.bashrc echo "source ~/workspace/capi-workspace/lib/unclaim-bosh-lite.bash >/dev/null" >> ~/.bashrc echo 'PATH="$PATH:$HOME/workspace/capi-workspace/bin"' >> ~/.bashrc -source ~/.bashrc # clone things into workspace cd ~/workspace From ba214b01338def46fcd3e2191f6049ea5f2da1f2 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 29 Jul 2022 17:10:53 -0700 Subject: [PATCH 018/147] use same style for multiline adding to shellrc - maybe we should considate appending to shellrc to one big spot instead of many little spots? --- set-up-new-machine.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 8fbafc3..50f12fb 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -102,11 +102,14 @@ cf --version # helper bash functions (deploy only new capi, claim bosh ite) -echo "source ~/workspace/capi-workspace/lib/pullify.bash >/dev/null" >> ~/.bashrc -echo "source ~/workspace/capi-workspace/lib/target-bosh.bash >/dev/null" >> ~/.bashrc -echo "source ~/workspace/capi-workspace/lib/claim-bosh-lite.bash >/dev/null" >> ~/.bashrc -echo "source ~/workspace/capi-workspace/lib/unclaim-bosh-lite.bash >/dev/null" >> ~/.bashrc -echo 'PATH="$PATH:$HOME/workspace/capi-workspace/bin"' >> ~/.bashrc +# helper bash functions (deploy only new capi, claim bosh ite) +cat >> ~/.$(basename $SHELL)rc < Date: Fri, 29 Jul 2022 17:12:29 -0700 Subject: [PATCH 019/147] install git-together - needs to be built from source as latest release doesn't work on jammy --- set-up-new-machine.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 50f12fb..5a9c097 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -6,6 +6,8 @@ sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs npm -y # ruby dependencies - this is to keep noninteractive mode on ruby-install command sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y +# rust/git-together dependency +sudo DEBIAN_FRONTEND=noninteractive apt install pkg-config # install dependencies for luan's neovim config # sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y # clean up anything not needed @@ -100,7 +102,22 @@ PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin" make build cf --version -# helper bash functions (deploy only new capi, claim bosh ite) +# set up git author +# must install git together from source as latest release v0.1.0-alpha.24 doesn't work on jammy +cd ~/workspace +git clone https://github.com/kejadlen/git-together.git +cd git-together +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +~/.cargo/bin/cargo build +sudo mv target/debug/git-together /usr/local/bin + +# add git authors file and remove git together signoff +git config --global --add include.path ~/workspace/capi-workspace/assets/git-authors +cat >> ~/.$(basename $SHELL)rc <> ~/.$(basename $SHELL)rc < Date: Mon, 1 Aug 2022 10:47:35 -0700 Subject: [PATCH 020/147] bump to go 1.18.5 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 5a9c097..62cd3c0 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -40,13 +40,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz +wget https://go.dev/dl/go1.18.5.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.18.5.linux-amd64.tar.gz # set go and cf cli on path cat >> ~/.$(basename $SHELL)rc < Date: Mon, 1 Aug 2022 16:56:37 -0700 Subject: [PATCH 021/147] add round_up_bosh_lites alias and git config and clone capi-ci --- set-up-new-machine.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 62cd3c0..207c258 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -10,6 +10,8 @@ sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev lib sudo DEBIAN_FRONTEND=noninteractive apt install pkg-config # install dependencies for luan's neovim config # sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y +# install dependencies for target_cf helper +sudo DEBIAN_FRONTEND=noninteractive apt install jq # clean up anything not needed sudo apt autoremove -y @@ -119,18 +121,24 @@ EOF # figure out how to install git-author -# helper bash functions (deploy only new capi, claim bosh ite) +# helper bash functions (deploy only new capi, claim bosh lite) manually alias roundup_bosh_lites cause don't know if we want all of lib/misc.bash yet cat >> ~/.$(basename $SHELL)rc < Date: Fri, 5 Aug 2022 18:03:44 +0000 Subject: [PATCH 022/147] updating pipeline with base image, can be run at set intervals to keep vm's up to date --- pipeline.yml | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 19dd306..80b2b5e 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -38,6 +38,44 @@ jobs: gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' echo "you should probably check to see if this worked now, it probably did!" + - name: create-latest-workstation + plan: + - get: capi-workspace + - task: do-stuff + config: + platform: linux + image_resource: + type: registry-image + source: + repository: google/cloud-sdk + params: + GCP_SERVICE_ACCOUNT_KEY: ((arya_gcp_json_key)) + inputs: + - name: capi-workspace + run: + path: bash + args: + - -c + - | + set -e + gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) + echo "Creating Latest VM" + gcloud compute instances create capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud + echo "wait 30 for instance to be up" + sleep 30 + echo "copy capi-workspace over" + gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command 'mkdir -p ~/workspace' + gcloud compute scp --recurse capi-workspace/ --zone "us-central1-a" "pivotal@capi-ws-vm-latest:~/workspace" --project "cf-capi-arya" -q + echo "run set-up-new-machine.sh on workstation" + gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' + echo "Create source image from vm - 'capi-ws-image-latest' " + gcloud compute machine-images create capi-ws-image-latest --project "cf-capi-arya" --source-instance=capi-ws-vm-latest + echo "Let's delete the source vm instance - use base image to create a workstation" + gcloud compute instances delete capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" -q + echo "you should probably check to see if this worked now, it probably did!" + echo "try creating your own workstation vm from this image with: gcloud beta compute instances create capi-ws-yourname --zone 'us-central1-a' --source-machine-image 'capi-ws-image-latest'" + echo "connect with, gcloud compute ssh --zone 'us-central1-a' 'pivotal@capi-ws-yourname' --project 'cf-capi-arya' --ssh-flag='-A'" + - name: delete-workspace plan: - task: be-gone @@ -57,4 +95,5 @@ jobs: set -e gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) echo "deleting some michael VM" - gcloud compute instances delete capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" -q \ No newline at end of file + gcloud compute instances delete capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" -q + From 18d311cb055ffd3db5e71e2f5572dd1499907591 Mon Sep 17 00:00:00 2001 From: Alex Rocha Date: Fri, 5 Aug 2022 20:05:42 +0000 Subject: [PATCH 023/147] letting jq and pkg-config install silently --- set-up-new-machine.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 207c258..0b80784 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -7,11 +7,11 @@ sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq # ruby dependencies - this is to keep noninteractive mode on ruby-install command sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y # rust/git-together dependency -sudo DEBIAN_FRONTEND=noninteractive apt install pkg-config +sudo DEBIAN_FRONTEND=noninteractive apt install pkg-config -y # install dependencies for luan's neovim config # sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y # install dependencies for target_cf helper -sudo DEBIAN_FRONTEND=noninteractive apt install jq +sudo DEBIAN_FRONTEND=noninteractive apt install jq -y # clean up anything not needed sudo apt autoremove -y From 4d5467dbd6b4be02c94103919ade9fb0306fef4b Mon Sep 17 00:00:00 2001 From: Alex Rocha Date: Fri, 5 Aug 2022 20:45:19 +0000 Subject: [PATCH 024/147] set source vm zone --- pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline.yml b/pipeline.yml index 80b2b5e..5e7578d 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -41,7 +41,7 @@ jobs: - name: create-latest-workstation plan: - get: capi-workspace - - task: do-stuff + - task: create-workstation-image config: platform: linux image_resource: @@ -69,7 +69,7 @@ jobs: echo "run set-up-new-machine.sh on workstation" gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' echo "Create source image from vm - 'capi-ws-image-latest' " - gcloud compute machine-images create capi-ws-image-latest --project "cf-capi-arya" --source-instance=capi-ws-vm-latest + gcloud compute machine-images create capi-ws-image-latest --project "cf-capi-arya" --source-instance "capi-ws-vm-latest" --source-instance-zone "us-central1-a" echo "Let's delete the source vm instance - use base image to create a workstation" gcloud compute instances delete capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" -q echo "you should probably check to see if this worked now, it probably did!" From 42f7a33409ee47218db765a5046a1e744a0c0bc0 Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Tue, 6 Sep 2022 21:48:58 +0000 Subject: [PATCH 025/147] Add more tools - lastpass for capi-team-playbook dependencies - om and bbl also for capi-team-playbook - alias git checkout to co for capi-team-playbook Co-authored-by: Merric de Launey Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 0b80784..4599847 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -12,6 +12,9 @@ sudo DEBIAN_FRONTEND=noninteractive apt install pkg-config -y # sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y # install dependencies for target_cf helper sudo DEBIAN_FRONTEND=noninteractive apt install jq -y +# install dependencies for capi-team-playbook which apparently needs a config directory +sudo DEBIAN_FRONTEND=noninteractive apt install lastpass-cli +mkdir -p ~/.config # clean up anything not needed sudo apt autoremove -y @@ -95,6 +98,18 @@ sudo mv credhub /usr/bin rm -rf /tmp/credhub credhub --version +# install om cli +wget https://github.com/pivotal-cf/om/releases/download/7.7.0/om-linux-7.7.0 +chmod +x om* +sudo mv om* /usr/bin/om +om --version + +# install bbl +wget https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.110/bbl-v8.4.110_linux_x86-64 +chmod +x bbl* +sudo mv bbl* /usr/bin/bbl +bbl --version + # set up cf cli cd ~/workspace git clone https://github.com/cloudfoundry/cli.git @@ -134,6 +149,7 @@ EOF # git alias some of the above scripts use and we like git config --global alias.ci commit git config --global alias.st status +git config --global alias.co checkout # clone things into workspace cd ~/workspace From 869fd254e10964ac5dc3dd727d24e33daa6ab2ad Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 9 Sep 2022 16:10:49 -0700 Subject: [PATCH 026/147] check if capi-ws-image-latest exists and delete before creating a new one --- pipeline.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pipeline.yml b/pipeline.yml index 5e7578d..b7ac750 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -68,6 +68,14 @@ jobs: gcloud compute scp --recurse capi-workspace/ --zone "us-central1-a" "pivotal@capi-ws-vm-latest:~/workspace" --project "cf-capi-arya" -q echo "run set-up-new-machine.sh on workstation" gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' + + gcloud compute machine-images describe capi-ws-image-latest --project "cf-capi-arya" + testVal=$? + if [[ $testVal -eq 0 ]]; then + echo "Delete old capi-ws-image-latest" + gcloud compute machine-images delete capi-ws-image-latest --project "cf-capi-arya" -q + fi + echo "Create source image from vm - 'capi-ws-image-latest' " gcloud compute machine-images create capi-ws-image-latest --project "cf-capi-arya" --source-instance "capi-ws-vm-latest" --source-instance-zone "us-central1-a" echo "Let's delete the source vm instance - use base image to create a workstation" From db411d4569126f1edb678b763ced3a76be9edaf6 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Mon, 7 Nov 2022 14:53:04 -0800 Subject: [PATCH 027/147] go 1.19.3 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 4599847..9ef4e60 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -45,13 +45,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.18.5.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.18.5.linux-amd64.tar.gz +wget https://go.dev/dl/go1.19.3.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.19.3.linux-amd64.tar.gz # set go and cf cli on path cat >> ~/.$(basename $SHELL)rc < Date: Mon, 21 Nov 2022 15:33:42 -0800 Subject: [PATCH 028/147] Remove initial pipeline jobs and only use create latest workstation - the removed pipelines were remenants of michael's first automation attempts - create-latest-workstation makes/updates an existing machine image, which can then be used to create new machines - next step would be figuring out when to trigger creating new machine images and having machines available --- pipeline.yml | 56 +--------------------------------------------------- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/pipeline.yml b/pipeline.yml index b7ac750..9370af3 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -6,38 +6,6 @@ resources: uri: https://github.com/cloudfoundry/capi-workspace jobs: - - name: create-and-setup-workspace - plan: - - get: capi-workspace - - task: do-stuff - config: - platform: linux - image_resource: - type: registry-image - source: - repository: google/cloud-sdk - params: - GCP_SERVICE_ACCOUNT_KEY: ((arya_gcp_json_key)) - inputs: - - name: capi-workspace - run: - path: bash - args: - - -c - - | - set -e - gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) - echo "Creating some michael VM" - gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud - echo "wait 30 for instance to be up" - sleep 30 - echo "copy capi-workspace over" - gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" -q --command 'mkdir -p ~/workspace' - gcloud compute scp --recurse capi-workspace/ --zone "us-central1-a" "pivotal@capi-ws-michael:~/workspace" --project "cf-capi-arya" -q - echo "run set-up-new-machine.sh on workstation" - gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' - echo "you should probably check to see if this worked now, it probably did!" - - name: create-latest-workstation plan: - get: capi-workspace @@ -81,27 +49,5 @@ jobs: echo "Let's delete the source vm instance - use base image to create a workstation" gcloud compute instances delete capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" -q echo "you should probably check to see if this worked now, it probably did!" - echo "try creating your own workstation vm from this image with: gcloud beta compute instances create capi-ws-yourname --zone 'us-central1-a' --source-machine-image 'capi-ws-image-latest'" + echo "try creating your own workstation vm from this image with: gcloud compute instances create capi-ws-yourname --zone 'us-central1-a' --source-machine-image 'capi-ws-image-latest'" echo "connect with, gcloud compute ssh --zone 'us-central1-a' 'pivotal@capi-ws-yourname' --project 'cf-capi-arya' --ssh-flag='-A'" - - - name: delete-workspace - plan: - - task: be-gone - config: - platform: linux - image_resource: - type: registry-image - source: - repository: google/cloud-sdk - params: - GCP_SERVICE_ACCOUNT_KEY: ((arya_gcp_json_key)) - run: - path: bash - args: - - -c - - | - set -e - gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) - echo "deleting some michael VM" - gcloud compute instances delete capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" -q - From fb45dbfabbdc4a489b90a9c0571fbf55263e335c Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Wed, 14 Dec 2022 12:03:50 -0800 Subject: [PATCH 029/147] Add luan neovim dependencies - shuffle install order as well --- set-up-new-machine.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 9ef4e60..cafa3d6 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -8,8 +8,6 @@ sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y # rust/git-together dependency sudo DEBIAN_FRONTEND=noninteractive apt install pkg-config -y -# install dependencies for luan's neovim config -# sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find -y # install dependencies for target_cf helper sudo DEBIAN_FRONTEND=noninteractive apt install jq -y # install dependencies for capi-team-playbook which apparently needs a config directory @@ -28,11 +26,15 @@ cd tmuxfiles ./install cd ../.. -# # neovim (there is no vim) need at least 7.0 neovim for luan vim config -# wget https://github.com/neovim/neovim/releases/download/v0.7.2/nvim-linux64.deb -# sudo DEBIAN_FRONTEND=noninteractive apt install ./nvim-linux64.deb -y -# rm nvim-linux64.deb -# git clone https://github.com/luan/nvim ~/.config/nvim +# neovim (there is no vim) need at least 7.0 neovim for luan vim config +wget https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb +sudo DEBIAN_FRONTEND=noninteractive apt install ./nvim-linux64.deb -y +rm nvim-linux64.deb +nvim -v +# install dependencies for luan's neovim config +sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find bat python3-neovim -y +# get luan vim config +git clone https://github.com/luan/nvim ~/.config/nvim # setup mysql sudo service mysql start From 776ab0258fac79f0ffe999c5cf0354ba754639ea Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 13 Jan 2023 12:32:55 -0800 Subject: [PATCH 030/147] bump a bunch of dependencies --- set-up-new-machine.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index cafa3d6..6752d62 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -47,18 +47,18 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.19.3.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.19.3.linux-amd64.tar.gz +wget https://go.dev/dl/go1.19.5.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.19.5.linux-amd64.tar.gz # set go and cf cli on path cat >> ~/.$(basename $SHELL)rc <> ~/.ruby-version < Date: Fri, 13 Jan 2023 13:26:32 -0800 Subject: [PATCH 031/147] fix om download they added amd64 --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6752d62..3e0ba6d 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -101,7 +101,7 @@ rm -rf /tmp/credhub credhub --version # install om cli -wget https://github.com/pivotal-cf/om/releases/download/7.8.2/om-linux-7.8.2 +wget https://github.com/pivotal-cf/om/releases/download/7.8.2/om-linux-amd64-7.8.2 chmod +x om* sudo mv om* /usr/bin/om om --version From d478c7995c1fe730ee7c0aa1ab76497e6437286a Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Thu, 26 Jan 2023 00:16:33 +0000 Subject: [PATCH 032/147] move clones higher up in script --- set-up-new-machine.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 3e0ba6d..d35ca8f 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -19,6 +19,14 @@ sudo apt autoremove -y # make workspace mkdir -p ~/workspace +# clone things into workspace +cd ~/workspace +git clone https://github.com/cloudfoundry/capi-release.git +git clone https://github.com/cloudfoundry/capi-ci.git +cd capi-release +./scripts/update +cd .. + # tmux setup with luan cd ~/workspace git clone https://github.com/luan/tmuxfiles.git @@ -153,10 +161,3 @@ git config --global alias.ci commit git config --global alias.st status git config --global alias.co checkout -# clone things into workspace -cd ~/workspace -git clone https://github.com/cloudfoundry/capi-release.git -git clone https://github.com/cloudfoundry/capi-ci.git -cd capi-release -./scripts/update -cd .. From 38adbea06487074b18e9663fda39bc7786c44b40 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Wed, 25 Jan 2023 16:55:28 -0800 Subject: [PATCH 033/147] get out of directory before deleting said directory --- set-up-new-machine.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index d35ca8f..cd13330 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -105,6 +105,7 @@ wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.10/credhu tar xf credhub*tgz chmod +x credhub sudo mv credhub /usr/bin +cd .. rm -rf /tmp/credhub credhub --version From 4674bbcb271a3a630569f9a99ab3e923b44aeae9 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 2 Feb 2023 00:00:15 +0000 Subject: [PATCH 034/147] git clone repos with SSH Authored-by: Seth Boyles --- set-up-new-machine.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index cd13330..2ef88c7 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -162,3 +162,10 @@ git config --global alias.ci commit git config --global alias.st status git config --global alias.co checkout +# clone things into workspace +cd ~/workspace +git clone git@github.com:cloudfoundry/capi-release.git --branch develop +git clone git@github.com:cloudfoundry/capi-ci.git +cd capi-release +./scripts/update +cd .. From ccf426ff75dc1f75e1099ba43a1a4b65f9d93879 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 2 Feb 2023 00:02:08 +0000 Subject: [PATCH 035/147] Have .ruby-version match capi-release Authored-by: Seth Boyles --- set-up-new-machine.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 2ef88c7..2c90a76 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -73,7 +73,10 @@ cd .. rm -rf ruby-install-* # install ruby 3.1 -ruby-install 3.1 +# For best results this should match the version in capi-release +RUBY_VERSION="3.1.2" + +ruby-install ${RUBY_VERSION} # chruby wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz @@ -88,9 +91,8 @@ cat >> ~/.$(basename $SHELL)rc <> ~/.ruby-version < ~/.ruby-version # install bosh cli wget https://github.com/cloudfoundry/bosh-cli/releases/download/v7.1.2/bosh-cli-7.1.2-linux-amd64 From 8c2e680b4f4a8d1799c07f10c56ca8480f611b66 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 2 Feb 2023 00:08:04 +0000 Subject: [PATCH 036/147] Fix bad merge--update git clone in correct spot Authored-by: Seth Boyles --- set-up-new-machine.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 2c90a76..8332a6f 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -21,8 +21,8 @@ mkdir -p ~/workspace # clone things into workspace cd ~/workspace -git clone https://github.com/cloudfoundry/capi-release.git -git clone https://github.com/cloudfoundry/capi-ci.git +git clone git@github.com:cloudfoundry/capi-release.git --branch develop +git clone git@github.com:cloudfoundry/capi-ci.git cd capi-release ./scripts/update cd .. @@ -163,11 +163,3 @@ EOF git config --global alias.ci commit git config --global alias.st status git config --global alias.co checkout - -# clone things into workspace -cd ~/workspace -git clone git@github.com:cloudfoundry/capi-release.git --branch develop -git clone git@github.com:cloudfoundry/capi-ci.git -cd capi-release -./scripts/update -cd .. From 05130780577f7b4df479bbe0a49e357dd5db5dc0 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 2 Feb 2023 00:10:01 +0000 Subject: [PATCH 037/147] Pull ruby version directly from capi-release Authored-by: Seth Boyles --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 8332a6f..3c7cd58 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -74,7 +74,7 @@ rm -rf ruby-install-* # install ruby 3.1 # For best results this should match the version in capi-release -RUBY_VERSION="3.1.2" +RUBY_VERSION="$(<~/workspace/capi-release/.ruby-version)" ruby-install ${RUBY_VERSION} From 594ff99ac243e0f93793e8df59570d66d2278dbe Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 2 Feb 2023 16:48:33 +0000 Subject: [PATCH 038/147] use set -x for better debugging Authored-by: Seth Boyles --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 3c7cd58..3fffe53 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -1,5 +1,5 @@ #!/bin/sh - +set -x sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y # dependencies to run tests From 14db2a95678ff50bf61b98aea2128f35a2888b16 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 2 Feb 2023 16:49:02 +0000 Subject: [PATCH 039/147] Clone with https but set to SSH remote afterwards Authored-by: Seth Boyles --- set-up-new-machine.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 3fffe53..14460f0 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -20,12 +20,19 @@ sudo apt autoremove -y mkdir -p ~/workspace # clone things into workspace +# Need to clone with https because we don't have a Github account with SSH key available at this point cd ~/workspace -git clone git@github.com:cloudfoundry/capi-release.git --branch develop -git clone git@github.com:cloudfoundry/capi-ci.git -cd capi-release -./scripts/update -cd .. + +git clone https://github.com/cloudfoundry/capi-release.git --branch develop +pushd capi-release + git remote set-url origin git@github.com:cloudfoundry/capi-release.git + ./scripts/update +popd + +git clone https://github.com:cloudfoundry/capi-ci.git +pushd capi-ci + git remote set-url origin git@github.com:cloudfoundry/capi-release.git +popd # tmux setup with luan cd ~/workspace From ce8e5c6945fcf4699c9e78e1254e968f2c138a59 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 2 Feb 2023 17:03:52 +0000 Subject: [PATCH 040/147] use bash instead of sh in install script Authored-by: Seth Boyles --- set-up-new-machine.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 14460f0..8f7a264 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -x sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y @@ -23,15 +23,15 @@ mkdir -p ~/workspace # Need to clone with https because we don't have a Github account with SSH key available at this point cd ~/workspace -git clone https://github.com/cloudfoundry/capi-release.git --branch develop +git clone https://github.com/cloudfoundry/capi-release --branch develop pushd capi-release - git remote set-url origin git@github.com:cloudfoundry/capi-release.git ./scripts/update + git remote set-url origin git@github.com:cloudfoundry/capi-release.git popd -git clone https://github.com:cloudfoundry/capi-ci.git +git clone https://github.com:cloudfoundry/capi-ci pushd capi-ci - git remote set-url origin git@github.com:cloudfoundry/capi-release.git + git remote set-url origin git@github.com:cloudfoundry/capi-ci.git popd # tmux setup with luan From 73213d23ffa31dc69614260eaf9006827eae61c7 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Mon, 6 Feb 2023 23:27:10 +0000 Subject: [PATCH 041/147] Install git-duet and update git-authors Co-authored-by: Michael Oleske --- assets/git-authors | 42 +++++++++--------------------------------- set-up-new-machine.sh | 19 +++++-------------- 2 files changed, 14 insertions(+), 47 deletions(-) diff --git a/assets/git-authors b/assets/git-authors index 756497a..62e3bbe 100644 --- a/assets/git-authors +++ b/assets/git-authors @@ -1,33 +1,9 @@ -[git-together] - domain = pivotal.io -[git-together "authors"] - ar = "Alex Rocha; alexr1@vmware.com" - bl = "Belinda Liu; bliu" - cl = "Carson Long; lcarson@vmware.com" - cs = "Chris Selzo; cselzo" - cy = "Caitlyn Yu; caitlyny@vmware.com" - es = "Elena Sharma; elenasharma" - gc = "Greg Cobb; gcobb" - gh = "Galen Hammond; galenh@vmware.com" - jg = "Jenna Goldstrich; jgoldstrich" - jp = "Jaskanwal Pawar; jpawar" - mp = "Marc Paquette; mpaquette@vmware.com" - mdl = "Merric de Launey; mdelauney" - mk = "Matthew Kocher; mkocher" - mo = "Michael Oleske; moleske" - mm = "Mona Mohebbi; mmohebbi" - mr = "Matt Royal; mroyal@vmware.com" - pb = "Piyali Banerjee; pbanerjee" - rc = "Renee Chu; rchu" - sb = "Seth Boyles; sboyles" - sj = "Sannidhi Jalukar; sjalukar" - sw = "Sarah Weinstein; sweinstein" - td = "Tim Downey; tdowney@vmware.com" - tp = "Travis Patterson; travisp@vmware.com" - ts = "Teal Stannard; tstannard" - tv = "Tom Viehman; tviehman" - wf = "Weyman Fung; weymanf@vmware.com" - zr = "Zach Robinson; zrobinson" - bp = "Brandon Potts; bpotts@vmware.com" - da = "David Alvarado; alvaradoda@vmware.com" - bot = "CAPI CI; cf-capi-eng+ci" +authors: + sb: Seth Boyles; sboyles + mo: Michael Oleske; moleske + da: David Alvarado; alvaradoda + ar: Alex Rocha; alexr1 + mdl: Merric de Launey; mdelauney + ef: Evan Farrar; efarrar +email: + domain: vmware.com diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 8f7a264..cc4a09c 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -6,8 +6,6 @@ sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs npm -y # ruby dependencies - this is to keep noninteractive mode on ruby-install command sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y -# rust/git-together dependency -sudo DEBIAN_FRONTEND=noninteractive apt install pkg-config -y # install dependencies for target_cf helper sudo DEBIAN_FRONTEND=noninteractive apt install jq -y # install dependencies for capi-team-playbook which apparently needs a config directory @@ -139,23 +137,16 @@ PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin" make build cf --version -# set up git author -# must install git together from source as latest release v0.1.0-alpha.24 doesn't work on jammy -cd ~/workspace -git clone https://github.com/kejadlen/git-together.git -cd git-together -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -~/.cargo/bin/cargo build -sudo mv target/debug/git-together /usr/local/bin +# install git-duet +wget https://github.com/git-duet/git-duet/releases/download/0.9.0/linux_amd64.tar.gz +sudo tar -xvf linux_amd64.tar.gz -C /usr/local/bin/ # add git authors file and remove git together signoff -git config --global --add include.path ~/workspace/capi-workspace/assets/git-authors +ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors cat >> ~/.$(basename $SHELL)rc <> ~/.$(basename $SHELL)rc < Date: Mon, 6 Feb 2023 23:30:03 +0000 Subject: [PATCH 042/147] all git remotes use SSH for pushing Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index cc4a09c..9389f3d 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -20,17 +20,14 @@ mkdir -p ~/workspace # clone things into workspace # Need to clone with https because we don't have a Github account with SSH key available at this point cd ~/workspace +git config --global url."git@github.com:".pushInsteadOf https://github.com/ git clone https://github.com/cloudfoundry/capi-release --branch develop pushd capi-release ./scripts/update - git remote set-url origin git@github.com:cloudfoundry/capi-release.git popd git clone https://github.com:cloudfoundry/capi-ci -pushd capi-ci - git remote set-url origin git@github.com:cloudfoundry/capi-ci.git -popd # tmux setup with luan cd ~/workspace From 2f706c03ab149e56a563741af2ae46b1e2560a1f Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Mon, 6 Feb 2023 23:30:38 +0000 Subject: [PATCH 043/147] Remove luan's nvim config since it is deprecated Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 9389f3d..65f3a3c 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -36,16 +36,6 @@ cd tmuxfiles ./install cd ../.. -# neovim (there is no vim) need at least 7.0 neovim for luan vim config -wget https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb -sudo DEBIAN_FRONTEND=noninteractive apt install ./nvim-linux64.deb -y -rm nvim-linux64.deb -nvim -v -# install dependencies for luan's neovim config -sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep fd-find bat python3-neovim -y -# get luan vim config -git clone https://github.com/luan/nvim ~/.config/nvim - # setup mysql sudo service mysql start sudo service mysql status # might need loop here depending how long status takes From 615c19924afca812cbf5f4f49111b8b0e4370c68 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Mon, 6 Feb 2023 23:35:34 +0000 Subject: [PATCH 044/147] Add set -e to setup script Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 65f3a3c..ffa9b80 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -x +set -xe sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y # dependencies to run tests From ee34559917da91bf7a29218010492ef7e1210bb2 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Mon, 6 Feb 2023 23:51:09 +0000 Subject: [PATCH 045/147] Fix issue with xterm choice not being available, set to xterm-256color instead Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index ffa9b80..a959546 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -128,14 +128,16 @@ cf --version wget https://github.com/git-duet/git-duet/releases/download/0.9.0/linux_amd64.tar.gz sudo tar -xvf linux_amd64.tar.gz -C /usr/local/bin/ -# add git authors file and remove git together signoff +# add git authors file ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors + +# environment variables and helper bash functions (deploy only new capi, claim bosh lite) manually alias roundup_bosh_lites cause don't know if we want all of lib/misc.bash yet cat >> ~/.$(basename $SHELL)rc <> ~/.$(basename $SHELL)rc < Date: Tue, 7 Feb 2023 00:11:05 +0000 Subject: [PATCH 046/147] Newer postgres uses scram-sha-256 instead of md5 Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index a959546..e072f3a 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -43,7 +43,7 @@ sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_passwo # setup postgres sudo sed -i 's/peer/trust/' "$(find /etc/postgresql -name pg_hba.conf)" -sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" +sudo sed -i 's/scram-sha-256/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest From 23086b977fe57fe371ba72aead5b4eadcc746c00 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Tue, 7 Feb 2023 00:19:17 +0000 Subject: [PATCH 047/147] Fix cloning of capi-ci Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index e072f3a..f0f00f6 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -27,7 +27,7 @@ pushd capi-release ./scripts/update popd -git clone https://github.com:cloudfoundry/capi-ci +git clone https://github.com/cloudfoundry/capi-ci # tmux setup with luan cd ~/workspace From 0d5113ed1c4d43fae4104383cd40a193c8a03124 Mon Sep 17 00:00:00 2001 From: David Alvarado Date: Tue, 7 Feb 2023 20:22:45 +0000 Subject: [PATCH 048/147] Set vim to be git editor and move git duet install before cli - see if moving git duet solves zero byte file issue or if it just makes the cli have zero byte issue Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index f0f00f6..29cb384 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -21,6 +21,7 @@ mkdir -p ~/workspace # Need to clone with https because we don't have a Github account with SSH key available at this point cd ~/workspace git config --global url."git@github.com:".pushInsteadOf https://github.com/ +git config --global core.editor "vim" git clone https://github.com/cloudfoundry/capi-release --branch develop pushd capi-release @@ -115,6 +116,10 @@ chmod +x bbl* sudo mv bbl* /usr/bin/bbl bbl --version +# install git-duet +wget https://github.com/git-duet/git-duet/releases/download/0.9.0/linux_amd64.tar.gz +sudo tar -xvf linux_amd64.tar.gz -C /usr/local/bin/ + # set up cf cli cd ~/workspace git clone https://github.com/cloudfoundry/cli.git @@ -124,10 +129,6 @@ PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin" make build cf --version -# install git-duet -wget https://github.com/git-duet/git-duet/releases/download/0.9.0/linux_amd64.tar.gz -sudo tar -xvf linux_amd64.tar.gz -C /usr/local/bin/ - # add git authors file ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors From 2a43a4a28c3ca5d2da0252c1b025d5336fca25fe Mon Sep 17 00:00:00 2001 From: David Alvarado Date: Tue, 7 Feb 2023 22:51:09 +0000 Subject: [PATCH 049/147] Wait 30 seconds to make sure all files are written before machine image is created - when we didn't wait, we noticed that the last files written in the script would be corrupt Co-authored-by: Michael Oleske --- pipeline.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pipeline.yml b/pipeline.yml index 9370af3..4cc6e6d 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -37,6 +37,9 @@ jobs: echo "run set-up-new-machine.sh on workstation" gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' + # if we don't wait, the last written file in the set up new machine script won't be written correctly when we make the machine image + sleep 30 + gcloud compute machine-images describe capi-ws-image-latest --project "cf-capi-arya" testVal=$? if [[ $testVal -eq 0 ]]; then From 98f02563b99dc79c4291c978ac6282933ab718d1 Mon Sep 17 00:00:00 2001 From: David Alvarado Date: Tue, 7 Feb 2023 22:52:29 +0000 Subject: [PATCH 050/147] Use true instead of 1 for GIT_DUET_CO_AUTHORED_BY - true removes the sign-of byline in addition to adding co-authored-by Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 29cb384..57d9614 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -135,7 +135,7 @@ ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors # environment variables and helper bash functions (deploy only new capi, claim bosh lite) manually alias roundup_bosh_lites cause don't know if we want all of lib/misc.bash yet cat >> ~/.$(basename $SHELL)rc < Date: Wed, 8 Feb 2023 00:32:34 +0000 Subject: [PATCH 051/147] Allow claim_bosh_lite to work with git duet Co-authored-by: Michael Oleske --- lib/claim-bosh-lite.bash | 2 +- set-up-new-machine.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/claim-bosh-lite.bash b/lib/claim-bosh-lite.bash index ac0be7f..5e3db3e 100755 --- a/lib/claim-bosh-lite.bash +++ b/lib/claim-bosh-lite.bash @@ -36,7 +36,7 @@ function story_selector() { } function claim_bosh_lite() { - git_authors=$(git config --get git-together.active) + git_authors=$(git duet) if [ -z "$git_authors" ]; then echo "please set your git authors before running this!" echo "maybe run 'story' while you're at it." diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 57d9614..abe692c 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -136,6 +136,8 @@ ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors cat >> ~/.$(basename $SHELL)rc < Date: Wed, 8 Feb 2023 00:40:26 +0000 Subject: [PATCH 052/147] Allow unclaim_bosh_lite to work with git duet Co-authored-by: Michael Oleske --- lib/unclaim-bosh-lite.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unclaim-bosh-lite.bash b/lib/unclaim-bosh-lite.bash index ae4ba20..1a8c731 100755 --- a/lib/unclaim-bosh-lite.bash +++ b/lib/unclaim-bosh-lite.bash @@ -1,5 +1,5 @@ function unclaim_bosh_lite() { - git_authors=$(git config --get git-together.active) + git_authors=$(git duet) if [ -z "$git_authors" ]; then echo "please set your git authors before running this!" return From 8dec8a6989c22078df21a3009cf94175e3409fc6 Mon Sep 17 00:00:00 2001 From: David Alvarado Date: Wed, 8 Feb 2023 00:44:40 +0000 Subject: [PATCH 053/147] Clone CATS, BARAS, and SITS to workstation Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index abe692c..e8cfbb7 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -29,6 +29,9 @@ pushd capi-release popd git clone https://github.com/cloudfoundry/capi-ci +git clone https://github.com/cloudfoundry/cf-acceptance-tests +git clone https://github.com/cloudfoundry/capi-bara-tests +git clone https://github.com/cloudfoundry/sync-integration-tests # tmux setup with luan cd ~/workspace From badbea96973066ee07261308da2125a68fe56aff Mon Sep 17 00:00:00 2001 From: Merric de Launey Date: Wed, 8 Feb 2023 19:57:14 +0000 Subject: [PATCH 054/147] add clone capi-env-pool to script --- set-up-new-machine.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index e8cfbb7..2bcb535 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -32,6 +32,7 @@ git clone https://github.com/cloudfoundry/capi-ci git clone https://github.com/cloudfoundry/cf-acceptance-tests git clone https://github.com/cloudfoundry/capi-bara-tests git clone https://github.com/cloudfoundry/sync-integration-tests +git clone https://github.com/cloudfoundry/capi-env-pool # tmux setup with luan cd ~/workspace From 8c8f059e8afd00844b60579acb4da95fdece2085 Mon Sep 17 00:00:00 2001 From: Merric de Launey Date: Wed, 8 Feb 2023 20:09:42 +0000 Subject: [PATCH 055/147] Add gst alias --- set-up-new-machine.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 2bcb535..3c688be 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -151,6 +151,7 @@ source ~/workspace/capi-workspace/lib/claim-bosh-lite.bash source ~/workspace/capi-workspace/lib/unclaim-bosh-lite.bash PATH="$PATH:$HOME/workspace/capi-workspace/bin" alias roundup_bosh_lites="print_env_info" +alias gst="git status" EOF # git alias some of the above scripts use and we like From 4be6bfd8f6c7f175267169537ecce1bea0b5606b Mon Sep 17 00:00:00 2001 From: Merric de Launey Date: Wed, 8 Feb 2023 20:14:26 +0000 Subject: [PATCH 056/147] Revert "add clone capi-env-pool to script" This repo is private and thus causes the create-new-workstation pipeline to fail. This reverts commit badbea96973066ee07261308da2125a68fe56aff. --- set-up-new-machine.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 3c688be..8391197 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -32,7 +32,6 @@ git clone https://github.com/cloudfoundry/capi-ci git clone https://github.com/cloudfoundry/cf-acceptance-tests git clone https://github.com/cloudfoundry/capi-bara-tests git clone https://github.com/cloudfoundry/sync-integration-tests -git clone https://github.com/cloudfoundry/capi-env-pool # tmux setup with luan cd ~/workspace From 4663e176db4cbdcbd9194d58e5f9e0099a2c8fdf Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Mon, 13 Feb 2023 22:39:00 +0000 Subject: [PATCH 057/147] Use capi-env-pool deploy key to attempt to clone repo Co-authored-by: Seth Boyles Co-authored-by: David Alvarado --- pipeline.yml | 5 ++++- set-up-new-machine.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 4cc6e6d..b05cf06 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -18,6 +18,7 @@ jobs: repository: google/cloud-sdk params: GCP_SERVICE_ACCOUNT_KEY: ((arya_gcp_json_key)) + PCF_BOSH_LITE_DEPLOY_KEY: ((pcf_bosh_lite_pool_deploy_key)) inputs: - name: capi-workspace run: @@ -35,7 +36,9 @@ jobs: gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command 'mkdir -p ~/workspace' gcloud compute scp --recurse capi-workspace/ --zone "us-central1-a" "pivotal@capi-ws-vm-latest:~/workspace" --project "cf-capi-arya" -q echo "run set-up-new-machine.sh on workstation" - gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' + eval `ssh-agent -s` + ssh-add <(echo $PCF_BOSH_LITE_DEPLOY_KEY) + gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' --ssh-flag="-A" # if we don't wait, the last written file in the set up new machine script won't be written correctly when we make the machine image sleep 30 diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 8391197..bfdb7cc 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -32,6 +32,7 @@ git clone https://github.com/cloudfoundry/capi-ci git clone https://github.com/cloudfoundry/cf-acceptance-tests git clone https://github.com/cloudfoundry/capi-bara-tests git clone https://github.com/cloudfoundry/sync-integration-tests +git clone https://github.com/pivotal-cf/capi-env-pool # tmux setup with luan cd ~/workspace From cdfe2133acc1478b4f0bf76113e39b15698625f8 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Mon, 13 Feb 2023 22:45:38 +0000 Subject: [PATCH 058/147] set GIT_DUET_CO_AUTHORED_BY back to 1 Co-authored-by: Seth Boyles Co-authored-by: David Alvarado --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index bfdb7cc..d95f742 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -139,7 +139,7 @@ ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors # environment variables and helper bash functions (deploy only new capi, claim bosh lite) manually alias roundup_bosh_lites cause don't know if we want all of lib/misc.bash yet cat >> ~/.$(basename $SHELL)rc < Date: Mon, 13 Feb 2023 22:52:38 +0000 Subject: [PATCH 059/147] Change github clone to ssh from https Co-authored-by: Seth Boyles Co-authored-by: David Alvarado --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index d95f742..1db615d 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -32,7 +32,7 @@ git clone https://github.com/cloudfoundry/capi-ci git clone https://github.com/cloudfoundry/cf-acceptance-tests git clone https://github.com/cloudfoundry/capi-bara-tests git clone https://github.com/cloudfoundry/sync-integration-tests -git clone https://github.com/pivotal-cf/capi-env-pool +git clone git@github.com:pivotal-cf/capi-env-pool.git # tmux setup with luan cd ~/workspace From 28d4a2a399cbe48bf32298950d7703a4847d71dd Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Mon, 13 Feb 2023 23:45:43 +0000 Subject: [PATCH 060/147] add github key to known_hosts file Co-authored-by: Seth Boyles Co-authored-by: David Alvarado --- pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pipeline.yml b/pipeline.yml index b05cf06..bbdb05b 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -27,6 +27,8 @@ jobs: - -c - | set -e + echo "Deleting previous capi-ws-vm-latest (if it exists)" + gcloud compute instances delete capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" -q gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) echo "Creating Latest VM" gcloud compute instances create capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud @@ -38,6 +40,8 @@ jobs: echo "run set-up-new-machine.sh on workstation" eval `ssh-agent -s` ssh-add <(echo $PCF_BOSH_LITE_DEPLOY_KEY) + gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command 'ssh-keyscan github.com >> ~/.ssh/known_hosts' + gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command 'ssh-keyscan -t rsa github.com | ssh-keygen -lf -' gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' --ssh-flag="-A" # if we don't wait, the last written file in the set up new machine script won't be written correctly when we make the machine image From 9f31dc37502289c5e88ced9a4caa7b46d8cd82f2 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 14 Feb 2023 13:55:12 -0600 Subject: [PATCH 061/147] Remove VM Delete at Job Start (#48) * Setting gcloud auth key before trying to use it Co-authored-by: Alex Rocha Co-authored-by: David Alvarado * Only delete capi-ws-vm-latest after image creation Co-authored-by: Alex Rocha Co-authored-by: David Alvarado --------- Co-authored-by: David Alvarado Co-authored-by: David Alvarado --- pipeline.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pipeline.yml b/pipeline.yml index bbdb05b..4318b05 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -27,8 +27,6 @@ jobs: - -c - | set -e - echo "Deleting previous capi-ws-vm-latest (if it exists)" - gcloud compute instances delete capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" -q gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) echo "Creating Latest VM" gcloud compute instances create capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud From ffa5c30a200d1e5f307f1a4484aa6db57b75ab47 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 14 Feb 2023 14:25:06 -0600 Subject: [PATCH 062/147] Add github.com to list of known hosts (#49) Co-authored-by: David Alvarado --- set-up-new-machine.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 1db615d..42aabb2 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -14,6 +14,9 @@ mkdir -p ~/.config # clean up anything not needed sudo apt autoremove -y +# add github.com to list of known hosts +ssh-keyscan github.com >> ~/.ssh/known_hosts + # make workspace mkdir -p ~/workspace From b9a25dfadf52364bb0938296674a7b0a82a3c828 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 14 Feb 2023 16:25:51 -0600 Subject: [PATCH 063/147] Import capi-env-pool repo as resource (#50) * Import capi-env-pool repo as resource Co-authored-by: David Alvarado * remove git clone for capi-env-pool Co-authored-by: David Alvarado --------- Co-authored-by: David Alvarado --- pipeline.yml | 21 ++++++++++++--------- set-up-new-machine.sh | 1 - 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pipeline.yml b/pipeline.yml index 4318b05..1a13df3 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -1,9 +1,15 @@ resources: -- name: capi-workspace - type: git - source: - branch: new-workstations - uri: https://github.com/cloudfoundry/capi-workspace + - name: capi-workspace + type: git + source: + branch: new-workstations + uri: https://github.com/cloudfoundry/capi-workspace + - name: capi-env-pool + type: git + source: + branch: main + uri: git@github.com:pivotal-cf/capi-env-pool.git + private_key: ((pcf_bosh_lite_pool_deploy_key)) jobs: - name: create-latest-workstation @@ -35,11 +41,8 @@ jobs: echo "copy capi-workspace over" gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command 'mkdir -p ~/workspace' gcloud compute scp --recurse capi-workspace/ --zone "us-central1-a" "pivotal@capi-ws-vm-latest:~/workspace" --project "cf-capi-arya" -q + gcloud compute scp --recurse capi-env-pool/ --zone "us-central1-a" "pivotal@capi-ws-vm-latest:~/workspace" --project "cf-capi-arya" -q echo "run set-up-new-machine.sh on workstation" - eval `ssh-agent -s` - ssh-add <(echo $PCF_BOSH_LITE_DEPLOY_KEY) - gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command 'ssh-keyscan github.com >> ~/.ssh/known_hosts' - gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command 'ssh-keyscan -t rsa github.com | ssh-keygen -lf -' gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-vm-latest" --project "cf-capi-arya" -q --command '~/workspace/capi-workspace/set-up-new-machine.sh' --ssh-flag="-A" # if we don't wait, the last written file in the set up new machine script won't be written correctly when we make the machine image diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 42aabb2..8ebf30d 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -35,7 +35,6 @@ git clone https://github.com/cloudfoundry/capi-ci git clone https://github.com/cloudfoundry/cf-acceptance-tests git clone https://github.com/cloudfoundry/capi-bara-tests git clone https://github.com/cloudfoundry/sync-integration-tests -git clone git@github.com:pivotal-cf/capi-env-pool.git # tmux setup with luan cd ~/workspace From f3bb37c090f7754a12508f9575f9ebe21344ef6a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 14 Feb 2023 17:53:29 -0600 Subject: [PATCH 064/147] Added capi-env-pool resource (#51) Co-authored-by: David Alvarado --- pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipeline.yml b/pipeline.yml index 1a13df3..75da97d 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -15,6 +15,7 @@ jobs: - name: create-latest-workstation plan: - get: capi-workspace + - get: capi-env-pool - task: create-workstation-image config: platform: linux @@ -27,6 +28,7 @@ jobs: PCF_BOSH_LITE_DEPLOY_KEY: ((pcf_bosh_lite_pool_deploy_key)) inputs: - name: capi-workspace + - name: capi-env-pool run: path: bash args: From 60e4d3edbd88b573c38eebf3f4a5ec06dbe78f86 Mon Sep 17 00:00:00 2001 From: Merric de Launey Date: Wed, 15 Feb 2023 18:32:17 +0000 Subject: [PATCH 065/147] Add workaround for bug in git duet v 0.9.0 that causes a panic - future versions will not have this problem since the fix is done and has not been released - once it has, we can revert this commit once we use the new version Co-authored-by: Merric de Launey Co-authored-by: David Alvarado --- set-up-new-machine.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 8ebf30d..58e600f 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -160,3 +160,8 @@ EOF git config --global alias.ci commit git config --global alias.st status git config --global alias.co checkout + +# workaround for bug in git duet v 0.9.0 +git config --global duet.git-author-initials none +git config --global duet.git-author-name bogus +git config --global duet.git-author-email bogus@example.com From 69a34c407ef589d7bc1300747230a3e0d80fe40e Mon Sep 17 00:00:00 2001 From: Merric de Launey Date: Wed, 15 Feb 2023 23:40:21 +0000 Subject: [PATCH 066/147] install fly and direnv --- set-up-new-machine.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 58e600f..d1eb6e9 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -126,6 +126,16 @@ bbl --version wget https://github.com/git-duet/git-duet/releases/download/0.9.0/linux_amd64.tar.gz sudo tar -xvf linux_amd64.tar.gz -C /usr/local/bin/ +# install dir-env +sudo apt install direnv + +# install fly if not already installed +if ! which fly > /dev/null ; then + destination=/usr/local/bin/fly + sudo wget "https://ci.cake.capi.land/api/v1/cli?arch=amd64&platform=linux" -O $destination + sudo chmod +x $destination +fi + # set up cf cli cd ~/workspace git clone https://github.com/cloudfoundry/cli.git From 4d5e88c71d6c2abd0cbe58670b387b460fa7d37e Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 17 Feb 2023 11:09:29 -0800 Subject: [PATCH 067/147] bump to go 1.20.1 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index d1eb6e9..b2f1f60 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -54,13 +54,13 @@ sudo sed -i 's/scram-sha-256/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.19.5.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.19.5.linux-amd64.tar.gz +wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz # set go and cf cli on path cat >> ~/.$(basename $SHELL)rc < Date: Tue, 21 Feb 2023 09:57:37 -0800 Subject: [PATCH 068/147] Configure git duet to specify authors on per a repo basis Co-authored-by: David Alvarado Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index b2f1f60..1bcd38d 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -153,7 +153,6 @@ cat >> ~/.$(basename $SHELL)rc < Date: Tue, 21 Feb 2023 10:02:43 -0800 Subject: [PATCH 069/147] Remove vestigial bosh lite pool key - we get it as a concourse resource now Co-authored-by: David Alvarado Co-authored-by: Michael Oleske --- pipeline.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 75da97d..9601acf 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -25,7 +25,6 @@ jobs: repository: google/cloud-sdk params: GCP_SERVICE_ACCOUNT_KEY: ((arya_gcp_json_key)) - PCF_BOSH_LITE_DEPLOY_KEY: ((pcf_bosh_lite_pool_deploy_key)) inputs: - name: capi-workspace - name: capi-env-pool From 094732110662b6cc51f6d583b2d8f0b8b06f0829 Mon Sep 17 00:00:00 2001 From: David Alvarado Date: Tue, 21 Feb 2023 18:55:46 +0000 Subject: [PATCH 070/147] Set branch for capi env pool - this way someone can right away use claim_bosh_lite scripts Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 1bcd38d..58184aa 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -36,6 +36,11 @@ git clone https://github.com/cloudfoundry/cf-acceptance-tests git clone https://github.com/cloudfoundry/capi-bara-tests git clone https://github.com/cloudfoundry/sync-integration-tests +# set correct branch for capi env pools +pushd capi-env-pool + git switch main +popd + # tmux setup with luan cd ~/workspace git clone https://github.com/luan/tmuxfiles.git From a66f165bb5e9988a4121a45331cf39bbe4be3457 Mon Sep 17 00:00:00 2001 From: David Alvarado Date: Tue, 21 Feb 2023 23:08:01 +0000 Subject: [PATCH 071/147] Add syntax highlighting for nvim - need nvim greater than what apt gets us, so installing latest Co-authored-by: Michael Oleske --- init.vim | 16 ++++++++++++++++ set-up-new-machine.sh | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 init.vim diff --git a/init.vim b/init.vim new file mode 100644 index 0000000..b6ee983 --- /dev/null +++ b/init.vim @@ -0,0 +1,16 @@ +call plug#begin() + +" treesitter syntax highlighting +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + + +call plug#end() + +lua < Date: Tue, 21 Feb 2023 23:15:45 +0000 Subject: [PATCH 072/147] fix vim-nvim typo Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 9e0188e..6687c05 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -56,7 +56,7 @@ nvim -v #nvim plugins sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' -mkdir -p ~/.config/vim +mkdir -p ~/.config/nvim ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim nvim -es -i NONE -c "PlugInstall" -c "qa" From 45f16a6ddbcb82cdb5914984ea38b57cab9ae7fb Mon Sep 17 00:00:00 2001 From: michael oleske Date: Tue, 21 Feb 2023 23:51:37 +0000 Subject: [PATCH 073/147] Remove commented oput line to install all languages for treesitter --- init.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.vim b/init.vim index b6ee983..f44a0a4 100644 --- a/init.vim +++ b/init.vim @@ -8,9 +8,12 @@ call plug#end() lua < Date: Tue, 21 Feb 2023 23:55:08 +0000 Subject: [PATCH 074/147] Remove automated install of nvim plugins - nvim PlugInstall command claims to not be there even though it is Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6687c05..e729d52 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -58,7 +58,6 @@ nvim -v sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' mkdir -p ~/.config/nvim ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim -nvim -es -i NONE -c "PlugInstall" -c "qa" # setup mysql sudo service mysql start From 7bc0276e9864d8e77376d49453561793b248fdbb Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Wed, 22 Feb 2023 18:18:55 +0000 Subject: [PATCH 075/147] set core editor to nvim --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index e729d52..7e5e87a 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -24,7 +24,7 @@ mkdir -p ~/workspace # Need to clone with https because we don't have a Github account with SSH key available at this point cd ~/workspace git config --global url."git@github.com:".pushInsteadOf https://github.com/ -git config --global core.editor "vim" +git config --global core.editor "nvim" git clone https://github.com/cloudfoundry/capi-release --branch develop pushd capi-release From 764dd77abce84af38534e83fdd242100835fb1cc Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Wed, 22 Feb 2023 19:21:17 +0000 Subject: [PATCH 076/147] Add solargraph and lspconfig for ruby autocomplete --- init.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.vim b/init.vim index f44a0a4..3d26380 100644 --- a/init.vim +++ b/init.vim @@ -2,7 +2,7 @@ call plug#begin() " treesitter syntax highlighting Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} - +Plug 'neovim/nvim-lspconfig' call plug#end() @@ -16,4 +16,5 @@ require'nvim-treesitter.configs'.setup { enable = true, }, } +require'lspconfig'.solargraph.setup{} EOF From e13b4fde3f5019b4825b03988c591d904d041de6 Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Wed, 22 Feb 2023 19:29:53 +0000 Subject: [PATCH 077/147] Add gopls for go autocomplete --- init.vim | 1 + set-up-new-machine.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/init.vim b/init.vim index 3d26380..bea46dc 100644 --- a/init.vim +++ b/init.vim @@ -17,4 +17,5 @@ require'nvim-treesitter.configs'.setup { }, } require'lspconfig'.solargraph.setup{} +require'lspconfig'.gopls.setup{} EOF diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 7e5e87a..e6df3f3 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -72,9 +72,9 @@ sudo service postgresql restart # install golang to get latest wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz -# set go and cf cli on path +# set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Wed, 22 Feb 2023 22:37:18 +0000 Subject: [PATCH 078/147] Add completion --- init.vim | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/init.vim b/init.vim index bea46dc..a33368e 100644 --- a/init.vim +++ b/init.vim @@ -3,6 +3,15 @@ call plug#begin() " treesitter syntax highlighting Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'neovim/nvim-lspconfig' +" completion plugins +Plug 'hrsh7th/cmp-nvim-lsp' +Plug 'hrsh7th/cmp-buffer' +Plug 'hrsh7th/cmp-path' +Plug 'hrsh7th/cmp-cmdline' +Plug 'hrsh7th/nvim-cmp' +" For vsnip users. +Plug 'hrsh7th/cmp-vsnip' +Plug 'hrsh7th/vim-vsnip' call plug#end() @@ -16,6 +25,78 @@ require'nvim-treesitter.configs'.setup { enable = true, }, } -require'lspconfig'.solargraph.setup{} -require'lspconfig'.gopls.setup{} +-- Set up nvim-cmp. - taken from https://github.com/hrsh7th/nvim-cmp + local cmp = require'cmp' + + cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + -- require('snippy').expand_snippet(args.body) -- For `snippy` users. + -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'vsnip' }, -- For vsnip users. + -- { name = 'luasnip' }, -- For luasnip users. + -- { name = 'ultisnips' }, -- For ultisnips users. + -- { name = 'snippy' }, -- For snippy users. + }, { + { name = 'buffer' }, + }) + }) + + -- Set configuration for specific filetype. + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = 'buffer' }, + }) + }) + + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) + }) + + -- Set up lspconfig. + local capabilities = require('cmp_nvim_lsp').default_capabilities() + -- Replace with each lsp server you've enabled. + --require('lspconfig')[''].setup { + -- capabilities = capabilities + --} +require'lspconfig'.solargraph.setup{ + capabilities = capabilities +} +require'lspconfig'.gopls.setup{ + capabilities = capabilities +} EOF From 4c23f972284269d1ee2bdc01a8a4e36106027d04 Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Wed, 22 Feb 2023 22:46:21 +0000 Subject: [PATCH 079/147] Install gopls for nvim --- set-up-new-machine.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index e6df3f3..4a1efd5 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -78,6 +78,9 @@ PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin:$HOME/go/bin" EOF rm go1.20.1.linux-amd64.tar.gz +# install gopls for nvim +go install golang.org/x/tools/gopls@latest + # ruby-install wget -O ruby-install-0.8.5.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz tar -xzvf ruby-install-0.8.5.tar.gz @@ -157,7 +160,7 @@ cd ~/workspace git clone https://github.com/cloudfoundry/cli.git cd cli git switch v8 -PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin" +PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin:$HOME/go/bin" make build cf --version From 6bd15bf33b7dd6b3f0cfa413550fcef063fda647 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Wed, 22 Feb 2023 15:01:41 -0800 Subject: [PATCH 080/147] Move gopls install to be after go added to the path --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 4a1efd5..dd38bb6 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -78,9 +78,6 @@ PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin:$HOME/go/bin" EOF rm go1.20.1.linux-amd64.tar.gz -# install gopls for nvim -go install golang.org/x/tools/gopls@latest - # ruby-install wget -O ruby-install-0.8.5.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz tar -xzvf ruby-install-0.8.5.tar.gz @@ -164,6 +161,9 @@ PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin:$HOME/go/bin" make build cf --version +# install gopls for nvim +go install golang.org/x/tools/gopls@latest + # add git authors file ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors From 2140c10f4f614e752762539ae3377a5d8529fc4d Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Wed, 22 Feb 2023 23:39:57 +0000 Subject: [PATCH 081/147] Add commenting - uses defaults from nerdcommenter, may want to change that --- init.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.vim b/init.vim index a33368e..7927096 100644 --- a/init.vim +++ b/init.vim @@ -12,9 +12,15 @@ Plug 'hrsh7th/nvim-cmp' " For vsnip users. Plug 'hrsh7th/cmp-vsnip' Plug 'hrsh7th/vim-vsnip' +" commenting +Plug 'preservim/nerdcommenter' call plug#end() +" enable commenting - see https://github.com/preservim/nerdcommenter for +" keybindings +filetype plugin on + lua < Date: Wed, 22 Feb 2023 23:57:40 +0000 Subject: [PATCH 082/147] add fuzzysearch - remember kids, the leader key by default is \ not the space key - maybe someday we'll change that... --- init.vim | 9 +++++++++ set-up-new-machine.sh | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/init.vim b/init.vim index 7927096..3de5e47 100644 --- a/init.vim +++ b/init.vim @@ -14,6 +14,9 @@ Plug 'hrsh7th/cmp-vsnip' Plug 'hrsh7th/vim-vsnip' " commenting Plug 'preservim/nerdcommenter' +" fuzzy searching +Plug 'nvim-lua/plenary.nvim' +Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' } call plug#end() @@ -105,4 +108,10 @@ require'lspconfig'.solargraph.setup{ require'lspconfig'.gopls.setup{ capabilities = capabilities } +-- fuzzy search config from https://github.com/nvim-telescope/telescope.nvim +local builtin = require('telescope.builtin') +vim.keymap.set('n', 'ff', builtin.find_files, {}) +vim.keymap.set('n', 'fg', builtin.live_grep, {}) +vim.keymap.set('n', 'fb', builtin.buffers, {}) +vim.keymap.set('n', 'fh', builtin.help_tags, {}) EOF diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index dd38bb6..8ad0506 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -8,8 +8,10 @@ sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y # install dependencies for target_cf helper sudo DEBIAN_FRONTEND=noninteractive apt install jq -y +# install dependencies for nvim telescope (fuzzy search) +sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep -y # install dependencies for capi-team-playbook which apparently needs a config directory -sudo DEBIAN_FRONTEND=noninteractive apt install lastpass-cli +sudo DEBIAN_FRONTEND=noninteractive apt install lastpass-cli -y mkdir -p ~/.config # clean up anything not needed sudo apt autoremove -y From 26ebbff676594c672bd96555d68cd80daf311c2d Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Thu, 23 Feb 2023 00:06:37 +0000 Subject: [PATCH 083/147] add keybindings for lsp server so gd for go to definition new-workstations - and many other keybindings they recommended --- init.vim | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/init.vim b/init.vim index 3de5e47..3f51d1a 100644 --- a/init.vim +++ b/init.vim @@ -34,6 +34,42 @@ require'nvim-treesitter.configs'.setup { enable = true, }, } + +-- lsp key bindings from https://github.com/neovim/nvim-lspconfig +-- Mappings. +-- See `:help vim.diagnostic.*` for documentation on any of the below functions +local opts = { noremap=true, silent=true } +vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) + +-- Use an on_attach function to only map the following keys +-- after the language server attaches to the current buffer +local on_attach = function(client, bufnr) + -- Enable completion triggered by + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local bufopts = { noremap=true, silent=true, buffer=bufnr } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, bufopts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) +end + -- Set up nvim-cmp. - taken from https://github.com/hrsh7th/nvim-cmp local cmp = require'cmp' @@ -103,11 +139,14 @@ require'nvim-treesitter.configs'.setup { -- capabilities = capabilities --} require'lspconfig'.solargraph.setup{ + on_attach = on_attach, capabilities = capabilities } require'lspconfig'.gopls.setup{ + on_attach = on_attach, capabilities = capabilities } + -- fuzzy search config from https://github.com/nvim-telescope/telescope.nvim local builtin = require('telescope.builtin') vim.keymap.set('n', 'ff', builtin.find_files, {}) From 5ee45cbb46196becc77dd2bd9fe1b2455e5efee4 Mon Sep 17 00:00:00 2001 From: Merric de Launey Date: Thu, 23 Feb 2023 23:44:24 +0000 Subject: [PATCH 084/147] Add instructions on how to add nvim plugins Co-authored-by: Michael Oleske --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 7c39b92..e1265e3 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,14 @@ You can now set up by doing the following: **Make sure you ssh in as the "pivotal" user** +## Adding nvim plugins +We use vimPlug to manage our plugins. Add the plugin to init.vim. Declare your plugin in the top section between plug#begin and plug#end. Add configuration for your plugin in the lua section between lua < Date: Fri, 24 Feb 2023 00:01:05 +0000 Subject: [PATCH 085/147] Add neotest for running tests - cloud_controller_ng expects cc_test database to exist, so do that with rake db:create - tests are missing glyphs at the moment Co-authored-by: Michael Oleske --- init.vim | 28 ++++++++++++++++++++++++++++ set-up-new-machine.sh | 7 +++++++ 2 files changed, 35 insertions(+) diff --git a/init.vim b/init.vim index 3f51d1a..992a3f0 100644 --- a/init.vim +++ b/init.vim @@ -17,6 +17,12 @@ Plug 'preservim/nerdcommenter' " fuzzy searching Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' } +" running test from vim +" 'nvim-treesitter/nvim-treesitter' explicitly brought in +" 'nvim-lua/plenary.nvim' brought in for fuzzy search +Plug 'antoinemadec/FixCursorHold.nvim' +Plug 'nvim-neotest/neotest' +Plug 'olimorris/neotest-rspec' call plug#end() @@ -153,4 +159,26 @@ vim.keymap.set('n', 'ff', builtin.find_files, {}) vim.keymap.set('n', 'fg', builtin.live_grep, {}) vim.keymap.set('n', 'fb', builtin.buffers, {}) vim.keymap.set('n', 'fh', builtin.help_tags, {}) + +-- neotest (copied from https://github.com/nvim-neotest/neotest) +require("neotest").setup({ + adapters = { + require("neotest-rspec")({ + rspec_cmd = function() + return vim.tbl_flatten({ + "bundle", + "exec", + "rspec", + }) + end + }), + } +}) +vim.keymap.set('n', 'tt', function() + require("neotest").output_panel.open() + require("neotest").run.run() +end,{}) +vim.keymap.set('n', 'ts', require("neotest").summary.toggle, {}) +vim.keymap.set('n', 'to', require("neotest").output_panel.toggle, {}) + EOF diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 8ad0506..1c2dcdf 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -186,6 +186,13 @@ alias roundup_bosh_lites="print_env_info" alias gst="git status" EOF +# prepare cloudcontroller_ng for running tests +pushd ~/workspace/capi-release/src/cloud_controller_ng + bundle install + DB=mysql rake db:create + DB=postgres rake db:create +popd + # git alias some of the above scripts use and we like git config --global alias.ci commit git config --global alias.st status From d92ed5abd523c3920b97eb0b7486e7fdb2f1d143 Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Fri, 24 Feb 2023 00:02:17 +0000 Subject: [PATCH 086/147] Turn on line numbers and auto install plugins --- init.vim | 5 +++++ set-up-new-machine.sh | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/init.vim b/init.vim index 992a3f0..2ec492a 100644 --- a/init.vim +++ b/init.vim @@ -26,10 +26,15 @@ Plug 'olimorris/neotest-rspec' call plug#end() +" Standard Vim Config + " enable commenting - see https://github.com/preservim/nerdcommenter for " keybindings filetype plugin on +" set numbers on +set nu + lua < Date: Fri, 24 Feb 2023 00:30:04 +0000 Subject: [PATCH 087/147] Auto installing plugins didn't work as well as I thought --- set-up-new-machine.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index e39be31..fd8418f 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -61,9 +61,6 @@ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug. mkdir -p ~/.config/nvim ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim -# install the nvim plugins -nvim +PlugInstall +qall - # setup mysql sudo service mysql start sudo service mysql status # might need loop here depending how long status takes From 64f4b51953ec94e1bd27ac4edbe652986cd3ce49 Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Fri, 24 Feb 2023 00:53:18 +0000 Subject: [PATCH 088/147] Take out bundle install cause the shell doesn't know ruby exists yet - probably should reload the shell --- set-up-new-machine.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index fd8418f..4e95653 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -187,11 +187,11 @@ alias gst="git status" EOF # prepare cloudcontroller_ng for running tests -pushd ~/workspace/capi-release/src/cloud_controller_ng - bundle install - DB=mysql rake db:create - DB=postgres rake db:create -popd +#pushd ~/workspace/capi-release/src/cloud_controller_ng + #bundle install + #DB=mysql rake db:create + #DB=postgres rake db:create +#popd # git alias some of the above scripts use and we like git config --global alias.ci commit From e21a3646f2c67b0ee675582aad7a60d0332da250 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 24 Feb 2023 09:10:47 -0800 Subject: [PATCH 089/147] try source chruby so that the installed ruby gets picked up for bundle install --- set-up-new-machine.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 4e95653..0f4d82a 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -187,11 +187,13 @@ alias gst="git status" EOF # prepare cloudcontroller_ng for running tests -#pushd ~/workspace/capi-release/src/cloud_controller_ng - #bundle install - #DB=mysql rake db:create - #DB=postgres rake db:create -#popd +source /usr/local/share/chruby/chruby.sh +source /usr/local/share/chruby/auto.sh +pushd ~/workspace/capi-release/src/cloud_controller_ng + bundle install + DB=mysql rake db:create + DB=postgres rake db:create +popd # git alias some of the above scripts use and we like git config --global alias.ci commit From f0f2a28775922a5e114ebb191783e88649b2f5f1 Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Fri, 24 Feb 2023 23:53:26 +0000 Subject: [PATCH 090/147] Add neotest-go for those that do go --- init.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.vim b/init.vim index 2ec492a..033223b 100644 --- a/init.vim +++ b/init.vim @@ -23,6 +23,7 @@ Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' } Plug 'antoinemadec/FixCursorHold.nvim' Plug 'nvim-neotest/neotest' Plug 'olimorris/neotest-rspec' +Plug 'nvim-neotest/neotest-go' call plug#end() @@ -177,6 +178,7 @@ require("neotest").setup({ }) end }), + require("neotest-go") } }) vim.keymap.set('n', 'tt', function() From fe13cc5e3c1da417f33cc8b58ef92f0ae97ede7f Mon Sep 17 00:00:00 2001 From: Tom Viehman Date: Wed, 1 Mar 2023 18:40:54 +0000 Subject: [PATCH 091/147] Add Tom Viehman to git authors Co-authored-by: Michael Oleske --- assets/git-authors | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/git-authors b/assets/git-authors index 62e3bbe..3fe7d86 100644 --- a/assets/git-authors +++ b/assets/git-authors @@ -5,5 +5,6 @@ authors: ar: Alex Rocha; alexr1 mdl: Merric de Launey; mdelauney ef: Evan Farrar; efarrar + tv: Tom Viehman; tviehman email: domain: vmware.com From f7d1ea8107988676cdb2117d070af047b30a0c5b Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 3 Mar 2023 16:06:35 -0800 Subject: [PATCH 092/147] Remove cake from ci url --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 0f4d82a..6a6f342 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -150,7 +150,7 @@ sudo apt install direnv # install fly if not already installed if ! which fly > /dev/null ; then destination=/usr/local/bin/fly - sudo wget "https://ci.cake.capi.land/api/v1/cli?arch=amd64&platform=linux" -O $destination + sudo wget "https://ci.capi.land/api/v1/cli?arch=amd64&platform=linux" -O $destination sudo chmod +x $destination fi From 2e395bd6415679f231bc176852f8b050b1cf2526 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 3 Mar 2023 16:07:12 -0800 Subject: [PATCH 093/147] Add trigger true to capi-workspace so pipeline kicks automatically --- pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pipeline.yml b/pipeline.yml index 9601acf..880d586 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -15,6 +15,7 @@ jobs: - name: create-latest-workstation plan: - get: capi-workspace + trigger: true - get: capi-env-pool - task: create-workstation-image config: From 596894ce0872a8560f341021d054e66c02af4474 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 3 Mar 2023 16:13:29 -0800 Subject: [PATCH 094/147] Set serial to true so that the job only runs one at a time - we can't run this job in parallel, so wait for the previously trigger jobs to finish --- pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pipeline.yml b/pipeline.yml index 880d586..ded6b97 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -13,6 +13,7 @@ resources: jobs: - name: create-latest-workstation + serial: true plan: - get: capi-workspace trigger: true From 0724ea40c2f745d776ee604144ffafe5622ca951 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 3 Mar 2023 16:47:27 -0800 Subject: [PATCH 095/147] Make concourse linter happy by adding .git --- pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index ded6b97..c806b52 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -3,7 +3,7 @@ resources: type: git source: branch: new-workstations - uri: https://github.com/cloudfoundry/capi-workspace + uri: https://github.com/cloudfoundry/capi-workspace.git - name: capi-env-pool type: git source: From 7c969841d1c64348f99c1ebb1f166a05adf8fb6b Mon Sep 17 00:00:00 2001 From: MerricdeLauney Date: Wed, 8 Mar 2023 15:21:41 -0800 Subject: [PATCH 096/147] Update readme to reflect new workflow for making workstations (#52) * Update readme to reflect new workflow for making workstations cc @dalvarado * Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e1265e3..50269c6 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,9 @@ Hello there! This repo is intended to provide light-weight setup to developing o ``` You can now set up by doing the following: -1. create gcp machine `gcloud compute instances create capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud` -1. ssh onto said machine `gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" --ssh-flag="-A"` -1. babysiting `set-up-new-machine.sh` while it maybe runs -1. run `source ~/.$(basename $SHELL)rc` if you don't bother to restart the shell in order to get the things added to it (chruby, cf cli that's built from source code) -1. when you're done delete you gcp machine `gcloud compute instances delete capi-ws-michael --zone "us-central1-a" --project "cf-capi-arya" -q` +1. create gcp machine `gcloud compute instances create capi-ws- --zone 'us-central1-a' --source-machine-image 'capi-ws-image-latest' --project 'cf-capi-arya'` +1. ssh onto said machine `gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-" --project "cf-capi-arya" --ssh-flag="-A"` +1. when you're done delete you gcp machine `gcloud compute instances delete capi-ws- --zone "us-central1-a" --project "cf-capi-arya" -q` **Make sure you ssh in as the "pivotal" user** From 056bc806056c1076506d0ddb2827b3348776f4b5 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 17 Mar 2023 15:46:17 -0700 Subject: [PATCH 097/147] Support fuzzy searching on 'up/down arrow' to previous commands --- .inputrc | 2 ++ set-up-new-machine.sh | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 .inputrc diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..b74fea9 --- /dev/null +++ b/.inputrc @@ -0,0 +1,2 @@ +"\e[A": history-search-backward +"\e[B": history-search-forward \ No newline at end of file diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6a6f342..0cec2b3 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -56,6 +56,9 @@ sudo DEBIAN_FRONTEND=noninteractive apt install ./nvim-linux64.deb -y rm nvim-linux64.deb nvim -v +# up/down arrow search history +ln -s ~/workspace/capi-workspace/.inputrc ~/.inputrc + # nvim plugins sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' mkdir -p ~/.config/nvim From 16f057c2f301ac82796bdad59800547fce087073 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 17 Mar 2023 16:09:30 -0700 Subject: [PATCH 098/147] bump to go 1.20.2 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 0cec2b3..4441b21 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -75,13 +75,13 @@ sudo sed -i 's/scram-sha-256/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz +wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Tue, 21 Mar 2023 21:02:02 +0000 Subject: [PATCH 099/147] make git cloning idempotent Co-authored-by: David Alvarado Co-authored-by: Seth Boyles --- set-up-new-machine.sh | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 4441b21..0c0dfa6 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -1,5 +1,21 @@ #!/bin/bash set -xe + +function clone { + local repo=$1 + local destination=$2 + + if [ ! -d $destination ]; then + echo "Cloning $destination" + git clone $repo $destination + else + echo "$destination already present, skipping" + fi +} + + + + sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y # dependencies to run tests @@ -28,15 +44,19 @@ cd ~/workspace git config --global url."git@github.com:".pushInsteadOf https://github.com/ git config --global core.editor "nvim" -git clone https://github.com/cloudfoundry/capi-release --branch develop +if [ ! -d ~/workspace/capi-release ]; then + git clone https://github.com/cloudfoundry/capi-release --branch develop +fi + pushd capi-release ./scripts/update popd -git clone https://github.com/cloudfoundry/capi-ci -git clone https://github.com/cloudfoundry/cf-acceptance-tests -git clone https://github.com/cloudfoundry/capi-bara-tests -git clone https://github.com/cloudfoundry/sync-integration-tests +clone https://github.com/cloudfoundry/capi-ci ~/workspace/capi-ci +clone https://github.com/cloudfoundry/cf-acceptance-tests ~/workspace/cf-acceptance-tests +clone https://github.com/cloudfoundry/capi-bara-tests ~/workspace/capi-bara-tests +clone https://github.com/cloudfoundry/sync-integration-tests ~/workspace/sync-integration-tests +clone https://github.com/cloudfoundry/capi-dockerfiles ~/workspace/capi-dockerfiles # set correct branch for capi env pools pushd capi-env-pool From 0f40ecbfef946f12026623d8e4c6bdfc1e6206e0 Mon Sep 17 00:00:00 2001 From: Tom Viehman Date: Wed, 22 Mar 2023 17:58:14 +0000 Subject: [PATCH 100/147] Install kubectl Co-authored-by: Seth Boyles Co-authored-by: Tom Viehman --- set-up-new-machine.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 0c0dfa6..9e8e3ee 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -35,6 +35,10 @@ sudo apt autoremove -y # add github.com to list of known hosts ssh-keyscan github.com >> ~/.ssh/known_hosts +# Install kubectl +sudo curl -L -o /usr/local/bin/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" +sudo chmod +x /usr/local/bin/kubectl + # make workspace mkdir -p ~/workspace From 8706b403d27dcb0b2553828eab5d1d4ed029b149 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 31 Mar 2023 13:22:21 -0700 Subject: [PATCH 101/147] automate plugin installation --- set-up-new-machine.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 9e8e3ee..95203f5 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -88,6 +88,9 @@ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug. mkdir -p ~/.config/nvim ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim +# automated PlugInstall (from https://github.com/junegunn/vim-plug/wiki/tips#install-plugins-on-the-command-line) +nvim -es -u init.vim -i NONE -c "PlugInstall" -c "qa" + # setup mysql sudo service mysql start sudo service mysql status # might need loop here depending how long status takes From fc9b5db355ddf828a5428feda2062b9e92bccabf Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 31 Mar 2023 14:36:45 -0700 Subject: [PATCH 102/147] Revert "automate plugin installation" This reverts commit 8706b403d27dcb0b2553828eab5d1d4ed029b149. --- set-up-new-machine.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 95203f5..9e8e3ee 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -88,9 +88,6 @@ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug. mkdir -p ~/.config/nvim ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim -# automated PlugInstall (from https://github.com/junegunn/vim-plug/wiki/tips#install-plugins-on-the-command-line) -nvim -es -u init.vim -i NONE -c "PlugInstall" -c "qa" - # setup mysql sudo service mysql start sudo service mysql status # might need loop here depending how long status takes From 9ee0f223e31c8a87247e25afd1509701d37e32ed Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 31 Mar 2023 14:37:37 -0700 Subject: [PATCH 103/147] Automate install of nvim plugins on open - command line version in previous commit doesn't believe PlugInstall is a command --- init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.vim b/init.vim index 033223b..88c48fd 100644 --- a/init.vim +++ b/init.vim @@ -1,3 +1,6 @@ +autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) + \| PlugInstall --sync | source $MYVIMRC +\| endif call plug#begin() " treesitter syntax highlighting From 391caf63713f61b964a95ecdaf8e6d11b0c51cb4 Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Fri, 31 Mar 2023 22:13:35 +0000 Subject: [PATCH 104/147] Remove TSUpdate from treesitter - I don't think it was helping the way I expected it to, but it did cause errors on install that didn't seem to be errors - I think its usecase is more on updating, but if we treat these workstations as throwaway it won't matter - also makes the auto install smoother --- init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.vim b/init.vim index 88c48fd..5c7c3c3 100644 --- a/init.vim +++ b/init.vim @@ -4,7 +4,7 @@ autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) call plug#begin() " treesitter syntax highlighting -Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +Plug 'nvim-treesitter/nvim-treesitter' Plug 'neovim/nvim-lspconfig' " completion plugins Plug 'hrsh7th/cmp-nvim-lsp' From 6fc3651dfab8f6dfe164baf7b5c24ebae11b51e8 Mon Sep 17 00:00:00 2001 From: Evan Farrar Date: Mon, 3 Apr 2023 22:30:19 +0000 Subject: [PATCH 105/147] Make script idempotent will still install ruby, golang, etc but won't error on those Co-authored-by: Michael Oleske --- set-up-new-machine.sh | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 9e8e3ee..3a3a8dc 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -68,11 +68,10 @@ pushd capi-env-pool popd # tmux setup with luan -cd ~/workspace -git clone https://github.com/luan/tmuxfiles.git -cd tmuxfiles +clone https://github.com/luan/tmuxfiles.git ~/workspace/tmuxfiles +pushd ~/workspace/tmuxfiles ./install -cd ../.. +popd # install nvim wget https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb @@ -81,17 +80,27 @@ rm nvim-linux64.deb nvim -v # up/down arrow search history -ln -s ~/workspace/capi-workspace/.inputrc ~/.inputrc +if [ ! -L ~/.inputrc ]; then + ln -s ~/workspace/capi-workspace/.inputrc ~/.inputrc +fi # nvim plugins sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' mkdir -p ~/.config/nvim -ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim +if [ ! -L ~/.config/nvim/init.vim ]; then + ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim +fi # setup mysql sudo service mysql start sudo service mysql status # might need loop here depending how long status takes -sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';" +set +e +mysql -u root --password=password -e "show databases;" +MYSQL_RETURN=$? +set -e +if [ $MYSQL_RETURN != 0 ]; then + sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';" +fi # setup postgres sudo sed -i 's/peer/trust/' "$(find /etc/postgresql -name pg_hba.conf)" @@ -182,9 +191,8 @@ if ! which fly > /dev/null ; then fi # set up cf cli -cd ~/workspace -git clone https://github.com/cloudfoundry/cli.git -cd cli +clone https://github.com/cloudfoundry/cli.git ~/workspace/cli +cd ~/workspace/cli git switch v8 PATH="$PATH:$HOME/workspace/cli/out:/usr/local/go/bin:$HOME/go/bin" make build @@ -194,7 +202,9 @@ cf --version go install golang.org/x/tools/gopls@latest # add git authors file -ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors +if [ ! -L ~/.git-authors ]; then + ln -s ~/workspace/capi-workspace/assets/git-authors ~/.git-authors +fi # environment variables and helper bash functions (deploy only new capi, claim bosh lite) manually alias roundup_bosh_lites cause don't know if we want all of lib/misc.bash yet cat >> ~/.$(basename $SHELL)rc < Date: Mon, 10 Apr 2023 14:03:52 -0700 Subject: [PATCH 106/147] Vim improvements (#53) * add vim-rake plugin - adds come quality of life commans such as :A and AV * Automatically fold by syntax --- init.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.vim b/init.vim index 5c7c3c3..83df83a 100644 --- a/init.vim +++ b/init.vim @@ -27,6 +27,8 @@ Plug 'antoinemadec/FixCursorHold.nvim' Plug 'nvim-neotest/neotest' Plug 'olimorris/neotest-rspec' Plug 'nvim-neotest/neotest-go' +"common quality of life improvements" +Plug 'tpope/vim-rake' call plug#end() @@ -39,6 +41,9 @@ filetype plugin on " set numbers on set nu +" set folding by syntax +set foldmethod=syntax + lua < Date: Mon, 10 Apr 2023 14:05:00 -0700 Subject: [PATCH 107/147] bump to go 1.20.3 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 3a3a8dc..8718ee5 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -108,13 +108,13 @@ sudo sed -i 's/scram-sha-256/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz +wget https://go.dev/dl/go1.20.3.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.3.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Mon, 10 Apr 2023 15:48:13 -0700 Subject: [PATCH 108/147] Use app image to install latest stable nvim - nvim team remove deb file as option to install - chose app-image as the tarball method is label deprecated on their release page --- set-up-new-machine.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 8718ee5..3f4eb95 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -74,9 +74,12 @@ pushd ~/workspace/tmuxfiles popd # install nvim -wget https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb -sudo DEBIAN_FRONTEND=noninteractive apt install ./nvim-linux64.deb -y -rm nvim-linux64.deb +wget https://github.com/neovim/neovim/releases/download/stable/nvim.appimage +chmod u+x nvim.appimage +./nvim.appimage --appimage-extract +sudo mv squashfs-root / +sudo ln -s /squashfs-root/AppRun /usr/bin/nvim +rm nvim.appimage nvim -v # up/down arrow search history From f9e1be9f710f0585e259008fb334ce908b32d9ee Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Wed, 17 May 2023 17:06:05 +0000 Subject: [PATCH 109/147] Add Shwetha to git-authors Co-authored-by: Shwetha Gururaj --- assets/git-authors | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/git-authors b/assets/git-authors index 3fe7d86..7350cff 100644 --- a/assets/git-authors +++ b/assets/git-authors @@ -6,5 +6,6 @@ authors: mdl: Merric de Launey; mdelauney ef: Evan Farrar; efarrar tv: Tom Viehman; tviehman + sg: Shwetha Gururaj; gururajsh email: domain: vmware.com From e48ff92fdaffd861a7251625bc1597dabf1b638f Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Wed, 17 May 2023 17:06:33 +0000 Subject: [PATCH 110/147] add stack auditor to list of repos to clone Co-authored-by: Shwetha Gururaj --- set-up-new-machine.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 3f4eb95..a903b51 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -61,6 +61,8 @@ clone https://github.com/cloudfoundry/cf-acceptance-tests ~/workspace/cf-accepta clone https://github.com/cloudfoundry/capi-bara-tests ~/workspace/capi-bara-tests clone https://github.com/cloudfoundry/sync-integration-tests ~/workspace/sync-integration-tests clone https://github.com/cloudfoundry/capi-dockerfiles ~/workspace/capi-dockerfiles +clone https://github.com/cloudfoundry/stack-auditor ~/workspace/stack-auditor + # set correct branch for capi env pools pushd capi-env-pool From 5615854cb29677f40ad7c5d71977ee1e2dfca01f Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 19 May 2023 10:24:04 -0700 Subject: [PATCH 111/147] Add weekly trigger so we get lastest at least once a week --- pipeline.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pipeline.yml b/pipeline.yml index c806b52..2d81063 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -10,14 +10,24 @@ resources: branch: main uri: git@github.com:pivotal-cf/capi-env-pool.git private_key: ((pcf_bosh_lite_pool_deploy_key)) + - name: weekly-sunday + type: time + source: + location: America/Los_Angeles + start: 23:00 + stop: 23:30 + days: [Sunday] jobs: - name: create-latest-workstation serial: true plan: - - get: capi-workspace - trigger: true - - get: capi-env-pool + - in_parallel: + - get: weekly-sunday + trigger: true + - get: capi-workspace + trigger: true + - get: capi-env-pool - task: create-workstation-image config: platform: linux From d9c42e86f2b3334a6b1021b8bf5f78447f10285a Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Mon, 22 May 2023 23:18:51 +0000 Subject: [PATCH 112/147] Add dependencies for devex-performance-suite to workstation setup * also make workstation script idempotent Co-authored-by: Seth Boyles --- set-up-new-machine.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index a903b51..cbde558 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -15,11 +15,11 @@ function clone { - +curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y # dependencies to run tests -sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs npm -y +sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs -y # ruby dependencies - this is to keep noninteractive mode on ruby-install command sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y # install dependencies for target_cf helper @@ -28,6 +28,8 @@ sudo DEBIAN_FRONTEND=noninteractive apt install jq -y sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep -y # install dependencies for capi-team-playbook which apparently needs a config directory sudo DEBIAN_FRONTEND=noninteractive apt install lastpass-cli -y +# cypress +sudo DEBIAN_FRONTEND=noninteractive apt install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb chromium-browser -y mkdir -p ~/.config # clean up anything not needed sudo apt autoremove -y @@ -76,14 +78,15 @@ pushd ~/workspace/tmuxfiles popd # install nvim -wget https://github.com/neovim/neovim/releases/download/stable/nvim.appimage -chmod u+x nvim.appimage -./nvim.appimage --appimage-extract -sudo mv squashfs-root / -sudo ln -s /squashfs-root/AppRun /usr/bin/nvim -rm nvim.appimage -nvim -v - +if ! command -v nvim &> /dev/null; then + wget https://github.com/neovim/neovim/releases/download/stable/nvim.appimage + chmod u+x nvim.appimage + ./nvim.appimage --appimage-extract + sudo mv squashfs-root / + sudo ln -s /squashfs-root/AppRun /usr/bin/nvim + rm nvim.appimage + nvim -v +fi # up/down arrow search history if [ ! -L ~/.inputrc ]; then ln -s ~/workspace/capi-workspace/.inputrc ~/.inputrc @@ -134,7 +137,7 @@ rm -rf ruby-install-* # For best results this should match the version in capi-release RUBY_VERSION="$(<~/workspace/capi-release/.ruby-version)" -ruby-install ${RUBY_VERSION} +ruby-install ${RUBY_VERSION} --no-reinstall # chruby wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz @@ -233,8 +236,8 @@ source /usr/local/share/chruby/chruby.sh source /usr/local/share/chruby/auto.sh pushd ~/workspace/capi-release/src/cloud_controller_ng bundle install - DB=mysql rake db:create - DB=postgres rake db:create + DB=mysql bundle exec rake db:recreate + DB=postgres bundle exec rake db:recreate popd # git alias some of the above scripts use and we like From 105cd23da59a361b007bbfdc992f40f0eab98220 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Mon, 22 May 2023 16:57:22 -0700 Subject: [PATCH 113/147] bump to go 1.20.4 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index cbde558..1460c66 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -116,13 +116,13 @@ sudo sed -i 's/scram-sha-256/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.20.3.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.20.3.linux-amd64.tar.gz +wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Tue, 23 May 2023 22:18:04 +0000 Subject: [PATCH 114/147] Add script for installing smith - Note you need to have your github credentials loaded to use this script Co-authored-by: Merric de Launey --- install-scripts/install-smith.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 install-scripts/install-smith.sh diff --git a/install-scripts/install-smith.sh b/install-scripts/install-smith.sh new file mode 100755 index 0000000..b8a7a46 --- /dev/null +++ b/install-scripts/install-smith.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -ex + +echo "setting up toolsmiths creds..." +pushd ~ + +printf '%s\n' '#!/bin/bash' 'lpass show --password "Toolsmiths GCP Env Pool Creds"'> .smith-token-hook.sh +chmod 777 .smith-token-hook.sh + +echo "installing smith cli..." +cd workspace +[ ! -e "smith" ] && git clone git@github.com:pivotal/smith.git +cd smith && git pull +go install +popd + + From adc0bcb9bf9f31651deb33419fe0a952faff10c7 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Wed, 24 May 2023 16:43:05 -0700 Subject: [PATCH 115/147] add Daniel to git-authors --- assets/git-authors | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/git-authors b/assets/git-authors index 7350cff..b1fd7d3 100644 --- a/assets/git-authors +++ b/assets/git-authors @@ -7,5 +7,6 @@ authors: ef: Evan Farrar; efarrar tv: Tom Viehman; tviehman sg: Shwetha Gururaj; gururajsh + dfo: Daniel Felipe Ochoa; danielfelipo email: domain: vmware.com From 26928952794b2b41b6c40a26fdb442b7352a766d Mon Sep 17 00:00:00 2001 From: Evan Farrar Date: Mon, 5 Jun 2023 19:17:46 +0000 Subject: [PATCH 116/147] Add devex-performance-suite & scheduler to repos - This makes use of an old script that has some outdated repos. We didn''t think it was important to identify wich repos were no longer useful. Co-authored-by: Merric de Launey --- install-scripts/clone-repos.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install-scripts/clone-repos.sh b/install-scripts/clone-repos.sh index 55dd15f..fe95f68 100755 --- a/install-scripts/clone-repos.sh +++ b/install-scripts/clone-repos.sh @@ -43,6 +43,10 @@ pushd ~/workspace > /dev/null clone git@github.com:cloudfoundry/sync-integration-tests.git ~/go/src/code.cloudfoundry.org/sync-integration-tests clone git@github.com:cloudfoundry/capi-bara-tests.git ~/go/src/github.com/cloudfoundry/capi-bara-tests clone git@github.com:cloudfoundry/cli.git ~/go/src/code.cloudfoundry.org/cli + + clone git@github.com:pivotal-cf/devex-performance-suite.git ~/workspace/devex-performance-suite + clone git@github.com:pivotal-cf/pcf-scheduler-release.git ~/workspace/pcf-scheduler-release + clone git@github.com:pivotal-cf/p-scheduler.git ~/workspace/p-scheduler disable_cred_hook ~/workspace/capi-env-pool disable_cred_hook ~/workspace/capi-ci-private From ca079e571d28da0f28ac1c62744f9c53217837ac Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Fri, 16 Jun 2023 21:11:56 +0000 Subject: [PATCH 117/147] Use focal workstations instead of jammy --- pipeline.yml | 2 +- set-up-new-machine.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 2d81063..bc788ac 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -48,7 +48,7 @@ jobs: set -e gcloud auth activate-service-account --key-file=<(echo $GCP_SERVICE_ACCOUNT_KEY) echo "Creating Latest VM" - gcloud compute instances create capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud + gcloud compute instances create capi-ws-vm-latest --zone "us-central1-a" --project "cf-capi-arya" --boot-disk-size=50GB --boot-disk-type=pd-balanced --machine-type=e2-standard-8 --tags=workstations --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud echo "wait 30 for instance to be up" sleep 30 echo "copy capi-workspace over" diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 1460c66..e8efabc 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -113,6 +113,7 @@ fi # setup postgres sudo sed -i 's/peer/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo sed -i 's/scram-sha-256/trust/' "$(find /etc/postgresql -name pg_hba.conf)" +sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest From 9c25f88dbfc9c8026d5a7cd6f51d529ab6e6bda1 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Wed, 21 Jun 2023 15:03:55 -0700 Subject: [PATCH 118/147] bump to golang 1.20.5 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index e8efabc..6f90860 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -117,13 +117,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz +wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Thu, 13 Jul 2023 21:45:16 +0000 Subject: [PATCH 119/147] add ALE for linting * https://github.com/dense-analysis/ale --- init.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.vim b/init.vim index 83df83a..e1c917d 100644 --- a/init.vim +++ b/init.vim @@ -30,6 +30,9 @@ Plug 'nvim-neotest/neotest-go' "common quality of life improvements" Plug 'tpope/vim-rake' +" for linting +Plug 'dense-analysis/ale' + call plug#end() " Standard Vim Config @@ -97,7 +100,7 @@ end snippet = { -- REQUIRED - you must specify a snippet engine expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip`le users. -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. -- require('snippy').expand_snippet(args.body) -- For `snippy` users. -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. From cf4786cd56e7fc915fcc58d62e2d655243f1cf60 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Wed, 19 Jul 2023 22:44:14 +0000 Subject: [PATCH 120/147] use spaces instead of tabs --- init.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/init.vim b/init.vim index e1c917d..5bdd801 100644 --- a/init.vim +++ b/init.vim @@ -44,6 +44,7 @@ filetype plugin on " set numbers on set nu +set expandtab " set folding by syntax set foldmethod=syntax From b00ab3a1babe3f215d336ec0b3eeefdee268a068 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Thu, 20 Jul 2023 13:36:25 -0700 Subject: [PATCH 121/147] bump to go 1.20.6 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6f90860..26f1cd7 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -117,13 +117,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz +wget https://go.dev/dl/go1.20.6.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.6.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Wed, 26 Jul 2023 23:23:45 +0000 Subject: [PATCH 122/147] Install lts version of ruby as well for convenience Co-authored-by: Merric de Launey --- set-up-new-machine.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 26f1cd7..dc5472b 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -139,6 +139,7 @@ rm -rf ruby-install-* RUBY_VERSION="$(<~/workspace/capi-release/.ruby-version)" ruby-install ${RUBY_VERSION} --no-reinstall +ruby-install 3.0.6 --no-reinstall # chruby wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz From 24af343641f2b3b9a664979404edf3faf166b0e6 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Thu, 10 Aug 2023 10:50:42 -0700 Subject: [PATCH 123/147] bump to go 1.20.7 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index dc5472b..0efec1e 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -117,13 +117,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.20.6.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.20.6.linux-amd64.tar.gz +wget https://go.dev/dl/go1.20.7.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.7.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Mon, 14 Aug 2023 18:52:18 +0000 Subject: [PATCH 124/147] Remove tracker integration from claim_bosh_lite - we haven't used this tracker project in forever and we don't think this is valuable anymore Co-authored-by: Michael Oleske --- lib/claim-bosh-lite.bash | 59 ---------------------------------------- 1 file changed, 59 deletions(-) diff --git a/lib/claim-bosh-lite.bash b/lib/claim-bosh-lite.bash index 5e3db3e..18908bd 100755 --- a/lib/claim-bosh-lite.bash +++ b/lib/claim-bosh-lite.bash @@ -1,71 +1,12 @@ env_pool="$HOME/workspace/capi-env-pool" -readonly LASTPASS_API_KEY_LABEL='tracker_api_token' - -# TODO: have this script choose Tracker ID like our "story" script -project_id=1945579; - -function fetch_tracker_api_token() { - set +x - API_TOKEN=$(lpass show "$LASTPASS_API_KEY_LABEL" --notes 2> /dev/null) - return $? -} - -function get_stories() { - if [ -z "$API_TOKEN" ]; then - story_json="$(curl -s -H "Content-Type: application/json" \ - "https://www.pivotaltracker.com/services/v5/projects/$project_id/stories?with_state=started" | tr '**' ' ')" - else - story_json="$(curl -s -H "Content-Type: application/json" -H "X-TrackerToken: $API_TOKEN" \ - "https://www.pivotaltracker.com/services/v5/projects/$project_id/stories?with_state=started" | tr '**' ' ')" - fi - echo "$story_json" | tr '\n' ' ' | jq -r '.[] | "#\(.id) \(.name)"' - echo "No story" -} - -function story_selector() { - stories="$(get_stories | sed 's/#//g')" - - PS3="Select a story or 'q' to quit: " - OLD_IFS=$IFS - IFS=$'\n' - select story in $stories; do - echo $story - break - done - IFS=$OLD_IFS -} function claim_bosh_lite() { git_authors=$(git duet) if [ -z "$git_authors" ]; then echo "please set your git authors before running this!" - echo "maybe run 'story' while you're at it." - return - fi - - fetch_tracker_api_token - if [ -z "$API_TOKEN" ]; then - echo "Could not find tracker API token in your lastpass vault as a note under \"$LASTPASS_API_KEY_LABEL\"" - echo -e 'Attempting to pull stories without token \n' - fi - - if [ -n "$1" ] ; then - STORY=$1 - shift - else - echo "Please select a story for your bosh lite" - - STORY=$(story_selector) - fi - - if [ -z "${STORY}" ]; then - echo "Canceling bosh lite claim. Goodbye." return fi - STORY=$(echo $STORY | cut -c 1-20)... - echo Selected story \"${STORY}\" - env_dir=$( set -e From 4611ddb5337c0394221544bac7704cd5fec70c5d Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 25 Aug 2023 16:00:38 -0700 Subject: [PATCH 125/147] bump to go 1.21.0 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 0efec1e..7402046 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -117,13 +117,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.20.7.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.20.7.linux-amd64.tar.gz +wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Tue, 19 Sep 2023 14:05:26 -0700 Subject: [PATCH 126/147] bump to go 1.21.1 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 7402046..5429e67 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -117,13 +117,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz +wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Wed, 27 Sep 2023 21:23:00 +0000 Subject: [PATCH 127/147] Update git clone script to reflect repos we care about Co-authored-by: Merric de Launey --- install-scripts/clone-repos.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install-scripts/clone-repos.sh b/install-scripts/clone-repos.sh index fe95f68..879fe8e 100755 --- a/install-scripts/clone-repos.sh +++ b/install-scripts/clone-repos.sh @@ -38,22 +38,28 @@ pushd ~/workspace > /dev/null clone git@github.com:cloudfoundry/capi-dockerfiles.git ~/workspace/capi-dockerfiles clone git@github.com:cloudfoundry/capi-ci-private.git ~/workspace/capi-ci-private clone git@github.com:cloudfoundry/cf-deployment.git ~/workspace/cf-deployment - clone git@github.com:cloudfoundry/cf-for-k8s.git ~/workspace/cf-for-k8s clone git@github.com:cloudfoundry/cf-acceptance-tests.git ~/go/src/github.com/cloudfoundry/cf-acceptance-tests clone git@github.com:cloudfoundry/sync-integration-tests.git ~/go/src/code.cloudfoundry.org/sync-integration-tests clone git@github.com:cloudfoundry/capi-bara-tests.git ~/go/src/github.com/cloudfoundry/capi-bara-tests + clone git@github.com:pivotal-cf/lts-capi-release.git ~/workspace/lts-capi-release + clone git@github.com:cloudfoundry/cli.git ~/go/src/code.cloudfoundry.org/cli clone git@github.com:pivotal-cf/devex-performance-suite.git ~/workspace/devex-performance-suite + clone git@github.com:pivotal-cf/pcf-scheduler-release.git ~/workspace/pcf-scheduler-release clone git@github.com:pivotal-cf/p-scheduler.git ~/workspace/p-scheduler + clone git@github.com:pivotal-cf/scheduler-ci.git ~/workspace/scheduler-ci.git disable_cred_hook ~/workspace/capi-env-pool disable_cred_hook ~/workspace/capi-ci-private + clone git@github.com:pivotal-cf/notifications-ui.git ~/go/src/github.com/pivotal-cf/notifications-ui + # clone golang repos and symlink them into the GOPATH ln -sf $HOME/go/src/github.com/cloudfoundry/cf-acceptance-tests ~/workspace/cf-acceptance-tests ln -sfn $HOME/go/src/code.cloudfoundry.org/sync-integration-tests ~/workspace/sync-integration-tests ln -sf $HOME/go/src/github.com/cloudfoundry/capi-bara-tests ~/workspace/capi-bara-tests + ln -sf $HOME/go/src/github.com/pivotal-cf/notifications-ui ~/workspace/notifications-ui ln -sf $HOME/go/src/code.cloudfoundry.org/cli/ ~/workspace/cli popd > /dev/null From 76132035671411aacbd8757980b94094dba6dea2 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 29 Sep 2023 15:24:58 -0700 Subject: [PATCH 128/147] bump various cli installation versions --- set-up-new-machine.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 5429e67..6eb4a77 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -158,7 +158,7 @@ EOF echo "ruby-${RUBY_VERSION}" > ~/.ruby-version # install bosh cli -wget https://github.com/cloudfoundry/bosh-cli/releases/download/v7.1.2/bosh-cli-7.1.2-linux-amd64 +wget https://github.com/cloudfoundry/bosh-cli/releases/download/v7.4.0/bosh-cli-7.4.0-linux-amd64 chmod +x bosh-cli-*-linux-amd64 sudo mv bosh-cli-*-linux-amd64 /usr/bin/bosh bosh --version @@ -166,7 +166,7 @@ bosh --version # install credhub cli mkdir -p /tmp/credhub cd /tmp/credhub -wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.10/credhub-linux-2.9.10.tgz +wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.21/credhub-linux-2.9.21.tgz tar xf credhub*tgz chmod +x credhub sudo mv credhub /usr/bin @@ -175,13 +175,13 @@ rm -rf /tmp/credhub credhub --version # install om cli -wget https://github.com/pivotal-cf/om/releases/download/7.8.2/om-linux-amd64-7.8.2 +wget https://github.com/pivotal-cf/om/releases/download/7.9.0/om-linux-amd64-7.9.0 chmod +x om* sudo mv om* /usr/bin/om om --version # install bbl -wget https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.110/bbl-v8.4.110_linux_x86-64 +wget https://github.com/cloudfoundry/bosh-bootloader/releases/download/v9.0.12/bbl-v9.0.12_linux_amd64 chmod +x bbl* sudo mv bbl* /usr/bin/bbl bbl --version From a3e29fc0832e1e7c2bfc16ee20e76f60ec079364 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 29 Sep 2023 15:51:07 -0700 Subject: [PATCH 129/147] fix incorrect credhub link --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6eb4a77..464a6aa 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -166,7 +166,7 @@ bosh --version # install credhub cli mkdir -p /tmp/credhub cd /tmp/credhub -wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.21/credhub-linux-2.9.21.tgz +wget https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.21/credhub-linux-amd64-2.9.21.tgz tar xf credhub*tgz chmod +x credhub sudo mv credhub /usr/bin From 41451bfdafef3b0eeb05cb2fbe16ad1978e8af6b Mon Sep 17 00:00:00 2001 From: David Alvarado Date: Tue, 3 Oct 2023 18:12:58 +0000 Subject: [PATCH 130/147] Add notifications repos to clone script Co-authored-by: Merric de Launey --- install-scripts/clone-repos.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install-scripts/clone-repos.sh b/install-scripts/clone-repos.sh index 879fe8e..39a107c 100755 --- a/install-scripts/clone-repos.sh +++ b/install-scripts/clone-repos.sh @@ -54,12 +54,15 @@ pushd ~/workspace > /dev/null disable_cred_hook ~/workspace/capi-env-pool disable_cred_hook ~/workspace/capi-ci-private + clone git@github.com:pivotal-cf/notifications-ci.git ~/workspace/notifications-ci clone git@github.com:pivotal-cf/notifications-ui.git ~/go/src/github.com/pivotal-cf/notifications-ui + clone git@github.com:cloudfoundry/notifications.git ~/go/src/github.com/cloudfoundry/notifications # clone golang repos and symlink them into the GOPATH ln -sf $HOME/go/src/github.com/cloudfoundry/cf-acceptance-tests ~/workspace/cf-acceptance-tests ln -sfn $HOME/go/src/code.cloudfoundry.org/sync-integration-tests ~/workspace/sync-integration-tests ln -sf $HOME/go/src/github.com/cloudfoundry/capi-bara-tests ~/workspace/capi-bara-tests ln -sf $HOME/go/src/github.com/pivotal-cf/notifications-ui ~/workspace/notifications-ui + ln -sf $HOME/go/src/github.com/cloudfoundry/notifications ~/workspace/notifications ln -sf $HOME/go/src/code.cloudfoundry.org/cli/ ~/workspace/cli popd > /dev/null From 0fded921c519b483d1295e5cc9f6530e2f9a1996 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 10 Oct 2023 15:27:27 -0700 Subject: [PATCH 131/147] bump to go 1.21.3 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 464a6aa..ba013a1 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -117,13 +117,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz +wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Wed, 18 Oct 2023 11:03:45 -0700 Subject: [PATCH 132/147] fix 1.21.3 go install whoopsie --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index ba013a1..ca90d97 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -123,7 +123,7 @@ sudo tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz cat >> ~/.$(basename $SHELL)rc < Date: Fri, 17 Nov 2023 15:40:38 -0800 Subject: [PATCH 133/147] bump to go 1.21.4 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index ca90d97..d7070af 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -117,13 +117,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz +wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Fri, 17 Nov 2023 15:43:10 -0800 Subject: [PATCH 134/147] use non deprecated node 20 installation method --- set-up-new-machine.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index d7070af..3761b1d 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -13,9 +13,14 @@ function clone { fi } +# install node 20 from https://github.com/nodesource/distributions#installation-instructions +sudo apt update +sudo DEBIAN_FRONTEND=noninteractive apt install -y ca-certificates curl gnupg +sudo mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +NODE_MAJOR=20 +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list - -curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y # dependencies to run tests From dca25fa31c9b01fd5d9c296893aebf27df2e521b Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Thu, 14 Dec 2023 15:58:54 -0800 Subject: [PATCH 135/147] bump to go1.21.5 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 3761b1d..815711a 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -122,13 +122,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz +wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Wed, 17 Jan 2024 12:08:29 -0800 Subject: [PATCH 136/147] bump go to 1.21.6 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 815711a..dc4dcac 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -122,13 +122,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz +wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Tue, 30 Jan 2024 18:42:45 +0000 Subject: [PATCH 137/147] Update git authors file Co-authored-by: Michael Oleske --- assets/git-authors | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/git-authors b/assets/git-authors index b1fd7d3..a9cd98c 100644 --- a/assets/git-authors +++ b/assets/git-authors @@ -1,12 +1,12 @@ authors: - sb: Seth Boyles; sboyles - mo: Michael Oleske; moleske - da: David Alvarado; alvaradoda - ar: Alex Rocha; alexr1 - mdl: Merric de Launey; mdelauney - ef: Evan Farrar; efarrar - tv: Tom Viehman; tviehman - sg: Shwetha Gururaj; gururajsh - dfo: Daniel Felipe Ochoa; danielfelipo + sb: Seth Boyles; seth.boyles + mo: Michael Oleske; michael.oleske + da: David Alvarado; david.alvarado + ar: Alex Rocha; alex.rocha + ef: Evan Farrar; evan.farrar + sg: Shwetha Gururaj; shwetha.gururaj + dfo: Daniel Felipe Ochoa; daniel.ochoa + mp: Marc Paquette; marc.paquette + ad: Amelia Downs; amelia.downs email: - domain: vmware.com + domain: broadcom.com From 0d8d72fbcc582d8cb1c3760f6f3c3b56630a1261 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Tue, 30 Jan 2024 13:32:42 -0800 Subject: [PATCH 138/147] add basic vimrc and warning that workstations have little vim configuration (#56) --- set-up-new-machine.sh | 6 ++++++ vimrc | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 vimrc diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index dc4dcac..de8d057 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -104,6 +104,12 @@ if [ ! -L ~/.config/nvim/init.vim ]; then ln -s ~/workspace/capi-workspace/init.vim ~/.config/nvim/init.vim fi +# link basic .vimrc +if [ ! -L ~/.vimrc ]; then + ln -s ~/workspace/capi-workspace/vimrc ~/.vimrc +f + + # setup mysql sudo service mysql start sudo service mysql status # might need loop here depending how long status takes diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..7e47b24 --- /dev/null +++ b/vimrc @@ -0,0 +1,22 @@ +autocmd VimEnter * echo "WARNING: This workstation is largely configured for neovim, but you are using vim. Consider using `nvim` instead of `vim`." +set title +set encoding=utf-8 +set mouse=a +set number +set ofu=syntaxcomplete#Complete + +" When auto-indenting, use the indenting format of the previous line +set copyindent +" When on, a in front of a line inserts blanks according to 'shiftwidth'. +" 'tabstop' is used in other places. A will delete a 'shiftwidth' worth of +" space at the start of the line. +set smarttab +" Copy indent from current line when starting a new line (typing in Insert +" mode or when using the "o" or "O" command) +set autoindent +" Automatically inserts one extra level of indentation in some cases, and works +" for C-like files +set smartindent + +set ruler + From 230078e348650f391a0c94a51cf79796fff984ab Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Tue, 30 Jan 2024 13:38:08 -0800 Subject: [PATCH 139/147] Add docker to workstations (#55) * also separate commands to run as sudo * still need to add pivotal user to docker group --- set-up-new-machine.sh | 27 ++------------------------- system_install.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 25 deletions(-) create mode 100755 system_install.sh diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index de8d057..d5a9cbf 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -13,32 +13,9 @@ function clone { fi } -# install node 20 from https://github.com/nodesource/distributions#installation-instructions -sudo apt update -sudo DEBIAN_FRONTEND=noninteractive apt install -y ca-certificates curl gnupg -sudo mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -NODE_MAJOR=20 -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list - -sudo apt update -sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y -# dependencies to run tests -sudo DEBIAN_FRONTEND=noninteractive apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs -y -# ruby dependencies - this is to keep noninteractive mode on ruby-install command -sudo DEBIAN_FRONTEND=noninteractive apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y -# install dependencies for target_cf helper -sudo DEBIAN_FRONTEND=noninteractive apt install jq -y -# install dependencies for nvim telescope (fuzzy search) -sudo DEBIAN_FRONTEND=noninteractive apt install ripgrep -y -# install dependencies for capi-team-playbook which apparently needs a config directory -sudo DEBIAN_FRONTEND=noninteractive apt install lastpass-cli -y -# cypress -sudo DEBIAN_FRONTEND=noninteractive apt install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb chromium-browser -y -mkdir -p ~/.config -# clean up anything not needed -sudo apt autoremove -y +sudo ./system_install.sh +mkdir -p ~/.config # add github.com to list of known hosts ssh-keyscan github.com >> ~/.ssh/known_hosts diff --git a/system_install.sh b/system_install.sh new file mode 100755 index 0000000..ddfe8e3 --- /dev/null +++ b/system_install.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +export DEBIAN_FRONTEND=noninteractive + +# install node 20 from https://github.com/nodesource/distributions#installation-instructions +apt update +apt install -y ca-certificates curl gnupg + +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +NODE_MAJOR=20 +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +# Add docker apt repo +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(grep VERSION_CODENAME /etc/os-release | cut -d '=' -f 2) stable" | tee /etc/apt/sources.list.d/docker.list +curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + +apt update +apt upgrade -y + +# dependencies to run tests +apt install build-essential postgresql libpq-dev mysql-server libmysqlclient-dev zip unzip nodejs -y +apt-get install -yq apt-utils ca-certificates curl gpg +apt-get install -yq cowsay docker-buildx-plugin docker-ce docker-ce-cli docker-compose-plugin + +return +# ruby dependencies - this is to keep noninteractive mode on ruby-install command +apt install bison libffi-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libyaml-dev m4 -y +# install dependencies for target_cf helper +apt install jq -y +# install dependencies for nvim telescope (fuzzy search) +apt install ripgrep -y +# install dependencies for capi-team-playbook which apparently needs a config directory +apt install lastpass-cli -y +# cypress +apt install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb chromium-browser -y +# clean up anything not needed +apt autoremove -y + From 3ae9d229952d5b8fb42497687c187077e52eb20d Mon Sep 17 00:00:00 2001 From: Michael Oleske Date: Tue, 30 Jan 2024 21:48:56 +0000 Subject: [PATCH 140/147] Fix missing f in fi --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index d5a9cbf..48a58c2 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -84,7 +84,7 @@ fi # link basic .vimrc if [ ! -L ~/.vimrc ]; then ln -s ~/workspace/capi-workspace/vimrc ~/.vimrc -f +fi # setup mysql From 62146a47dadd32131c6fd1ce240aced75f9fce86 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 30 Jan 2024 14:01:11 -0800 Subject: [PATCH 141/147] give full path to system_install.sh - seems like it got confused on location cause the error message on the automation was "no such file system_install.sh" --- set-up-new-machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 48a58c2..97dc4f0 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -13,7 +13,7 @@ function clone { fi } -sudo ./system_install.sh +sudo ~/workspace/capi-workspace/system_install.sh mkdir -p ~/.config # add github.com to list of known hosts From 62252a80831be5827ab3df0789119d43c016a545 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Wed, 7 Feb 2024 00:57:16 +0000 Subject: [PATCH 142/147] add pivotal user to docker group --- system_install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system_install.sh b/system_install.sh index ddfe8e3..5fc8c79 100755 --- a/system_install.sh +++ b/system_install.sh @@ -14,6 +14,9 @@ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.co echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(grep VERSION_CODENAME /etc/os-release | cut -d '=' -f 2) stable" | tee /etc/apt/sources.list.d/docker.list curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +user=pivotal +sudo gpasswd -a "${user}" docker + apt update apt upgrade -y From 2aecae405550415c259d4320540778e8903fc97e Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Thu, 8 Feb 2024 17:07:28 -0800 Subject: [PATCH 143/147] bump latest go 1.21 --- set-up-new-machine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 97dc4f0..14f9718 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -105,13 +105,13 @@ sudo sed -i 's/md5/trust/' "$(find /etc/postgresql -name pg_hba.conf)" sudo service postgresql restart # install golang to get latest -wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz -sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz +wget https://go.dev/dl/go1.21.7.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.21.7.linux-amd64.tar.gz # set go and cf cli and ~/go/bin on path cat >> ~/.$(basename $SHELL)rc < Date: Wed, 14 Feb 2024 11:17:10 -0800 Subject: [PATCH 144/147] Add github cli to workstations (#57) --- system_install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system_install.sh b/system_install.sh index 5fc8c79..32ba0ff 100755 --- a/system_install.sh +++ b/system_install.sh @@ -13,6 +13,10 @@ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.co # Add docker apt repo echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(grep VERSION_CODENAME /etc/os-release | cut -d '=' -f 2) stable" | tee /etc/apt/sources.list.d/docker.list curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +# add github cli apt repo +curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg +chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list user=pivotal sudo gpasswd -a "${user}" docker @@ -36,6 +40,8 @@ apt install ripgrep -y apt install lastpass-cli -y # cypress apt install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb chromium-browser -y +# github cli +apt install gh -y # clean up anything not needed apt autoremove -y From b164711ff8d382bd3ba8501048fd09c6459b941c Mon Sep 17 00:00:00 2001 From: Al Berez Date: Fri, 16 Feb 2024 20:29:54 -0800 Subject: [PATCH 145/147] Customize tmux - Preserve PWD in new pane/window - Pressing leander C-Space key second time switch to the previous pane/window --- set-up-new-machine.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 14f9718..6889a1d 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -59,6 +59,25 @@ pushd ~/workspace/tmuxfiles ./install popd +cat <> $HOME/.tmux.conf.local +unbind-key C-Space +unbind-key Enter + +# TODO: if the current tab runs SSH with nested tmux, second C-Space send conrol key to the nested tmux +bind-key C-Space run "tmux last-pane || tmux last-window || tmux display 'No last pane or window'" +bind-key Enter run "tmux last-window || tmux last-pane || tmux display 'No last window or pane'" + +set -g base-index 1 +setw -g pane-base-index 1 +set -sg escape-time 10 + +bind '"' split-window -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" +bind c new-window -c "#{pane_current_path}" + +set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock +EOT + # install nvim if ! command -v nvim &> /dev/null; then wget https://github.com/neovim/neovim/releases/download/stable/nvim.appimage From 297f3ce799c3b8a364f7d7f1fce4c60168899010 Mon Sep 17 00:00:00 2001 From: Al Berez Date: Mon, 4 Mar 2024 11:05:41 -0800 Subject: [PATCH 146/147] Set nvim as default editor (#59) * Make nvim default editor * Move default editor config to setup script * cleanup * add vi alias pointed to nvim --- set-up-new-machine.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/set-up-new-machine.sh b/set-up-new-machine.sh index 6889a1d..1b6028b 100755 --- a/set-up-new-machine.sh +++ b/set-up-new-machine.sh @@ -229,6 +229,11 @@ cat >> ~/.$(basename $SHELL)rc < Date: Mon, 15 Apr 2024 13:46:42 -0600 Subject: [PATCH 147/147] Add Tim Downey to git-authors --- assets/git-authors | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/git-authors b/assets/git-authors index a9cd98c..3cccf49 100644 --- a/assets/git-authors +++ b/assets/git-authors @@ -8,5 +8,6 @@ authors: dfo: Daniel Felipe Ochoa; daniel.ochoa mp: Marc Paquette; marc.paquette ad: Amelia Downs; amelia.downs + td: Tim Downey; tim.downey email: domain: broadcom.com