Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
chore: remove unused elasticsearch images (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Graber authored Aug 30, 2023
1 parent d03a0bf commit dbe1ec0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 46 deletions.
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
38 changes: 0 additions & 38 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -878,8 +842,6 @@ volumes:
devpi_data:
edxapp_lms_assets:
edxapp_cms_assets:
elasticsearch_data:
elasticsearch7_data:
elasticsearch710_data:
mongo_data:
opensearch12_data:
Expand Down
2 changes: 1 addition & 1 deletion options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dbe1ec0

Please sign in to comment.