Skip to content

Commit

Permalink
Move cluster schema inside the deployer directory
Browse files Browse the repository at this point in the history
MANIFEST.in will also make sure to include our tests when
we need them.
  • Loading branch information
yuvipanda committed Nov 8, 2022
1 parent b646968 commit 16998ac
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Include everything we put in the deployer/ dir
recursive-include deployer *
# But exclude .pyc files, as these are just compiled caches
recursive-exclude deployer *.pyc
File renamed without changes.
4 changes: 2 additions & 2 deletions deployer/config_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def validate_cluster_config(cluster_name):
"""
Validates cluster.yaml configuration against a JSONSchema.
"""
root_dir = Path(__file__).parent.parent
cluster_schema_file = root_dir.joinpath("shared", "deployer", "cluster.schema.yaml")
cur_dir = Path(__file__).parent
cluster_schema_file = cur_dir.joinpath("cluster.schema.yaml")
cluster_file = find_absolute_path_to_cluster_file(cluster_name)

with open(cluster_file) as cf, open(cluster_schema_file) as sf:
Expand Down
2 changes: 1 addition & 1 deletion docs/topic/infrastructure/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ for each hub.
| Upstream defaults from z2jh | z2jh maintainers | [`helm-charts/basehub/Chart.yaml`](https://github.com/2i2c-org/infrastructure/tree/HEAD/helm-charts/basehub/Chart.yaml) lists the z2jh version. Most of our configuration is directly from upstream |
| [`helm-charts/basehub/values.yaml`](https://github.com/2i2c-org/infrastructure/tree/HEAD/helm-charts/basehub/values.yaml) | 2i2c engineers | Common to all hubs run from this repo |
| [Deployment script](https://github.com/2i2c-org/infrastructure/tree/HEAD/deployer) | 2i2c engineers | Programmatic overrides for each type of hub, particularly around Auth0 integration and home page customization |
| [`config/clusters` (previously `hubs.yaml`)](https://github.com/2i2c-org/infrastructure/tree/HEAD/config/clusters) | 2i2c engineers | There is one folder per cluster, and each cluster can have multiple hubs deployed defined by a `<hub_name>.values.yaml` file in the same folder. There is also cluster-wide config stored in a `cluster.yaml` in each cluster directory. [`config/clusters/schema.yaml`](https://github.com/2i2c-org/infrastructure/blob/HEAD/shared/deployer/cluster.schema.yaml) contains documentation and validation information for fields in this set of configuration. |
| [`config/clusters` (previously `hubs.yaml`)](https://github.com/2i2c-org/infrastructure/tree/HEAD/config/clusters) | 2i2c engineers | There is one folder per cluster, and each cluster can have multiple hubs deployed defined by a `<hub_name>.values.yaml` file in the same folder. There is also cluster-wide config stored in a `cluster.yaml` in each cluster directory. [`config/clusters/schema.yaml`](https://github.com/2i2c-org/infrastructure/blob/HEAD/deployer/cluster.schema.yaml) contains documentation and validation information for fields in this set of configuration. |
| [Configurator schema defaults](https://github.com/2i2c-org/infrastructure/tree/HEAD/helm-charts/basehub/values.yaml#L143) | 2i2c engineers | **If** there is a default set in the schema for available options in the configurator, it will always override the config elsewhere in our YAML files |
| Configurator | Hub admins | If hub admins 'unset' a value, it should go to what's configured via our yaml files|

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
long_description_content_type="text/markdown",
license="3-BSD",
packages=find_packages(),
include_package_data=True,
entry_points={
"console_scripts": [
"deployer = deployer.__main__:main",
Expand Down

0 comments on commit 16998ac

Please sign in to comment.