diff --git a/celery.yml b/celery.yml index 24d73dd4..fea21a99 100644 --- a/celery.yml +++ b/celery.yml @@ -1,13 +1,16 @@ - hosts: all + vars: + celery_dir: /var/run/celery tasks: + - shell: mkdir -p {{celery_dir}} - shell: pip install celery - shell: hostname register: hostname - shell: celery multi kill 2 - chdir=/vagrant/ - - shell: celery multi start 2 -A orch.tasks -Q:1 celery,scheduler -Q:2 celery,{{hostname.stdout}} - chdir=/vagrant/ + chdir={{celery_dir}} + - shell: celery multi start 2 -A solar.orchestration.tasks -Q:1 celery,scheduler -Q:2 celery,{{hostname.stdout}} + chdir={{celery_dir}} tags: [master] - - shell: celery multi start 1 -A orch.tasks -Q:1 celery,{{hostname.stdout}} - chdir=/vagrant/ + - shell: celery multi start 1 -A solar.orchestration.tasks -Q:1 celery,{{hostname.stdout}} + chdir={{celery_dir}} tags: [slave] \ No newline at end of file diff --git a/cli.py b/cli.py index 17d9dade..06d3b8f8 100755 --- a/cli.py +++ b/cli.py @@ -3,8 +3,8 @@ import click -from orch import graph -from orch import tasks +from solar.orchestration import graph +from solar.orchestration import tasks import networkx as nx import subprocess diff --git a/example.py b/example.py index d53682bb..f370fbb2 100644 --- a/example.py +++ b/example.py @@ -191,7 +191,7 @@ def deploy(): print 'ERROR: %s: %s' % (r.name, error) sys.exit(1) - + return # run actions.resource_action(mariadb_service1, 'run') actions.resource_action(rabbitmq_service1, 'run') diff --git a/orch/TODO b/solar/solar/orchestration/TODO similarity index 100% rename from orch/TODO rename to solar/solar/orchestration/TODO diff --git a/orch/__init__.py b/solar/solar/orchestration/__init__.py similarity index 100% rename from orch/__init__.py rename to solar/solar/orchestration/__init__.py diff --git a/orch/examples/example_py.yml b/solar/solar/orchestration/examples/example_py.yml similarity index 100% rename from orch/examples/example_py.yml rename to solar/solar/orchestration/examples/example_py.yml diff --git a/orch/examples/for_stop.yaml b/solar/solar/orchestration/examples/for_stop.yaml similarity index 100% rename from orch/examples/for_stop.yaml rename to solar/solar/orchestration/examples/for_stop.yaml diff --git a/orch/examples/multi.yaml b/solar/solar/orchestration/examples/multi.yaml similarity index 100% rename from orch/examples/multi.yaml rename to solar/solar/orchestration/examples/multi.yaml diff --git a/orch/examples/simple.yaml b/solar/solar/orchestration/examples/simple.yaml similarity index 100% rename from orch/examples/simple.yaml rename to solar/solar/orchestration/examples/simple.yaml diff --git a/orch/examples/test_errors.yml b/solar/solar/orchestration/examples/test_errors.yml similarity index 100% rename from orch/examples/test_errors.yml rename to solar/solar/orchestration/examples/test_errors.yml diff --git a/orch/examples/upd_test_errors.yml b/solar/solar/orchestration/examples/upd_test_errors.yml similarity index 100% rename from orch/examples/upd_test_errors.yml rename to solar/solar/orchestration/examples/upd_test_errors.yml diff --git a/orch/graph.py b/solar/solar/orchestration/graph.py similarity index 100% rename from orch/graph.py rename to solar/solar/orchestration/graph.py diff --git a/orch/tasks.py b/solar/solar/orchestration/tasks.py similarity index 99% rename from orch/tasks.py rename to solar/solar/orchestration/tasks.py index 8b34afe7..d86a6e9c 100644 --- a/orch/tasks.py +++ b/solar/solar/orchestration/tasks.py @@ -10,7 +10,7 @@ from itertools import islice import subprocess import time -from orch import graph +from solar.orchestration import graph import redis @@ -18,6 +18,7 @@ import redis from solar.core import actions from solar.core import resource + app = Celery( 'tasks', backend='redis://10.0.0.2:6379/1', diff --git a/orch/test_examples.py b/solar/solar/orchestration/test_examples.py similarity index 98% rename from orch/test_examples.py rename to solar/solar/orchestration/test_examples.py index a934b340..888b9672 100644 --- a/orch/test_examples.py +++ b/solar/solar/orchestration/test_examples.py @@ -2,8 +2,8 @@ import networkx as nx -from orch.tasks import * -from orch.graph import * +from solar.orchestration.tasks import * +from solar.orchestratoin.graph import * from pytest import fixture