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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
9755cd1
Install git-filter-repo (#67)
mvgijssel Apr 1, 2022
00f959d
Build hypervisor iso using Packer with Bazel (#69)
mvgijssel Apr 6, 2022
86da7f1
Download and run Lima through Bazel (#76)
mvgijssel Apr 7, 2022
aacfb65
Install Ignite using Pyinfra (#77)
mvgijssel Apr 9, 2022
feb648b
Replace Lima with Vagrant for local development (#79)
mvgijssel Apr 14, 2022
1e7878f
Test hypervisor using InSpec (#80)
mvgijssel Apr 15, 2022
66f7b4c
Run Hypervisor test in GitHub actions (#82)
mvgijssel Apr 17, 2022
fc7b609
Fix hypervisor-test by disabling timer check in Qemu (#87)
mvgijssel May 6, 2022
3bfa5f1
Enable debugging for all tools using SETUP_DEBUG=1 (#91)
mvgijssel May 7, 2022
29601e7
Nomad based Hypervisor (#92)
mvgijssel Jun 5, 2022
67e3ef6
Introduce Home Assistant (#94)
mvgijssel Jul 20, 2022
4ed51c8
Setup workstation bootstrap script to prevent sudo for asking password
mvgijssel Jul 22, 2022
e537385
Setup entire skeleton for bootstrap script
mvgijssel Jul 22, 2022
e665d41
Basic provision script for workstation
mvgijssel Jul 22, 2022
2f161a8
Prevent homebrew from updating existing packages
mvgijssel Jul 22, 2022
29d8011
Converted bathroom lights to zigbee control after installing shelly b…
mvgijssel Jul 24, 2022
6cf10c4
Install config files for terminal
mvgijssel Jul 26, 2022
8425571
Fix office light in Google Home
mvgijssel Jul 26, 2022
fab9c5e
Ensure proper ZSH is used by login shell
mvgijssel Jul 26, 2022
bfea860
Install vscode editor
mvgijssel Jul 26, 2022
c217e06
Ability to partially run pyinfra deploy
mvgijssel Jul 26, 2022
157d6fa
Install languages for workstation
mvgijssel Jul 26, 2022
64ec2be
Basic setup installing ssh
mvgijssel Jul 26, 2022
4e47ad2
Begin wiring 1password into workstation provision
mvgijssel Jul 26, 2022
4f48127
Deploy 1password connect api to hypervisor
mvgijssel Jul 26, 2022
bcc0285
Connect pyinfra to 1password connect
mvgijssel Jul 26, 2022
2fa4a45
Working download of user_config
mvgijssel Jul 26, 2022
6a05399
Converted toilet lights to zigbee
mvgijssel Jul 26, 2022
64bb608
Added blitzwolf plugs
mvgijssel Aug 2, 2022
4297400
Prevent light transition for toilet lights which sometimes stops the …
mvgijssel Aug 2, 2022
0a850ed
Experiment with QOS 1 in hallway lights
mvgijssel Aug 2, 2022
a4f60ce
Remove bathroom_is_showering for now
mvgijssel Aug 2, 2022
d1e5258
Working download single file from 1password
mvgijssel Aug 2, 2022
697bd6c
Undo zigbee lights toilet for now
mvgijssel Aug 3, 2022
38729b9
WORKING installing of terminal
mvgijssel Aug 5, 2022
08077b3
Disable unnecessary global asdf languages
mvgijssel Aug 5, 2022
4098660
Migrate terminal config to fig
mvgijssel Aug 26, 2022
dd6f933
Create iTerm2 profile with updated colors and fonts
mvgijssel Aug 27, 2022
01d19ed
Configure Snazzy color theme for terminal and VSCode
mvgijssel Aug 27, 2022
fbafa92
Replace gpg with 1password for SSH authentication
mvgijssel Aug 28, 2022
d246925
Add SSH based commit signing
mvgijssel Aug 28, 2022
678b233
Add git change-commits
mvgijssel Aug 28, 2022
7ce4337
Finish task
mvgijssel Aug 28, 2022
bc6b9d1
Enable fuzzy search for atuin
mvgijssel Aug 29, 2022
b2e424d
Working install_ssh provision run
mvgijssel Aug 29, 2022
df2f1e0
Restore asdf operation logic
mvgijssel Aug 29, 2022
aa766c3
Created onepassword sync operation to download/upload secrets to 1Pas…
mvgijssel Aug 30, 2022
afe1220
Remove onepassword connect sdk
mvgijssel Aug 30, 2022
fba7ebe
Automatically install buildifier
mvgijssel Aug 30, 2022
2719772
Install utilities
mvgijssel Aug 30, 2022
f6f1094
Remove dotfiles directory
mvgijssel Aug 30, 2022
9e8e931
Remove dotfiles test
mvgijssel Aug 30, 2022
a9e250a
Merge branch 'master' into mg/95/create-workstation-provisioning
mvgijssel Aug 30, 2022
3d311d3
Created workstation test github action
mvgijssel Aug 30, 2022
20b3a56
Force symlinks using home_link helper
mvgijssel Aug 30, 2022
5464f15
Use a fact for asdf plugins
mvgijssel Aug 30, 2022
1725ad6
Disable onepassword in CI for now
mvgijssel Aug 30, 2022
2b5f40a
Ensure op command and better backup dir
mvgijssel Aug 30, 2022
69d3c7d
Restore onepassword sync
mvgijssel Aug 30, 2022
dd3bd41
Disable onepassword.sync in the CI for now
mvgijssel Aug 31, 2022
f074ec6
WIP workflow deploy
mvgijssel Aug 31, 2022
69fa3c4
Introduce workflow deploy with macOS customisations
mvgijssel Aug 31, 2022
bd50c8f
Ensure we also install aws tools
mvgijssel Aug 31, 2022
b47bbc2
Install fig dotfiles
mvgijssel Aug 31, 2022
769507d
Use homebrew prefix
mvgijssel Aug 31, 2022
e41d43e
Install Fig while installing terminal
mvgijssel Aug 31, 2022
59f44d0
Disable syncing dotfiles in the CI for Fig.io
mvgijssel Aug 31, 2022
c84a3fc
Fix workstation provisioning
mvgijssel Sep 1, 2022
f3c9da1
Also remove aws_completer
mvgijssel Sep 1, 2022
d6cccac
Remove aws-okta because it's disabled in homebrew
mvgijssel Sep 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazeliskrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
USE_BAZEL_VERSION=5.3.0
40 changes: 0 additions & 40 deletions .envrc

This file was deleted.

33 changes: 15 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,23 @@ jobs:
with:
access_token: ${{ github.token }}

test-dotfiles:
name: Test dotfiles
timeout-minutes: 60
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}
workstation-test:
name: Workstation test
timeout-minutes: 30
runs-on: macos-10.15
steps:
- uses: actions/checkout@v1
- run: ./scripts/github_load_env.sh .envrc
- run: env
- run: |
export CI_PASSWORD=''
export BRANCH="$GIT_BRANCH"
eval "$(cat ./dotfiles/bootstrap.sh)" < <(echo $CI_PASSWORD)
- run: env
- working-directory: ${{ env.SETUP_DOTFILES_DIR }}
run: bundle install
- working-directory: ${{ env.SETUP_DOTFILES_DIR }}
run: bundle exec rspec
- uses: pat-s/[email protected]
id: bazel-cache
with:
path: |
cache/bazel_cache
cache/bazel_repository_cache
key: bazel-cache-${{ runner.os }}-${{ github.job }}-${{ github.sha }}
restore-keys: bazel-cache-${{ runner.os }}-${{ github.job }}-
# removing the aws CLI so it can be installed by the workstation provisioning
- run: rm /usr/local/bin/aws /usr/local/bin/aws_completer
- run: bazel run //workstation:provision

hypervisor-test:
name: Hypervisor test
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ mutagen.yml.lock
/home-assistant/zigbee2mqtt-data/*
!/home-assistant/zigbee2mqtt-data/configuration.yaml

/home-assistant/z-stack-firmware/*
/home-assistant/z-stack-firmware/*

.env

.DS_Store
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"vspacecode.vspacecode",
"alexanderbast.vscode-snazzy",
"BazelBuild.vscode-bazel"
],
}
8 changes: 3 additions & 5 deletions 1password/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ services:
ports:
- "8090:8080"
volumes:
- "./1password-credentials.json:/home/opuser/.op/1password-credentials.js\
on"
- "./1password-credentials.json:/home/opuser/.op/1password-credentials.json"
- "data:/home/opuser/.op/data"

op-connect-sync:
image: 1password/connect-sync:latest
ports:
- "8091:8080"
- "127.0.0.1:8091:8080"
volumes:
- "./1password-credentials.json:/home/opuser/.op/1password-credentials.js\
on"
- "./1password-credentials.json:/home/opuser/.op/1password-credentials.json"
- "data:/home/opuser/.op/data"

volumes:
Expand Down
21 changes: 10 additions & 11 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ load("//tools/packer:repositories.bzl", "rules_packer_toolchains")

bazel_skylib_workspace()

rules_packer_toolchains(
version = "1.8.0",
)
# TODO: no binary available for M1!
# rules_packer_toolchains(
# version = "1.8.0",
# )

# https://cloud-images.ubuntu.com/focal/current/unpacked/
http_file(
Expand Down Expand Up @@ -49,21 +50,19 @@ http_file(

http_archive(
name = "rules_python",
patch_args = ["-p1"],
patches = ["@//tools/python:fix-chmod.patch"],
sha256 = "9fcf91dbcc31fde6d1edb15f117246d912c33c36f44cf681976bd886538deba6",
strip_prefix = "rules_python-0.8.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.0.tar.gz",
sha256 = "b593d13bb43c94ce94b483c2858e53a9b811f6f10e1e0eedc61073bd90e58d9c",
strip_prefix = "rules_python-0.12.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.12.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "python_register_toolchains")

python_register_toolchains(
name = "python3_9",
python_version = "3.9",
name = "python3_10",
python_version = "3.10",
)

load("@python3_9//:defs.bzl", "interpreter")
load("@python3_10//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")

pip_parse(
Expand Down
2 changes: 0 additions & 2 deletions dotfiles/.rspec

This file was deleted.

Loading