Remove configuration templates in favour of examples
- Dominant language
- Java
- Stars
- 107
- Forks
- 29
- Avg merge
- 19h 46m
- Merged PRs (30d)
- 141
Description
### User Story
As a user configuring Sleeper, I want the configuration format to be easy to work with and unintimidating, so that I can get started easily, and change the configuration I need to easily when it comes up.
### Description / Background
At time of writing we have one set of configuration template files, and a separate set of configuration example files.
We'd like to remove the configuration template files so that the user only needs to look at the example files. We'd like the user to be able to pick one of the examples and copy it to create their own instance configuration.
The system should assume a blank instance configuration unless you point it to a configuration. You need instance ID, VPC, subnets, but those will be set for you in the scripts or CDK. This could be clearer if we adjust the deploy new script to take arguments specified like --id, --vpc, --subnets, --config-dir, --instance-properties.
### Technical Notes / Implementation Details
This includes the following pieces:
- Improve the usability of the scripts that take configuration files, to take more specific command line arguments
- Stop using the templates in the scripts, and remove them
We have a number of issues to improve the command line arguments of code that takes configuration files:
- https://github.com/gchq/sleeper/issues/7276
- https://github.com/gchq/sleeper/issues/6593
- https://github.com/gchq/sleeper/issues/7274
- https://github.com/gchq/sleeper/issues/7275
The CDK one seems to come first because we'll want to pass each of the arguments directly through from the scripts into the CDK.
We also have issues to remove the use of the templates in these scripts, although it's not clear how separable these are from the command line arguments issues:
- https://github.com/gchq/sleeper/issues/7273
- https://github.com/gchq/sleeper/issues/6284
- https://github.com/gchq/sleeper/issues/2384
- https://github.com/gchq/sleeper/issues/7304
#### Template files
The template files under `scripts/template` already only set values for the mandatory properties. When we read the default template files, the resulting InstanceProperties/TableProperties objects are almost identical to if we just used new InstanceProperties(), new TableProperties(instanceProperties) and set the mandatory values from script parameters. The difference is the tags and the table schema.
The current purpose of the template files is:
- Someone can adjust them to set specific values, without actually creating their own configuration files.
- Someone can deploy an instance of Sleeper without creating any configuration files, or even copying an example.
An instance deployed with the default templates will have tags with values of "changeme" and "myproject", and a table with a schema that the user never asked for. It might be worth removing this as an option, if the basic example is usable enough.
Contributor guide
Research direction
Start by inspecting the files under scripts/template and the deploy new script, then review the linked issues covering CDK arguments and template removal. Trace which scripts still read the templates and how configuration arguments flow into CDK. Done means the template files and their uses are removed, examples remain usable, and the related command-line configuration work is covered.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, cloud, devops
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100