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

Remove per-template schemas and leave just a global schema in place #12

Open
Jobava opened this issue Jul 20, 2020 · 2 comments
Open

Remove per-template schemas and leave just a global schema in place #12

Jobava opened this issue Jul 20, 2020 · 2 comments
Labels
enhancement / feature New feature or request good first issue Good for newcomers

Comments

@Jobava
Copy link
Contributor

Jobava commented Jul 20, 2020

Having per-template schemas adds a bit more assurance to users of tower-as-code, however it also adds a bunch of complexity. For example, having to know about yamale.

I suggest we drop schemas for individual templates and keep around just a global schema for the template objects. This way users won't have to touch it, but will still have the option to extend if they really want to.

CC: @europ @fpob

@europ
Copy link
Owner

europ commented Jul 20, 2020

If I understand your proposal correctly, you want to have one schema for everything in the derived repository. Yes, it would reduce the setup complexity and other problems too, but you will have to have for each different schema specific repository.

Currently, the implementation support for each glob-based-pattern custom schema, so you can store in one repository divergent assets with a specific schema. You need to change (customize) the CI configuration file only. For instance, you are able to store various types of assets with type specific schema in one repository:

  • assets/*_inventory.yml <=> schemas/inventory.yml
  • assets/*_project.yml <=> schemas/project.yml
  • assets/*_job_template.yml <=> schemas/job_template.yml
  • etc.

Your case is actually supported as well as the second case - storing all-in-one repository. I agree with the large complexity in this case. This could be discussed and we will do the best for this case.

\CC: @amarza-rh

@europ europ added enhancement / feature New feature or request good first issue Good for newcomers labels Jul 20, 2020
@Jobava
Copy link
Contributor Author

Jobava commented Jul 20, 2020

In that case, it would be useful to have schemas for the asset types (templates, inventories, credentials, projects, ...) and maybe some known asset relations (like roles assigned to an asset or templates which are part of a workflow template).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement / feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants