oslokommune / ok

Infrastructure toolbox šŸ‘Œ
https://km.oslo.systems
1 stars 0 forks source link

Create Boilerplate integration commands #124

Open staticaland opened 2 weeks ago

staticaland commented 2 weeks ago
### Tasks
- [x] Phase out `ok get` command
- [x] Create `ok pkg install` command
- [ ] Phase out `get-template` and `get` subcommands

Undecided

Could it be useful to include Boilerplate in the name?

Inspiration

Decisions

Consider Decision Why
Move vars to configuration (package.yml) file šŸŸ„ Can't be used with regular Boilerplate CLI
Use JSON šŸŸ„ Boilerplate uses YAML
Use YAML šŸ’š Same as Boilerplate, i.e. give users same UX for Boilerplate and ok. Not included in Go standard library.
Use go-yaml/yaml šŸ’š Decent library. Not updated in 2 years. Easy to replace if needed.
Use same variable names as Boilerplate and Git (ref) šŸ’š No better suggestions
Use pascal case in config šŸ’š Boilerplate uses pascal case because it's a Go convention. However, snake case is arguably easier to read. Search the web for the science. However, we choose to use same convention for both Boilerplate and ok (i.e. pascal case). Consider changing both to snake case.
Add this feature to Boilerplate itself šŸŸ„ Too many unknowns

Config format

Snake case:

template_url: app
ref: v1.0.0
output_folder: app-km
var_files:
  - file1.yml
  - file2.yml

Camel case:

templateUrl: app
ref: v1.0.0
outputFolder: app-km
varFiles:
  - file1.yml
  - file2.yml

Pascal case:

TemplateUrl: app
Ref: v1.0.0
OutputFolder: app-km
VarFiles:
  - file1.yml
  - file2.yml
staticaland commented 1 week ago

See https://atmos.tools/core-concepts/vendor/vendor-manifest

See https://atmos.tools/core-concepts/vendor/component-manifest

staticaland commented 6 days ago

See https://terragrunt.gruntwork.io/docs/features/scaffold/