Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create workstation provisioning #96

Merged
merged 70 commits into from
Sep 1, 2022

Conversation

mvgijssel
Copy link
Member

@mvgijssel mvgijssel commented Aug 5, 2022

Closes #95

To re-provision the new macbook:

  1. Create .env.bootstrap file in ~ directory
  2. Run export BRANCH='mg/95/create-workstation-provisioning'; /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mvgijssel/setup/$BRANCH/workstation/bootstrap.sh)"
  3. Run export PATH="/opt/homebrew/bin:$PATH" because homebrew needs this path
  4. Install xcode from the AppStore due to error
Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk
  1. Check xcode installation progress using this post https://stackoverflow.com/questions/67900692/latest-version-of-xcode-stuck-on-installation-12-5 because apparently it installs super duper slow.
  2. Link the xcode SDK otherwise installation still fails on version 12.1 missing
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk
  1. Run brew install asdf otherwise the pyinfra provisioning fails due to missing asdf
  2. Run BRANCH=mg/95/create-workstation-provisioning ./workstation/bootstrap.sh from inside setup directory to continue installation
  3. Run bazel run //workstation:provision -- --data install_ssh=True to install all of the necessary secret files

TODO

  • replace ZSH configuration with Fig
  • setup color theme for iTerm2 and VSCode
  • revoke existing GPG key
    cd ~/.gnupg
    gpg --list-secret-keys --keyid-format=long
    gpg --output revoke.asc --gen-revoke XXX
    gpg --import revoke.asc
    gpg --armor --export XXX
    # publish the revoked key to a public key server
    gpg --keyserver pgp.mit.edu --send-keys key-ID
    
  • replace GPG SSH connectivity with SSH key stored in 1Password
  • replace GPG git commit signing with SSH key stored in 1Password
  • re-sign commits in this branch with new SSH-based key
    git filter-branch -f --commit-filter 'git commit-tree -S "$@";' 9755cd169aa5a37c13fc0286e25fa7ec72f0834d..HEAD
    
  • update public key on hypervisor
  • ability to run workstation provisioning script while asdf is active
  • Turn 1Password method into pyinfra operation
  • Add connectivity tools deployment for things like Slack and WhatsApp
  • Remove dotfiles folder
  • Setup Github actions test
  • Disable 1password cli within the CI
  • Run macOS customisations
  • Add aws-okta/awscli/viscosity and configuration
  • Install fig dotfiles/settings once terminal files have been copied

mvgijssel added 30 commits April 1, 2022 20:22
* Rename Please BUILD files to BUILD.plz

* Working basic build of hypervisor image using packer in Bazel
* Download and run Lima through Bazel

* Run hypervisor image using lima

* Working "just hypervisor-run"!

* Added some documentation for lima_runtime
* Install ignite dependencies using Pyinfra

* Set necessary environment variables in packer provisioner

* Working pyinfra command using Rlocation

* Working provision script without strict host key checking

* Run pyinfra provisioning during packer build
* Created bazel rule to convert qcow to vagrant box

* Working runner_binary with working $rlocation

* Implement vagrant ssh key authentication

* Introduce vagrant toolchain for vagrant_run rule

* Use runner_binary for pyinfra_run as well

* Remove Lima
* Store the qcow image sha in the vagrant box info meta data

* Working inspec binary with rules_ruby

* Verify if ignite dependencies are installed

* Run and test the ignited service

* Remove packer user when done with provisioning

* Remove vagrant_run reference
* Run Hypervisor test in GitHub actions

* Add support for macos version of GitHub CI in Gemfile

* Ensure qemu is installed

* install coreutils

* Upload qemu logs

* Disable compression for the vagrant box to speed up build

* Fix rules_python chmod for local installation

* Remove debug info

* Simplify the bazelrc
* Fix hypervisor-test by disabling timer check in Qemu

* Update checksum for ubuntu focal image
* Extract CNI and docker into own operations

* Install Nomad

* Install latest gems for inspec and kitchen

* Updated sha for kernel

* Install consul

* Install compatible envoy version for consul
* Added presence input for all rooms

* Force zigbee channel 11

* light and presence management in blueprints

* Added is_showering presence condition for bathroom

* Added google home entities

* Store 24 hours worth of traces for presence

* Use Homekit controller for Tado instead of Tado integration

* Added homekit entities

* Introduce adaptive_lighting and bedroom_is_sleeping behaviour

* Created animation for hallway lights

* Replace deluge with transmission (unrelated)
@mvgijssel mvgijssel mentioned this pull request Sep 1, 2022
4 tasks
@mvgijssel mvgijssel enabled auto-merge (squash) September 1, 2022 08:06
@mvgijssel mvgijssel merged commit 3187c1f into master Sep 1, 2022
@mvgijssel mvgijssel deleted the mg/95/create-workstation-provisioning branch September 1, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate dotfiles Pyinfra
1 participant