From 27150a532261bfc1baf9661cf0a2614371b1a093 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Sat, 9 Mar 2024 05:43:51 -0700 Subject: [PATCH] Renaming all .yml files to .yaml rh-pre-commit.version: 2.0.3 rh-pre-commit.check-secrets: ENABLED --- .gitignore | 2 +- README.md | 18 +++++++++--------- bin/regenerate_classes.sh | 8 ++++---- local/{defaults.yml => defaults.yaml} | 2 +- local/{template.yml => template.yaml} | 0 openshift/{defaults.yml => defaults.yaml} | 0 roles/smartvillage_new_release/tasks/main.yml | 2 +- ...elease.yml => smartvillage_new_release.yaml | 0 .../enus/model/page/reader/SitePageReader.java | 2 +- .../{application.yml => application.yaml} | 0 src/main/resources/article.yml | 0 src/main/resources/indexed.yml | 0 src/main/resources/models.yml | 0 .../{openapi3-enUS.yml => openapi3-enUS.yaml} | 0 .../simulation/TrafficSimulationTest.java | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) rename local/{defaults.yml => defaults.yaml} (98%) rename local/{template.yml => template.yaml} (100%) rename openshift/{defaults.yml => defaults.yaml} (100%) rename smartvillage_new_release.yml => smartvillage_new_release.yaml (100%) rename src/main/resources/{application.yml => application.yaml} (100%) delete mode 100644 src/main/resources/article.yml delete mode 100644 src/main/resources/indexed.yml delete mode 100644 src/main/resources/models.yml rename src/main/resources/webroot/{openapi3-enUS.yml => openapi3-enUS.yaml} (100%) diff --git a/.gitignore b/.gitignore index c38ac4fe..f605dc0c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ release.properties dependency-reduced-pom.xml buildNumber.properties .mvn/timing.properties -config/*.yml +config/*.yaml config/*.password *.crt *.key diff --git a/README.md b/README.md index f01878a6..876ddec7 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ git clone git@github.com:computate-org/computate_project.git ~/.ansible/roles/co ## Run the Ansible Galaxy roles to install the complete project locally. ```bash -ansible-playbook ~/.ansible/roles/computate.computate_project/install.yml -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true +ansible-playbook ~/.ansible/roles/computate.computate_project/install.yaml -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true ``` ## Running the project build and test suite @@ -140,7 +140,7 @@ ansible-vault edit ~/.local/src/smartvillage-platform-ansible/vault/$USER-local You can then run the project install automation again with the secrets in the vault, it will ask for the password. ```bash -ansible-playbook ~/.ansible/roles/computate.computate_project/install.yml -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-local --vault-id @prompt +ansible-playbook ~/.ansible/roles/computate.computate_project/install.yaml -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-local --vault-id @prompt ``` # Configure Eclipse IDE @@ -212,7 +212,7 @@ Add these update sites and install these useful plugins: Setup the following variables to setup the Vert.x verticle. -* CONFIG_PATH: ~/.local/src/smartvillage-platform/config/smartvillage-platform.yml +* CONFIG_PATH: ~/.local/src/smartvillage-platform/config/smartvillage-platform.yaml * RUN_OPENAPI3_GENERATOR: true * RUN_SQL_GENERATOR: true * RUN_FIWARE_GENERATOR: true @@ -239,7 +239,7 @@ Setup the following VM arguments to disable caching for easier web development: Setup the following variables to setup the Vert.x verticle. -* CONFIG_PATH: ~/.local/src/smartvillage-platform/config/smartvillage-platform.yml +* CONFIG_PATH: ~/.local/src/smartvillage-platform/config/smartvillage-platform.yaml * VERTXWEB_ENVIRONMENT: dev Click [ Apply ] and [ Debug ] to debug the application. @@ -315,13 +315,13 @@ AUTH_TOKEN_URI: "/auth/realms/SMARTVILLAGE/protocol/openid-connect/token" ```bash -ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_postgres_openshift/install.yml -e SITE_NAME=smartvillage-platform +ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_postgres_openshift/install.yaml -e SITE_NAME=smartvillage-platform -ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_zookeeper_openshift/install.yml -e SITE_NAME=smartvillage-platform +ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_zookeeper_openshift/install.yaml -e SITE_NAME=smartvillage-platform -ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_solr_openshift/install.yml -e SITE_NAME=smartvillage-platform +ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_solr_openshift/install.yaml -e SITE_NAME=smartvillage-platform -ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_project_openshift/install.yml -e SITE_NAME=smartvillage-platform +ansible-playbook --vault-id @prompt -e @~/.local/src/smartvillage-platform-ansible/vault/$USER-staging/vault ~/.ansible/roles/computate.computate_project_openshift/install.yaml -e SITE_NAME=smartvillage-platform ``` ## How to run the application as a Podman container @@ -349,7 +349,7 @@ podman push computateorg/smartvillage-platform:latest quay.io/computateorg/smart ## How the base classes for this project were created ```bash -ansible-playbook -e @~/.local/src/smartvillage-platform/local/ansible_install_vars.yml ~/.local/src/computate-org/vertx_project.yml +ansible-playbook -e @~/.local/src/smartvillage-platform/local/ansible_install_vars.yaml ~/.local/src/computate-org/vertx_project.yaml ``` # Load a new map traffic data into SUMO diff --git a/bin/regenerate_classes.sh b/bin/regenerate_classes.sh index 5df4e202..b25923e8 100755 --- a/bin/regenerate_classes.sh +++ b/bin/regenerate_classes.sh @@ -3,9 +3,9 @@ systemctl --user stop watch-smartvillage-platform toilet -t -f smblock Run Base Automation echo Install all of the base application code that is generic to most projects -echo ansible-playbook ~/.local/src/computate-org/vertx_project.yml -e @~/.local/src/smartvillage-platform/local/ansible_install_vars.yml +echo ansible-playbook ~/.local/src/computate-org/vertx_project.yaml -e @~/.local/src/smartvillage-platform/local/ansible_install_vars.yaml read -p "" < /dev/tty -ansible-playbook ~/.local/src/computate-org/vertx_project.yml -e @~/.local/src/smartvillage-platform/local/ansible_install_vars.yml +ansible-playbook ~/.local/src/computate-org/vertx_project.yaml -e @~/.local/src/smartvillage-platform/local/ansible_install_vars.yaml curl -s 'http://localhost:8983/solr/computate/select?fq=classSort_indexed_int%3A%5B*%20TO%20*%5D&fq=siteNom_indexed_string%3Asmartvillage-platform&fq=partEstClasse_indexed_boolean%3Atrue&q=*%3A*&sort=classSort_indexed_int%20asc&rows=100' \ | jq -c '.response.docs[]' \ @@ -86,9 +86,9 @@ done toilet -t -f smblock Run Install Automation echo Install the whole application with one simple ansible script, including database setup, search engine setup and configuration. -echo '(cd ~/.local/src/smartvillage-platform && ansible-playbook ~/.ansible/roles/computate.computate_project/install.yml -e @~/.local/src/smartvillage-platform/vault/$USER-vault --vault-password-file ~/.local/src/smartvillage-platform/vault/key -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true)' +echo '(cd ~/.local/src/smartvillage-platform && ansible-playbook ~/.ansible/roles/computate.computate_project/install.yaml -e @~/.local/src/smartvillage-platform/vault/$USER-vault --vault-password-file ~/.local/src/smartvillage-platform/vault/key -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true)' read -p "" < /dev/tty -(cd ~/.local/src/smartvillage-platform && ansible-playbook ~/.ansible/roles/computate.computate_project/install.yml -e @~/.local/src/smartvillage-platform/vault/$USER-vault --vault-password-file ~/.local/src/smartvillage-platform/vault/key -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true) +(cd ~/.local/src/smartvillage-platform && ansible-playbook ~/.ansible/roles/computate.computate_project/install.yaml -e @~/.local/src/smartvillage-platform/vault/$USER-vault --vault-password-file ~/.local/src/smartvillage-platform/vault/key -e SITE_NAME=smartvillage-platform -e ENABLE_CODE_GENERATION_SERVICE=true) toilet -t -f smblock Watch Service echo Watch the watch-smartvillage-platform service logs as it generates the API and UI code diff --git a/local/defaults.yml b/local/defaults.yaml similarity index 98% rename from local/defaults.yml rename to local/defaults.yaml index f6e51dc7..b7ba54da 100644 --- a/local/defaults.yml +++ b/local/defaults.yaml @@ -17,7 +17,7 @@ CLASS_SIMPLE_NAME_MainVerticle: "MainVerticle" RUN_OPENAPI3_GENERATOR: true RUN_SQL_GENERATOR: true RUN_ARTICLE_GENERATOR: false -I18N_PATHS: ["{{ SITE_PREFIX }}/computate/src/main/resources/org/computate/i18n/i18n_enUS.yml"] +I18N_PATHS: ["{{ SITE_PREFIX }}/computate/src/main/resources/org/computate/i18n/i18n_enUS.yaml"] DYNAMIC_PAGE_PATHS: ["{{ SITE_PREFIX }}/smartvillage-platform/page"] LANGUAGE_NAME: "enUS" diff --git a/local/template.yml b/local/template.yaml similarity index 100% rename from local/template.yml rename to local/template.yaml diff --git a/openshift/defaults.yml b/openshift/defaults.yaml similarity index 100% rename from openshift/defaults.yml rename to openshift/defaults.yaml diff --git a/roles/smartvillage_new_release/tasks/main.yml b/roles/smartvillage_new_release/tasks/main.yml index fc63c12b..7a5c1f20 100644 --- a/roles/smartvillage_new_release/tasks/main.yml +++ b/roles/smartvillage_new_release/tasks/main.yml @@ -43,7 +43,7 @@ NEXT_VERSION not specified. Current smartvillage version is {{ PREV_VERSION }}. Run the playbook again with the NEXT VERSION set: - ansible-playbook smartvillage_new_release.yml -e NEXT_VERSION={{ PREV_VERSION_PREFIX }}{{ (PREV_VERSION_SUFFIX | int) + 1 }} + ansible-playbook smartvillage_new_release.yaml -e NEXT_VERSION={{ PREV_VERSION_PREFIX }}{{ (PREV_VERSION_SUFFIX | int) + 1 }} when: NEXT_VERSION is not defined - name: | diff --git a/smartvillage_new_release.yml b/smartvillage_new_release.yaml similarity index 100% rename from smartvillage_new_release.yml rename to smartvillage_new_release.yaml diff --git a/src/main/java/org/computate/smartvillage/enus/model/page/reader/SitePageReader.java b/src/main/java/org/computate/smartvillage/enus/model/page/reader/SitePageReader.java index ad538f08..bd3df08a 100644 --- a/src/main/java/org/computate/smartvillage/enus/model/page/reader/SitePageReader.java +++ b/src/main/java/org/computate/smartvillage/enus/model/page/reader/SitePageReader.java @@ -212,7 +212,7 @@ public Future importDataSitePages() { dynamicPagePaths.forEach(dynamicPagePath -> { try { try(Stream stream = Files.walk(Paths.get(dynamicPagePath))) { - stream.filter(Files::isRegularFile).filter(p -> p.getFileName().toString().endsWith(".yml")).forEach(path -> { + stream.filter(Files::isRegularFile).filter(p -> p.getFileName().toString().endsWith(".yaml")).forEach(path -> { pagePaths.add(path.toAbsolutePath().toString()); }); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yaml similarity index 100% rename from src/main/resources/application.yml rename to src/main/resources/application.yaml diff --git a/src/main/resources/article.yml b/src/main/resources/article.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/resources/indexed.yml b/src/main/resources/indexed.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/resources/models.yml b/src/main/resources/models.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/resources/webroot/openapi3-enUS.yml b/src/main/resources/webroot/openapi3-enUS.yaml similarity index 100% rename from src/main/resources/webroot/openapi3-enUS.yml rename to src/main/resources/webroot/openapi3-enUS.yaml diff --git a/src/test/resources/org/computate/smartvillage/enus/model/traffic/simulation/TrafficSimulationTest.java b/src/test/resources/org/computate/smartvillage/enus/model/traffic/simulation/TrafficSimulationTest.java index 1a83cfd6..9b9f25a0 100644 --- a/src/test/resources/org/computate/smartvillage/enus/model/traffic/simulation/TrafficSimulationTest.java +++ b/src/test/resources/org/computate/smartvillage/enus/model/traffic/simulation/TrafficSimulationTest.java @@ -151,7 +151,7 @@ public static Future configureConfig() { try { ConfigRetrieverOptions retrieverOptions = new ConfigRetrieverOptions(); - retrieverOptions.addStore(new ConfigStoreOptions().setType("file").setFormat("yaml").setConfig(new JsonObject().put("path", "application.yml"))); + retrieverOptions.addStore(new ConfigStoreOptions().setType("file").setFormat("yaml").setConfig(new JsonObject().put("path", "application.yaml"))); ConfigRetriever configRetriever = ConfigRetriever.create(vertx, retrieverOptions); configRetriever.getConfig().onSuccess(config -> {