bitops
bitops copied to clipboard
Facilitate local/minikube development
Problem: it's error-prone to test bitops changes locally and difficult to test any helm changes locally for sufficiently complex helm projects and most bitops scripts.
Solution: add minikube as a deploy target, update scripts so they can be run locally, and discuss other enhancements below.
I see a few options:
- Add 'minikube' support: could run before helm + allow us to do things like
minikube addons enable ingress
/minikube addons enable metrics-server
- Would be nice to conditionally enable or disable entire environments or tools based on bitops config or the environment
- No issue yet, but there's a blog ticket after: https://github.com/bitovi/bitops/issues/108
- Update scripts to easily be run locally/debug/refactor
- Things like: usage info, options, separating parameters +
ENV_VARS
would all make these scripts be easier to run and debug locally. Not directly related to deploying to minikube, but would be helpful for local bitops development and debugging - We might also want to adopt a style guide (example) or add something like shellcheck to CI
- Things like: usage info, options, separating parameters +
- Does running helm tests fit in here?
- Likely not, this seems like something we can support with
helm upgrade
-- but we haven't confirmed yet
- Likely not, this seems like something we can support with
- ~Do we need shell unit tests?~ https://github.com/bitovi/bitops/issues/106
- ~Is there a standard way we could set up debugging?
DEBUG=1
is inconsistently used in some scripts andset -x
adds a lot of noise/potentially sensitive values to log files.~ https://github.com/bitovi/bitops/issues/88 - Does (1) require us to support ordered or dependent deployments? E.g. only deploy helm after minikube, or allow users to specify an order
- https://github.com/bitovi/bitops/issues/63
- ~Diffing environments~ https://github.com/bitovi/bitops/issues/107 and/or https://github.com/bitovi/bitops/issues/102
- Generating environments + generating minikube setup scritps for a "local" dev env
This could be spun out into some useful tools:
- bitops diff sha1 sha2: show me "compiled" differences between two commits
- bitops bisect ...: like git bisect. give bitops a good and bad version, then use binary search to find the bad commit
- doesn't seem as useful as the above... you'd be reading diffs/dry runs, or deploying @ each commit (or running a script after deploying or dumping the dry runs to a file)
Diffing different environments would be huge too
Generate a "local" env that spins up minikube using before scripts? Something reusable like a heroku "buildpack"? Doesn't completely fit that model though..
^ would also be good to be able to generate things for existing repos (like rails can... e.g. bitops gen env local --minikube
).
for debugging and logging: https://github.com/bitovi/bitops/issues/88
Reopening - This would be a great to have to support local development