From 6d4a6aa60fce0e5911882a9b1c6ac8958f1839ec Mon Sep 17 00:00:00 2001 From: Dmitry Mescheryakov Date: Fri, 18 Apr 2014 13:55:28 +0400 Subject: [PATCH] Split sahara into sahara-api and sahara-engine Split monolitic sahara-api into two services: sahara-api and sahara-engine. The former is a user-facing interface, the later - service doing all the work. Sahara-api sends tasks to sahara-engine via oslo.messaging. See the blueprint for details. Notes: * Used the following Climate RPC code as a baseline: https://github.com/stackforge/climate/blob/master/climate/utils/service.py hence added Julien Danjou to licence header. * Removed the old contents of sahara/utils/rpc.py - that is a prehistoric stuff not used anywhere. * sahara-api still depends on eventlet, while we want to drop this dependency in the end. * periodics run in sahara-api. They shold be moved to engine later. Partially Implements: blueprint scalable-savanna Change-Id: I64275a757b539f3fcddd6e993d6614d492745226 --- requirements.txt | 1 + sahara/utils/patches.py | 3 +++ setup.cfg | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 24bbaf1..f45bfeb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,7 @@ Flask>=0.10,<1.0 iso8601>=0.1.9 jsonschema>=2.0.0,<3.0.0 oslo.config>=1.2.0 +oslo.messaging>=1.3.0 paramiko>=1.9.0 pbr>=0.6,!=0.7,<1.0 requests>=1.1 diff --git a/sahara/utils/patches.py b/sahara/utils/patches.py index b070533..c1b1d11 100644 --- a/sahara/utils/patches.py +++ b/sahara/utils/patches.py @@ -55,6 +55,9 @@ def eventlet_import_monkey_patched(module): def patch_minidom_writexml(): """Patch for xml.dom.minidom toprettyxml bug with whitespaces around text + We apply the patch to avoid excess whitespaces in generated xml + configuration files that brakes Hadoop. + (This patch will be applied for all Python versions < 2.7.3) Issue: http://bugs.python.org/issue4147 diff --git a/setup.cfg b/setup.cfg index c07ce64..74aca41 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,8 +29,9 @@ data_files = [entry_points] console_scripts = + sahara-all = sahara.cli.sahara_all:main sahara-api = sahara.cli.sahara_api:main - sahara-all = sahara.cli.sahara_api:main + sahara-engine = sahara.cli.sahara_engine:main sahara-db-manage = sahara.db.migration.cli:main _sahara-subprocess = sahara.cli.sahara_subprocess:main @@ -46,6 +47,10 @@ sahara.infrastructure.engine = sahara.remote = ssh = sahara.utils.ssh_remote:SshRemoteDriver +sahara.run.mode = + all-in-one = sahara.service.ops:LocalOps + distributed = sahara.service.ops:RemoteOps + [build_sphinx] all_files = 1 build-dir = doc/build