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 - hosts: all
vars:
celery_dir: /var/run/celery
tasks: tasks:
- shell: mkdir -p {{celery_dir}}
- shell: pip install celery - shell: pip install celery
- shell: hostname - shell: hostname
register: hostname register: hostname
- shell: celery multi kill 2 - shell: celery multi kill 2
chdir=/vagrant/ chdir={{celery_dir}}
- shell: celery multi start 2 -A orch.tasks -Q:1 celery,scheduler -Q:2 celery,{{hostname.stdout}} - shell: celery multi start 2 -A solar.orchestration.tasks -Q:1 celery,scheduler -Q:2 celery,{{hostname.stdout}}
chdir=/vagrant/ chdir={{celery_dir}}
tags: [master] tags: [master]
- shell: celery multi start 1 -A orch.tasks -Q:1 celery,{{hostname.stdout}} - shell: celery multi start 1 -A solar.orchestration.tasks -Q:1 celery,{{hostname.stdout}}
chdir=/vagrant/ chdir={{celery_dir}}
tags: [slave] tags: [slave]

4
cli.py
View File

@ -3,8 +3,8 @@
import click import click
from orch import graph from solar.orchestration import graph
from orch import tasks from solar.orchestration import tasks
import networkx as nx import networkx as nx
import subprocess import subprocess

View File

@ -191,7 +191,7 @@ def deploy():
print 'ERROR: %s: %s' % (r.name, error) print 'ERROR: %s: %s' % (r.name, error)
sys.exit(1) sys.exit(1)
return
# run # run
actions.resource_action(mariadb_service1, 'run') actions.resource_action(mariadb_service1, 'run')
actions.resource_action(rabbitmq_service1, 'run') actions.resource_action(rabbitmq_service1, 'run')

View File

@ -10,7 +10,7 @@ from itertools import islice
import subprocess import subprocess
import time import time
from orch import graph from solar.orchestration import graph
import redis import redis
@ -18,6 +18,7 @@ import redis
from solar.core import actions from solar.core import actions
from solar.core import resource from solar.core import resource
app = Celery( app = Celery(
'tasks', 'tasks',
backend='redis://10.0.0.2:6379/1', backend='redis://10.0.0.2:6379/1',

View File

@ -2,8 +2,8 @@
import networkx as nx import networkx as nx
from orch.tasks import * from solar.orchestration.tasks import *
from orch.graph import * from solar.orchestratoin.graph import *
from pytest import fixture from pytest import fixture