Skip to content

cloudfoundry/capi-workspace

Repository files navigation

capi workstation setup πŸ‹

Hello there! This repo is intended to provide light-weight setup to developing on CAPI projects.

capi

Dependencies

  • pip

Installation

    mkdir -p ~/workspace && cd ~/workspace
    git clone [email protected]:cloudfoundry/capi-workspace.git && cd capi-workspace

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
  2. ssh onto said machine gcloud compute ssh --zone "us-central1-a" "pivotal@capi-ws-michael" --project "cf-capi-arya" --ssh-flag="-A"
  3. babysiting set-up-new-machine.sh while it maybe runs
  4. 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)
  5. 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

Contributing to this repo

  • 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

Stuff, important stuff. Stuff that makes a difference.

Directory Overview

Description of the folders in this project:

Folder Description
assets random static files
bash-it all the bash-it stuff, only bash-it stuff
helpers random helper files
lib scripts that could be sourced into your shell
bin scripts that can be added to your $PATH
install-scripts executable scripts that install a thing or two

Why is lib separate from bash-it? Not everyone uses bash-it, so lib is similar to scripts, giving people a way to manually load the things they care about in. For example, one may manually (and minimally) load in capi-workspace content by sourcing a file like this in their .bash_profile:

❯ bat bash_sources/load_capi_workspace.zsh
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       β”‚ File: bash_sources/load_capi_workspace.zsh
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   β”‚
   2   β”‚ source ~/workspace/capi-workspace/lib/pullify.bash >/dev/null
   3   β”‚ source ~/workspace/capi-workspace/lib/target-bosh.bash >/dev/null
   4   β”‚ source ~/workspace/capi-workspace/lib/claim-bosh-lite.bash >/dev/null
   5   β”‚ source ~/workspace/capi-workspace/lib/unclaim-bosh-lite.bash >/dev/null
   6   β”‚ source ~/workspace/capi-workspace/lib/deploy_only_new_capi.bash >/dev/null
   7   β”‚
   8   β”‚ export PATH="$PATH:$HOME/workspace/capi-workspace/bin"
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────