Move everything into solar subproject

This commit is contained in:
Dmitry Shulyak 2015-06-30 16:23:32 +03:00
parent 508a4ec9a3
commit a172a00a09
14 changed files with 15 additions and 11 deletions

View File

@ -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]

4
cli.py
View File

@ -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

View File

@ -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')

View File

@ -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',

View File

@ -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