diff --git a/.circleci/config.yml b/.circleci/config.yml index 2d5257e8..8e51c54b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,13 +59,13 @@ jobs: - checkout - restore_cache: keys: - - server3-{{ checksum "server/Pipfile.lock" }}-{{ checksum "server/Dockerfile" }} + - server3-{{ checksum "Pipfile.lock" }}-{{ checksum "comrade/Dockerfile" }} - run: name: Load Docker image layer cache command: test -f caches/server.tar && (docker load -i caches/server.tar) || echo 'Cache not found' - run: name: Build application Docker image - command: docker build --tag server:latest -f server/Dockerfile . + command: docker build --tag server:latest -f comrade/Dockerfile . - run: name: flake8 command: docker run -it server pipenv run flake8 --max-line-length=1000 @@ -84,7 +84,7 @@ jobs: - checkout - restore_cache: keys: - - server3-{{ checksum "server/Pipfile.lock" }}-{{ checksum "server/Dockerfile" }} + - server3-{{ checksum "Pipfile.lock" }}-{{ checksum "comrade/Dockerfile" }} - run: name: Load Docker image layer cache command: test -f caches/server.tar && (docker load -i caches/server.tar) || echo 'Cache not found' @@ -92,10 +92,10 @@ jobs: name: Save Docker image layer cache command: | mkdir -p caches/ - docker build --tag server -f server/Dockerfile . + docker build --tag server -f comrade/Dockerfile . docker save $(docker history -q server | grep -v '^$') -o caches/server.tar - save_cache: - key: server3-{{ checksum "server/Pipfile.lock" }}-{{ checksum "server/Dockerfile" }} + key: server3-{{ checksum "Pipfile.lock" }}-{{ checksum "comrade/Dockerfile" }} paths: - caches/ pytest: diff --git a/server/Pipfile b/Pipfile similarity index 100% rename from server/Pipfile rename to Pipfile diff --git a/server/Pipfile.lock b/Pipfile.lock similarity index 100% rename from server/Pipfile.lock rename to Pipfile.lock diff --git a/server/.gitignore b/comrade/.gitignore similarity index 100% rename from server/.gitignore rename to comrade/.gitignore diff --git a/server/Dockerfile b/comrade/Dockerfile similarity index 90% rename from server/Dockerfile rename to comrade/Dockerfile index c4938d61..220e3818 100644 --- a/server/Dockerfile +++ b/comrade/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.7.7-slim@sha256:56de27efa2d88b47bede6d075a60a70aed76c43a8ee0bbbaa39c8f445a4459fe WORKDIR /app -COPY setup.py MANIFEST.in server/Pipfile* ./ +COPY setup.py MANIFEST.in Pipfile* ./ RUN apt-get update && \ apt-get install -y --no-install-recommends gcc python-dev g++ make libffi-dev libssl-dev &&\ mkdir /app/comrade && \ @@ -11,6 +11,6 @@ RUN apt-get update && \ find /root/.local/ -type d -name __pycache__ | xargs rm -rf && \ rm -rf ~/.cache /var/cache && \ rm -rf /var/lib/apt/lists/* -COPY server/ /app/comrade/ +COPY comrade/ /app/comrade/ EXPOSE 8000 CMD pipenv run comrade diff --git a/server/blueprints/__init__.py b/comrade/blueprints/__init__.py similarity index 100% rename from server/blueprints/__init__.py rename to comrade/blueprints/__init__.py diff --git a/server/blueprints/alias.py b/comrade/blueprints/alias.py similarity index 100% rename from server/blueprints/alias.py rename to comrade/blueprints/alias.py diff --git a/server/blueprints/cluster.py b/comrade/blueprints/cluster.py similarity index 100% rename from server/blueprints/cluster.py rename to comrade/blueprints/cluster.py diff --git a/server/blueprints/index.py b/comrade/blueprints/index.py similarity index 100% rename from server/blueprints/index.py rename to comrade/blueprints/index.py diff --git a/server/blueprints/node.py b/comrade/blueprints/node.py similarity index 100% rename from server/blueprints/node.py rename to comrade/blueprints/node.py diff --git a/server/blueprints/rest.py b/comrade/blueprints/rest.py similarity index 100% rename from server/blueprints/rest.py rename to comrade/blueprints/rest.py diff --git a/server/blueprints/snapshot.py b/comrade/blueprints/snapshot.py similarity index 100% rename from server/blueprints/snapshot.py rename to comrade/blueprints/snapshot.py diff --git a/server/blueprints/task.py b/comrade/blueprints/task.py similarity index 100% rename from server/blueprints/task.py rename to comrade/blueprints/task.py diff --git a/server/blueprints/template.py b/comrade/blueprints/template.py similarity index 100% rename from server/blueprints/template.py rename to comrade/blueprints/template.py diff --git a/server/blueprints/views.py b/comrade/blueprints/views.py similarity index 100% rename from server/blueprints/views.py rename to comrade/blueprints/views.py diff --git a/server/clusters/.gitignore b/comrade/clusters/.gitignore similarity index 100% rename from server/clusters/.gitignore rename to comrade/clusters/.gitignore diff --git a/server/connections.py b/comrade/connections.py similarity index 100% rename from server/connections.py rename to comrade/connections.py diff --git a/server/elasticsearch/index_settings/00_dynamic_index_settings.json b/comrade/elasticsearch/index_settings/00_dynamic_index_settings.json similarity index 100% rename from server/elasticsearch/index_settings/00_dynamic_index_settings.json rename to comrade/elasticsearch/index_settings/00_dynamic_index_settings.json diff --git a/server/elasticsearch/index_settings/10_translog_settings.json b/comrade/elasticsearch/index_settings/10_translog_settings.json similarity index 100% rename from server/elasticsearch/index_settings/10_translog_settings.json rename to comrade/elasticsearch/index_settings/10_translog_settings.json diff --git a/server/elasticsearch/index_settings/20_index_slowlogs.json b/comrade/elasticsearch/index_settings/20_index_slowlogs.json similarity index 100% rename from server/elasticsearch/index_settings/20_index_slowlogs.json rename to comrade/elasticsearch/index_settings/20_index_slowlogs.json diff --git a/server/elasticsearch/index_settings/21_search_slowlogs.json b/comrade/elasticsearch/index_settings/21_search_slowlogs.json similarity index 100% rename from server/elasticsearch/index_settings/21_search_slowlogs.json rename to comrade/elasticsearch/index_settings/21_search_slowlogs.json diff --git a/server/elasticsearch/index_settings/40_merge_scheduling.json b/comrade/elasticsearch/index_settings/40_merge_scheduling.json similarity index 100% rename from server/elasticsearch/index_settings/40_merge_scheduling.json rename to comrade/elasticsearch/index_settings/40_merge_scheduling.json diff --git a/server/elasticsearch/index_settings/41_index_sorting.json b/comrade/elasticsearch/index_settings/41_index_sorting.json similarity index 100% rename from server/elasticsearch/index_settings/41_index_sorting.json rename to comrade/elasticsearch/index_settings/41_index_sorting.json diff --git a/server/elasticsearch_assets.py b/comrade/elasticsearch_assets.py similarity index 100% rename from server/elasticsearch_assets.py rename to comrade/elasticsearch_assets.py diff --git a/server/index.py b/comrade/index.py similarity index 100% rename from server/index.py rename to comrade/index.py diff --git a/server/scripts/create_data.py b/comrade/scripts/create_data.py similarity index 100% rename from server/scripts/create_data.py rename to comrade/scripts/create_data.py diff --git a/server/scripts/extract_index_settings.py b/comrade/scripts/extract_index_settings.py similarity index 100% rename from server/scripts/extract_index_settings.py rename to comrade/scripts/extract_index_settings.py diff --git a/server/scripts/find_servers.py b/comrade/scripts/find_servers.py similarity index 100% rename from server/scripts/find_servers.py rename to comrade/scripts/find_servers.py diff --git a/server/tests/cluster1.json b/comrade/tests/cluster1.json similarity index 100% rename from server/tests/cluster1.json rename to comrade/tests/cluster1.json diff --git a/server/tests/test_mock.py b/comrade/tests/test_mock.py similarity index 100% rename from server/tests/test_mock.py rename to comrade/tests/test_mock.py