From dbe1ec0843c55960e615eab1fe8764328d9bbc7a Mon Sep 17 00:00:00 2001 From: Rebecca Graber Date: Wed, 30 Aug 2023 13:41:48 -0400 Subject: [PATCH] chore: remove unused elasticsearch images (#1163) --- Makefile | 10 +++------- docker-compose.yml | 38 -------------------------------------- options.mk | 2 +- 3 files changed, 4 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index 6ab4160511..194792cea1 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # make dev.attach.credentials # make dev.pull.registrar+cms # make dev.up.lms -# make dev.up.without-deps.lms+forum+discovery+mysql57+elasticsearch+memcached +# make dev.up.without-deps.lms+forum+discovery+mysql57+elasticsearch710+memcached # make dev.restart-container.mysql57+lms # There are also "prefix-form" targets, which are simply an alternate way to spell @@ -226,22 +226,18 @@ impl-dev.provision.%: dev.check-memory ## Provision specified services. dev.provision.%: ## Provision specified services. @scripts/send_metrics.py wrap "dev.provision.$*" -dev.backup: dev.up.mysql57+mysql80+mongo+elasticsearch+elasticsearch7+elasticsearch710+opensearch12+coursegraph ## Write all data volumes to the host. +dev.backup: dev.up.mysql57+mysql80+mongo+elasticsearch710+opensearch12+coursegraph ## Write all data volumes to the host. docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mysql57) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/mysql57.tar.gz /var/lib/mysql docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mysql80) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/mysql80.tar.gz /var/lib/mysql docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mongo) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/mongo.tar.gz /data/db - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/elasticsearch.tar.gz /usr/share/elasticsearch/data - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch7) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/elasticsearch7.tar.gz /usr/share/elasticsearch/data docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch710) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/elasticsearch710.tar.gz /usr/share/elasticsearch/data docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.opensearch12) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/opensearch12.tar.gz /usr/share/opensearch/data docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.coursegraph) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/coursegraph.tar.gz /data -dev.restore: dev.up.mysql57+mysql80+mongo+elasticsearch+elasticsearch7+elasticsearch710+opensearch12+coursegraph ## Restore all data volumes from the host. WILL OVERWRITE ALL EXISTING DATA! +dev.restore: dev.up.mysql57+mysql80+mongo+elasticsearch710+opensearch12+coursegraph ## Restore all data volumes from the host. WILL OVERWRITE ALL EXISTING DATA! docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mysql57) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/mysql57.tar.gz docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mysql80) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/mysql80.tar.gz docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mongo) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/mongo.tar.gz - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/elasticsearch.tar.gz - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch7) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/elasticsearch7.tar.gz docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch710) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/elasticsearch710.tar.gz docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.opensearch12) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/opensearch12.tar.gz docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.coursegraph) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/coursegraph.tar.gz diff --git a/docker-compose.yml b/docker-compose.yml index c84b2f909a..2b7f4d4cc0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,42 +63,6 @@ services: volumes: - devpi_data:/data - elasticsearch: - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.elasticsearch" - hostname: elasticsearch.devstack.edx - image: edxops/elasticsearch:devstack - networks: - default: - aliases: - - edx.devstack.elasticsearch - # TODO: What to do about these forwarded ports? They'll conflict with ports forwarded by the Vagrant VM. - # ports: - # - "9200:9200" - # - "9300:9300" - volumes: - - elasticsearch_data:/usr/share/elasticsearch/data - - elasticsearch_data:/usr/share/elasticsearch/logs - - # This is meant to be used to test ES upgrades so that we do not have to upgrade all of our services to ES5 at once. - elasticsearch7: - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.elasticsearch7" - hostname: elasticsearch7.devstack.edx - image: elasticsearch:7.8.1 - networks: - default: - aliases: - - edx.devstack.elasticsearch7 - ports: - - "9200:9200" - - "9300:9300" - volumes: - - elasticsearch7_data:/usr/share/elasticsearch/data - environment: - - discovery.type=single-node - - bootstrap.memory_lock=true - - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - - # This is meant to be used to test ES upgrades. elasticsearch710: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.elasticsearch710" hostname: elasticsearch710.devstack.edx @@ -878,8 +842,6 @@ volumes: devpi_data: edxapp_lms_assets: edxapp_cms_assets: - elasticsearch_data: - elasticsearch7_data: elasticsearch710_data: mongo_data: opensearch12_data: diff --git a/options.mk b/options.mk index 95deff2b7a..1537641b67 100644 --- a/options.mk +++ b/options.mk @@ -90,4 +90,4 @@ credentials+discovery+ecommerce+insights+lms+registrar+cms # All third-party services. # Separated by plus signs. Listed in alphabetical order for clarity. THIRD_PARTY_SERVICES ?= \ -chrome+coursegraph+devpi+elasticsearch+elasticsearch7+elasticsearch710+firefox+memcached+mongo+mysql57+opensearch12+redis+namenode+datanode+resourcemanager+nodemanager+sparkmaster+sparkworker+vertica +chrome+coursegraph+devpi+elasticsearch710+firefox+memcached+mongo+mysql57+opensearch12+redis+namenode+datanode+resourcemanager+nodemanager+sparkmaster+sparkworker+vertica