diff --git a/doc/source/userdoc/configuration.guide.rst b/doc/source/userdoc/configuration.guide.rst index 6cc7d96324..b4de114c2e 100644 --- a/doc/source/userdoc/configuration.guide.rst +++ b/doc/source/userdoc/configuration.guide.rst @@ -195,23 +195,25 @@ in the ``[oslo_messaging_qpid]`` section: Orchestration configuration --------------------------- -By default sahara is configured to use the direct engine for instance -creation. This engine makes calls directly to the services required -for instance provisioning. Sahara can be configured to use the OpenStack -Orchestration service for this task instead of the direct engine. +By default sahara is configured to use the heat engine for instance +creation. The heat engine uses the Openstack Orchestration service to +provision instances. Sahara can be configured to use the direct engine for +this purpose, but after the Liberty release it will be removed. This +engine makes calls directly to the services required for instance +provisioning. We recommend using the Openstack Orchestration service. -To configure sahara to utilize the Orchestration service for instance +To configure sahara to use the direct engine for instance provisioning the ``infrastructure_engine`` parameter should be modified in the configuration file as follows: .. sourcecode:: cfg [DEFAULT] - infrastructure_engine=heat + infrastructure_engine=direct -There is feature parity between the direct and heat infrastructure -engines. We recommend using the heat engine for provisioning as the -direct is planned for deprecation. +.. warning:: + The direct engine will be removed after the Liberty release, we + recommend using the heat engine. .. _policy-configuration-label: diff --git a/doc/source/userdoc/upgrade.guide.rst b/doc/source/userdoc/upgrade.guide.rst index 4cc9fc4f8b..9d2762b6d7 100644 --- a/doc/source/userdoc/upgrade.guide.rst +++ b/doc/source/userdoc/upgrade.guide.rst @@ -119,3 +119,17 @@ should be placed in the same directory as the sahara configuration file or specified using the ``policy_file`` parameter. For more details about the policy file please see the :ref:`policy section in the configuration guide `. + +Kilo -> Liberty +--------------- + +Direct engine deprecation ++++++++++++++++++++++++++ + +In the Liberty release the direct infrastructure engine has been deprecated +and the heat infrastructure engine is now default. This means, that it is preferable +to use heat engine instead now. In the Liberty release you can continue to +operate clusters with the direct engine (create, delete, scale). Using heat engine only +the delete operation is available on clusters that were created by the direct engine. +After the Liberty release the direct engine will be removed, this means that you will +only be able to delete clusters created with the direct engine. diff --git a/sahara/main.py b/sahara/main.py index b2336da71b..61d2d16ab3 100644 --- a/sahara/main.py +++ b/sahara/main.py @@ -31,6 +31,7 @@ from sahara.api import v11 as api_v11 from sahara import config from sahara import context from sahara.i18n import _LI +from sahara.i18n import _LW from sahara.openstack.common import systemd from sahara.plugins import base as plugins_base from sahara.service import api as service_api @@ -50,7 +51,7 @@ opts = [ cfg.StrOpt('os_region_name', help='Region name used to get services endpoints.'), cfg.StrOpt('infrastructure_engine', - default='direct', + default='heat', help='An engine which will be used to provision ' 'infrastructure for Hadoop cluster.'), cfg.StrOpt('remote', @@ -179,6 +180,11 @@ def _get_infrastructure_engine(): LOG.debug("Infrastructure engine {engine} is loading".format( engine=CONF.infrastructure_engine)) + if CONF.infrastructure_engine == "direct": + LOG.warning(_LW("Direct infrastructure engine is deprecated in Liberty" + " release and will be removed after that release." + " Use Heat infrastructure engine instead.")) + return _load_driver('sahara.infrastructure.engine', CONF.infrastructure_engine) diff --git a/sahara/service/direct_engine.py b/sahara/service/direct_engine.py index a7d6c31c2a..fb97f10fe5 100644 --- a/sahara/service/direct_engine.py +++ b/sahara/service/direct_engine.py @@ -40,11 +40,18 @@ LOG = logging.getLogger(__name__) SSH_PORT = 22 +def _warning_logger(): + LOG.warning(_LW("Direct infrastructure engine is deprecated in Liberty" + " release and will be removed after that release." + " Use Heat infrastructure engine instead.")) + + class DirectEngine(e.Engine): def get_type_and_version(self): return "direct.1.0" def create_cluster(self, cluster): + _warning_logger() ctx = context.ctx() self._update_rollback_strategy(cluster, shutdown=True) @@ -75,6 +82,7 @@ class DirectEngine(e.Engine): self._update_rollback_strategy(cluster) def scale_cluster(self, cluster, node_group_id_map): + _warning_logger() ctx = context.ctx() cluster = g.change_cluster_status(cluster, "Scaling: Spawning") @@ -110,6 +118,7 @@ class DirectEngine(e.Engine): return instance_ids def rollback_cluster(self, cluster, reason): + _warning_logger() rollback_info = cluster.rollback_info or {} self._update_rollback_strategy(cluster)