Пример #1
0
def _install_optional(amqpinflux_venv):
    amqpinflux_source_url = ctx_properties['amqpinflux_module_source_url']
    # this allows to upgrade amqpinflux if necessary.
    if amqpinflux_source_url:
        utils.install_python_package(amqpinflux_source_url, amqpinflux_venv)
def _install_optional(amqpinflux_venv):
    amqpinflux_source_url = ctx_properties['amqpinflux_module_source_url']
    # this allows to upgrade amqpinflux if necessary.
    if amqpinflux_source_url:
        utils.install_python_package(amqpinflux_source_url, amqpinflux_venv)
def _install_optional(mgmtworker_venv):

    rest_props = utils.ctx_factory.get('restservice')
    rest_client_source_url = \
        rest_props['rest_client_module_source_url']
    plugins_common_source_url = \
        rest_props['plugins_common_module_source_url']
    script_plugin_source_url = \
        rest_props['script_plugin_module_source_url']
    rest_service_source_url = \
        rest_props['rest_service_module_source_url']
    agent_source_url = \
        rest_props['agent_module_source_url']

    # this allows to upgrade modules if necessary.
    ctx.logger.info('Installing Optional Packages if supplied...')
    if rest_client_source_url:
        utils.install_python_package(rest_client_source_url, mgmtworker_venv)
    if plugins_common_source_url:
        utils.install_python_package(
            plugins_common_source_url, mgmtworker_venv)
    if script_plugin_source_url:
        utils.install_python_package(script_plugin_source_url, mgmtworker_venv)
    if agent_source_url:
        utils.install_python_package(agent_source_url, mgmtworker_venv)

    if rest_service_source_url:
        ctx.logger.info('Downloading cloudify-manager Repository...')
        manager_repo = \
            utils.download_cloudify_resource(rest_service_source_url,
                                             MGMT_WORKER_SERVICE_NAME)
        ctx.logger.info('Extracting Manager Repository...')
        utils.untar(manager_repo)

        ctx.logger.info('Installing Management Worker Plugins...')
        # shouldn't we extract the riemann-controller and workflows modules to
        # their own repos?
        utils.install_python_package(
            '/tmp/plugins/riemann-controller', mgmtworker_venv)
        utils.install_python_package('/tmp/workflows', mgmtworker_venv)
Пример #4
0
def _install_optional(mgmtworker_venv):
    rest_props = utils.ctx_factory.get('restservice')
    rest_client_source_url = rest_props['rest_client_module_source_url']
    plugins_common_source_url = rest_props['plugins_common_module_source_url']
    script_plugin_source_url = rest_props['script_plugin_module_source_url']
    rest_service_source_url = rest_props['rest_service_module_source_url']
    agent_source_url = rest_props['agent_module_source_url']
    pip_constraints = rest_props['pip_constraints']

    constraints_file = utils.write_to_tempfile(pip_constraints) if \
        pip_constraints else None

    # this allows to upgrade modules if necessary.
    ctx.logger.info('Installing Optional Packages if supplied...')
    if rest_client_source_url:
        utils.install_python_package(rest_client_source_url, mgmtworker_venv,
                                     constraints_file)
    if plugins_common_source_url:
        utils.install_python_package(plugins_common_source_url,
                                     mgmtworker_venv, constraints_file)
    if script_plugin_source_url:
        utils.install_python_package(script_plugin_source_url, mgmtworker_venv,
                                     constraints_file)
    if agent_source_url:
        utils.install_python_package(agent_source_url, mgmtworker_venv,
                                     constraints_file)

    if rest_service_source_url:
        ctx.logger.info('Downloading cloudify-manager Repository...')
        manager_repo = \
            utils.download_cloudify_resource(rest_service_source_url,
                                             SERVICE_NAME)

        ctx.logger.info('Extracting Manager Repository...')
        tmp_dir = utils.untar(manager_repo, unique_tmp_dir=True)
        workflows_dir = join(tmp_dir, 'workflows')
        riemann_dir = join(tmp_dir, 'plugins/riemann-controller')

        ctx.logger.info('Installing Management Worker Plugins...')
        utils.install_python_package(riemann_dir, mgmtworker_venv,
                                     constraints_file)
        utils.install_python_package(workflows_dir, mgmtworker_venv,
                                     constraints_file)

        utils.remove(tmp_dir)

    if constraints_file:
        os.remove(constraints_file)
Пример #5
0
def install_optional(rest_venv):
    props = ctx_properties

    dsl_parser_source_url = props['dsl_parser_module_source_url']
    rest_client_source_url = props['rest_client_module_source_url']
    plugins_common_source_url = props['plugins_common_module_source_url']
    script_plugin_source_url = props['script_plugin_module_source_url']
    agent_source_url = props['agent_module_source_url']

    rest_service_source_url = props['rest_service_module_source_url']

    # this allows to upgrade modules if necessary.
    ctx.logger.info('Installing Optional Packages if supplied...')
    if dsl_parser_source_url:
        utils.install_python_package(dsl_parser_source_url, rest_venv)
    if rest_client_source_url:
        utils.install_python_package(rest_client_source_url, rest_venv)
    if plugins_common_source_url:
        utils.install_python_package(plugins_common_source_url, rest_venv)
    if script_plugin_source_url:
        utils.install_python_package(script_plugin_source_url, rest_venv)
    if agent_source_url:
        utils.install_python_package(agent_source_url, rest_venv)

    if rest_service_source_url:
        ctx.logger.info('Downloading cloudify-manager Repository...')
        manager_repo = \
            utils.download_cloudify_resource(rest_service_source_url,
                                             SERVICE_NAME)
        ctx.logger.info('Extracting Manager Repository...')
        tmp_dir = utils.untar(manager_repo, unique_tmp_dir=True)
        rest_service_dir = join(tmp_dir, 'rest-service')
        resources_dir = join(tmp_dir, 'resources/rest-service/cloudify/')

        ctx.logger.info('Installing REST Service...')
        utils.install_python_package(rest_service_dir, rest_venv)

        ctx.logger.info('Deploying Required Manager Resources...')
        utils.move(resources_dir, utils.MANAGER_RESOURCES_HOME)

        utils.remove(tmp_dir)
Пример #6
0
def _install_optional(mgmtworker_venv):

    rest_client_source_url = \
        ctx_properties['rest_client_module_source_url']
    plugins_common_source_url = \
        ctx_properties['plugins_common_module_source_url']
    script_plugin_source_url = \
        ctx_properties['script_plugin_module_source_url']
    rest_service_source_url = \
        ctx_properties['rest_service_module_source_url']
    agent_source_url = \
        ctx_properties['agent_module_source_url']

    # this allows to upgrade modules if necessary.
    ctx.logger.info('Installing Optional Packages if supplied...')
    if rest_client_source_url:
        utils.install_python_package(rest_client_source_url, mgmtworker_venv)
    if plugins_common_source_url:
        utils.install_python_package(plugins_common_source_url,
                                     mgmtworker_venv)
    if script_plugin_source_url:
        utils.install_python_package(script_plugin_source_url, mgmtworker_venv)
    if agent_source_url:
        utils.install_python_package(agent_source_url, mgmtworker_venv)

    if rest_service_source_url:
        ctx.logger.info('Downloading cloudify-manager Repository...')
        manager_repo = \
            utils.download_cloudify_resource(rest_service_source_url,
                                             MGMT_WORKER_SERVICE_NAME)
        ctx.logger.info('Extracting Manager Repository...')
        utils.untar(manager_repo)

        ctx.logger.info('Installing Management Worker Plugins...')
        # shouldn't we extract the riemann-controller and workflows modules to
        # their own repos?
        utils.install_python_package('/tmp/plugins/riemann-controller',
                                     mgmtworker_venv)
        utils.install_python_package('/tmp/workflows', mgmtworker_venv)
def install_optional(rest_venv):
    props = ctx_properties

    dsl_parser_source_url = props['dsl_parser_module_source_url']
    rest_client_source_url = props['rest_client_module_source_url']
    securest_source_url = props['securest_module_source_url']
    plugins_common_source_url = props['plugins_common_module_source_url']
    script_plugin_source_url = props['script_plugin_module_source_url']
    agent_source_url = props['agent_module_source_url']

    rest_service_source_url = props['rest_service_module_source_url']

    # this allows to upgrade modules if necessary.
    ctx.logger.info('Installing Optional Packages if supplied...')
    if dsl_parser_source_url:
        utils.install_python_package(dsl_parser_source_url, rest_venv)
    if rest_client_source_url:
        utils.install_python_package(rest_client_source_url, rest_venv)
    if securest_source_url:
        utils.install_python_package(securest_source_url, rest_venv)
    if plugins_common_source_url:
        utils.install_python_package(plugins_common_source_url, rest_venv)
    if script_plugin_source_url:
        utils.install_python_package(script_plugin_source_url, rest_venv)
    if agent_source_url:
        utils.install_python_package(agent_source_url, rest_venv)

    if rest_service_source_url:
        ctx.logger.info('Downloading cloudify-manager Repository...')
        manager_repo = \
            utils.download_cloudify_resource(rest_service_source_url,
                                             REST_SERVICE_NAME)
        ctx.logger.info('Extracting Manager Repository...')
        utils.untar(manager_repo)

        ctx.logger.info('Installing REST Service...')
        utils.install_python_package('/tmp/rest-service', rest_venv)
        ctx.logger.info('Deploying Required Manager Resources...')
        utils.move(
            '/tmp/resources/rest-service/cloudify/', MANAGER_RESOURCES_HOME)
Пример #8
0
def _install_optional(mgmtworker_venv):
    rest_props = utils.ctx_factory.get('restservice')
    rest_client_source_url = rest_props['rest_client_module_source_url']
    plugins_common_source_url = rest_props['plugins_common_module_source_url']
    script_plugin_source_url = rest_props['script_plugin_module_source_url']
    rest_service_source_url = rest_props['rest_service_module_source_url']
    agent_source_url = rest_props['agent_module_source_url']

    # this allows to upgrade modules if necessary.
    ctx.logger.info('Installing Optional Packages if supplied...')
    if rest_client_source_url:
        utils.install_python_package(rest_client_source_url, mgmtworker_venv)
    if plugins_common_source_url:
        utils.install_python_package(
            plugins_common_source_url, mgmtworker_venv)
    if script_plugin_source_url:
        utils.install_python_package(script_plugin_source_url, mgmtworker_venv)
    if agent_source_url:
        utils.install_python_package(agent_source_url, mgmtworker_venv)

    if rest_service_source_url:
        ctx.logger.info('Downloading cloudify-manager Repository...')
        manager_repo = \
            utils.download_cloudify_resource(rest_service_source_url,
                                             SERVICE_NAME)

        ctx.logger.info('Extracting Manager Repository...')
        tmp_dir = utils.untar(manager_repo, unique_tmp_dir=True)
        workflows_dir = join(tmp_dir, 'workflows')
        riemann_dir = join(tmp_dir, 'plugins/riemann-controller')

        ctx.logger.info('Installing Management Worker Plugins...')
        utils.install_python_package(riemann_dir, mgmtworker_venv)
        utils.install_python_package(workflows_dir, mgmtworker_venv)

        utils.remove(tmp_dir)