Skip to content

Commit

Permalink
Merge pull request #257 from rackerlabs/devbox-and-poetry
Browse files Browse the repository at this point in the history
feat: development shells with Devbox
  • Loading branch information
stevekeay authored Sep 11, 2024
2 parents c6ae1d5 + 019efd8 commit afc1604
Show file tree
Hide file tree
Showing 11 changed files with 1,733 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ __pycache__
# auto-generated argo-workflows docs
# see .github/workflows/mkdocs.yaaml
docs/workflows/

# devbox's envrc
.envrc
.direnv
40 changes: 40 additions & 0 deletions python/ironic-understack/DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Development environment

In order to easily setup the development environment for `ironic_understack`:

1. [Install Devbox](https://www.jetify.com/devbox/docs/installing_devbox/) if
you don't have it yet.
2. Start using the environment with one of the methods described below

That's it.

## Automated method (recommended)

If you want the environment to be started automatically when you `cd` into a
project directory (without you having to run `devenv shell`), run a one-time
command:

`devbox generate direnv`

You also need to have [direnv](https://direnv.net/docs/installation.html)
installed on your system.

The next time you change into the project directory you will have the
environment ready to use.

## Manual method

Run `devbox shell` in the project directory every time you want to enter
development environment.


## What's available in the environment

- ironic
- pytest
- python 3.11
- Kubernetes tools (kubectl, [kubeseal][kubeseal], kustomize, [telepresence][telepresence])
- Argo client to interact with the Argo workflows

[telepresence]: https://www.telepresence.io/
[kubeseal]: https://github.com/bitnami-labs/sealed-secrets
25 changes: 25 additions & 0 deletions python/ironic-understack/devbox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
"packages": [
"jq@latest",
"yq-go@latest",
"[email protected]",
"poetry@latest",
"kubectl@latest",
"kubeseal@latest",
"kustomize@latest",
"telepresence2@latest"
],
"shell": {
"init_hook": [
"echo 'Welcome to Understack ironic devbox!' > /dev/null",
". $VENV_DIR/bin/activate",
"poetry install"
],
"scripts": {
"test": [
"pytest"
]
}
}
}
Loading

0 comments on commit afc1604

Please sign in to comment.