From dc9a8c26f9330883f862e3197c01572a27c2816f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= Date: Tue, 26 Jan 2016 18:25:52 +0100 Subject: [PATCH] Clean repository after removing celery Change-Id: I27bd1ef756f16cc94ed40f16a9b1c9a63f8e2bff --- Dockerfile | 20 -------------------- doc/source/faq.rst | 27 ++------------------------- doc/source/installation.rst | 14 +------------- requirements.txt | 3 --- run.sh | 8 -------- solar/config.py | 2 -- utils/docker_build.sh | 14 -------------- 7 files changed, 3 insertions(+), 85 deletions(-) delete mode 100644 Dockerfile delete mode 100755 run.sh delete mode 100755 utils/docker_build.sh diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a2221200..00000000 --- a/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM ubuntu:14.04 - -WORKDIR / - -ADD bootstrap/playbooks/celery.yaml /celery.yaml -ADD resources /resources -ADD templates /templates -ADD run.sh /run.sh - -RUN apt-get update && apt-get upgrade -y -RUN apt-get install -y python python-dev python-distribute python-pip openssh-client rsync libyaml-dev vim libffi-dev libssl-dev git sshpass -RUN pip install "ansible<2.0" -RUN pip install gevent - -RUN pip install git+https://github.com/Mirantis/solar.git -RUN pip install git+https://github.com/Mirantis/solar-agent.git - -RUN ansible-playbook -v -i "localhost," -c local /celery.yaml --tags install - -CMD ["/run.sh"] diff --git a/doc/source/faq.rst b/doc/source/faq.rst index 1b00e7a1..b84273fa 100644 --- a/doc/source/faq.rst +++ b/doc/source/faq.rst @@ -26,29 +26,16 @@ Just update resource:: solar resource update rsync1 '{"password": "vagrant", "key": null}' -.. _faq_running_celery_worker: - .. note:: You need to change it for all transport resources (ssh and rsync by default). -How can I run solar celery worker ? +How can I run solar worker ? ----------------------------------- -- If you use `vagrant` then you can just `service solar-celery start|restart` +- If you use `vagrant` then you can just `sudo start solar-worker` as `vagrant` user. -- If you have `gevent` installed then you can use utils/solar-celery script. -You may need to adjust log files etc. -- You can spawn celery by hand too: - -.. code-block:: bash - - celery multi start 2 -A solar.orchestration.runner -P prefork -c:1 1 -c:2 2 -Q:1 scheduler,system_log -Q:2 celery - -.. note:: - - We're currently working on removing celery completely. How can I configure solar ? --------------------------- @@ -62,16 +49,6 @@ values 4. You can also set upper-cased env variable which matches one of those in config -.. _faq_using_sqlbackend: - -Why do you use celery with SQL backend instead of X ? ------------------------------------------------------ - -For simplicity, but nothing stops you from changing these defaults:: - - celery_broker: sqla+sqlite:////tmp/celery.db - celery_backend: db+sqlite:////tmp/celery.db - .. _faq_what_database: What database can I use with solar ? diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 3279d8ac..3af14d00 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -117,8 +117,6 @@ Create solar configuration `solar_config` and paste following data: .. code-block:: yaml - celery_broker: sqla+sqlite:////tmp/celery.db - celery_backend: db+sqlite:////tmp/celery.db solar_db: sqlite:////tmp/solar.db and set path to this configuration: @@ -128,7 +126,6 @@ and set path to this configuration: export SOLAR_CONFIG_OVERRIDE= For more information about configuration see our FAQ questions: -:ref:`here ` and :ref:`here `. You also need to download Solar resources and @@ -148,13 +145,4 @@ Next step is to start Solar orchestration worker. .. code-block:: bash - pip install gevent - sudo mkdir -p /var/run/celery/ - sudo chown salmon -R /var/run/celery/ - solar-celery start - -.. note:: - - `gevent` is not required to use Solar. If you don't want to use it - see :ref:`How can I run solar celery worker `. - + solar-worker diff --git a/requirements.txt b/requirements.txt index 2f822a50..324663b2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,9 +28,6 @@ wrapt peewee # if you want to use lua computable inputs # lupa -# required for celery sql backends -sqlalchemy - # if you want to use complex version check in repositories semver diff --git a/run.sh b/run.sh deleted file mode 100755 index 2e64c853..00000000 --- a/run.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# required for ease of development -if [ -d /solar ]; then - cd /solar && python setup.py develop -fi - -celery worker -A solar.orchestration.runner -P gevent -c 1000 -Q system_log,celery,scheduler diff --git a/solar/config.py b/solar/config.py index 2fc8c615..9d8a06bb 100644 --- a/solar/config.py +++ b/solar/config.py @@ -24,8 +24,6 @@ CWD = os.getcwd() C = Bunch(solar_db="") -C.celery_broker = 'sqla+sqlite:////tmp/celery.db' -C.celery_backend = 'db+sqlite:////tmp/celery.db' C.riak_ensemble = False C.lock_bucket_type = None C.counter_bucket_type = None diff --git a/utils/docker_build.sh b/utils/docker_build.sh deleted file mode 100755 index 423516e6..00000000 --- a/utils/docker_build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -e - -# should be executed from directory with required Dockerfile -name_w_tags=$1 - -if [[ -z "$name_w_tags" ]]; then - name_w_tags='solarproject/solar-celery:latest' -fi - -echo "Building image with name $name_w_tags" -docker build -t "$name_w_tags" . -docker push "$name_w_tags" -