From 9d0b353c23c753ccf29417e1b74acc3ca1c1a38b Mon Sep 17 00:00:00 2001 From: JonJagger Date: Wed, 8 Nov 2023 20:13:20 +0000 Subject: [PATCH] Rename shas service to version-reporter --- app/docker-compose/.env | 2 +- app/docker-compose/container-name.yml | 4 ++-- app/docker-compose/depends-on.yml | 2 +- app/docker-compose/env-files.yml | 2 +- app/docker-compose/images.yml | 4 ++-- app/docker-compose/read_only.yml | 2 +- app/docker-compose/restart.yml | 2 +- app/docker-compose/swarm.yml | 2 +- app/docker-compose/tmp-fs.yml | 2 +- app/docker-compose/user.yml | 2 +- app/server/service_names.rb | 2 +- test/sh/cyber_dojo_helpers.sh | 2 +- test/sh/test_060_up.sh | 3 ++- test/sh/test_065_update.sh | 2 +- 14 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/docker-compose/.env b/app/docker-compose/.env index 61bc953..39118f1 100644 --- a/app/docker-compose/.env +++ b/app/docker-compose/.env @@ -8,5 +8,5 @@ CYBER_DOJO_NGINX_PORT=80 CYBER_DOJO_REPLER_PORT=4657 CYBER_DOJO_RUNNER_PORT=4597 CYBER_DOJO_SAVER_PORT=4537 -CYBER_DOJO_SHAS_PORT=4522 +CYBER_DOJO_VERSION_REPORTER_PORT=4528 CYBER_DOJO_WEB_PORT=3000 diff --git a/app/docker-compose/container-name.yml b/app/docker-compose/container-name.yml index 112b085..b36664f 100644 --- a/app/docker-compose/container-name.yml +++ b/app/docker-compose/container-name.yml @@ -31,5 +31,5 @@ services: saver: container_name: cyber_dojo_saver - shas: - container_name: cyber_dojo_shas + version-reporter: + container_name: cyber_dojo_version_reporter diff --git a/app/docker-compose/depends-on.yml b/app/docker-compose/depends-on.yml index ea9eca8..3e55642 100644 --- a/app/docker-compose/depends-on.yml +++ b/app/docker-compose/depends-on.yml @@ -16,7 +16,7 @@ services: - differ - runner - saver - - shas + - version-reporter dashboard: depends_on: diff --git a/app/docker-compose/env-files.yml b/app/docker-compose/env-files.yml index 1811d88..068c7e4 100644 --- a/app/docker-compose/env-files.yml +++ b/app/docker-compose/env-files.yml @@ -39,5 +39,5 @@ services: env_file: [ .env ] saver: env_file: [ .env ] - shas: + version-reporter: env_file: [ .env ] diff --git a/app/docker-compose/images.yml b/app/docker-compose/images.yml index cf2a1b3..1f59409 100644 --- a/app/docker-compose/images.yml +++ b/app/docker-compose/images.yml @@ -31,5 +31,5 @@ services: image: ${CYBER_DOJO_RUNNER_IMAGE}:${CYBER_DOJO_RUNNER_TAG} saver: image: ${CYBER_DOJO_SAVER_IMAGE}:${CYBER_DOJO_SAVER_TAG} - shas: - image: ${CYBER_DOJO_SHAS_IMAGE}:${CYBER_DOJO_SHAS_TAG} + version-reporter: + image: ${CYBER_DOJO_VERSION_REPORTER_IMAGE}:${CYBER_DOJO_VERSION_REPORTER_TAG} diff --git a/app/docker-compose/read_only.yml b/app/docker-compose/read_only.yml index 0df90de..0336f00 100644 --- a/app/docker-compose/read_only.yml +++ b/app/docker-compose/read_only.yml @@ -27,5 +27,5 @@ services: saver: read_only: true - shas: + version-reporter: read_only: true diff --git a/app/docker-compose/restart.yml b/app/docker-compose/restart.yml index 8609f56..644b657 100644 --- a/app/docker-compose/restart.yml +++ b/app/docker-compose/restart.yml @@ -31,5 +31,5 @@ services: saver: restart: on-failure - shas: + version-reporter: restart: on-failure diff --git a/app/docker-compose/swarm.yml b/app/docker-compose/swarm.yml index 2d3d72c..c5c0527 100644 --- a/app/docker-compose/swarm.yml +++ b/app/docker-compose/swarm.yml @@ -105,7 +105,7 @@ services: memory: 32M cpus: '0.5' - shas: + version-reporter: deploy: mode: global restart_policy: diff --git a/app/docker-compose/tmp-fs.yml b/app/docker-compose/tmp-fs.yml index 236b8da..cacf25e 100644 --- a/app/docker-compose/tmp-fs.yml +++ b/app/docker-compose/tmp-fs.yml @@ -67,7 +67,7 @@ services: mode: 01777 size: 10485760 # 10MB - shas: + version-reporter: volumes: - type: tmpfs target: /tmp diff --git a/app/docker-compose/user.yml b/app/docker-compose/user.yml index 593a636..2aa5489 100644 --- a/app/docker-compose/user.yml +++ b/app/docker-compose/user.yml @@ -33,5 +33,5 @@ services: saver: user: saver - shas: + version-reporter: user: nobody diff --git a/app/server/service_names.rb b/app/server/service_names.rb index 79ee8b6..f8cb8c4 100644 --- a/app/server/service_names.rb +++ b/app/server/service_names.rb @@ -8,7 +8,7 @@ def service_names nginx runner saver - shas + version-reporter web ) end diff --git a/test/sh/cyber_dojo_helpers.sh b/test/sh/cyber_dojo_helpers.sh index 2701982..f8fd4b9 100755 --- a/test/sh/cyber_dojo_helpers.sh +++ b/test/sh/cyber_dojo_helpers.sh @@ -19,7 +19,7 @@ declare -a service_names=( nginx runner saver - shas + version-reporter web ) diff --git a/test/sh/test_060_up.sh b/test/sh/test_060_up.sh index c1c7d8c..a1d8921 100755 --- a/test/sh/test_060_up.sh +++ b/test/sh/test_060_up.sh @@ -44,7 +44,8 @@ test_____up_prints_start_points_and_port_and_creates_containers() assertStdoutIncludes "Container cyber_dojo_languages_start_points Created" for service in "${service_names[@]}" do - assertStdoutIncludes "Container cyber_dojo_${service} Created" + service_underscore="$(echo $service | tr '-' '_')" + assertStdoutIncludes "Container cyber_dojo_${service_underscore} Created" done assertNoStderr diff --git a/test/sh/test_065_update.sh b/test/sh/test_065_update.sh index 0d4491b..1ba36b3 100755 --- a/test/sh/test_065_update.sh +++ b/test/sh/test_065_update.sh @@ -82,7 +82,7 @@ test_____help_arg_prints_use() # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test_____updating_to_specific_version_causes_next_up_to_use_service_tags_embedded_in_that_version() +test_____updating_to_specific_version_causes_next_up_to_use_image_tags_embedded_in_that_version() { # cyberdojo/versioner:6da7a36 pulls cyberdojo/commander:35f653d # but keep that pull out of stdout/stderr assertions