Beispiel #1
0
 def deploy_java_patches(self):
     try:
         absolute_3rd_java_path = os.path.join(utils.get_hybrid_cloud_badam_path(),
                                               PathHybridCloud.PATH_THIRD_LIB_JAVA)
         pass
     except:
         pass
Beispiel #2
0
 def deploy_java_patches(self):
     try:
         absolute_3rd_java_path = os.path.join(
             utils.get_hybrid_cloud_badam_path(),
             PathHybridCloud.PATH_THIRD_LIB_JAVA)
         pass
     except:
         pass
Beispiel #3
0
    def deploy_wsgi_patches(self):
        try:
            patch_name = 'openstack_dashboard'
            install_file_filter = ['.py', '.html', '.po']
            absolute_path_of_patch = os.path.join(utils.get_hybrid_cloud_badam_path(),
                                                  PathHybridCloud.PATH_PATCHES_OPENSTACK_DASHBOARD)
            install_path = PathHybridCloud.PATH_INSTALL_PATCH_OPENSTACK_DASHBOARD
            installer = PatchInstaller(absolute_path_of_patch, install_path, install_file_filter)
            patch_deploy_factory = EnginneringFactory(patch_name,
                                                      installer=installer)
            patch_deploy_factory.execute()

        except:
            err_info = 'Exception occur when deploy python patches for WSGI openstack dashboard, Exception: %s' %traceback.format_exc()
            logger.error(err_info)
Beispiel #4
0
    def deploy_python_patches(self):
        try:
            patch_name = 'hybrid_python_patches'
            install_file_filter = ['.py']
            config_file_filter = ['.conf', '.filters']

            absolute_path_of_patch = os.path.join(utils.get_hybrid_cloud_badam_path(), PathHybridCloud.PATH_PATCHES_PYTHON)
            openstack_install_path = utils.get_openstack_installed_path()
            installer = PatchInstaller(absolute_path_of_patch, openstack_install_path, install_file_filter)

            configurator = PatchConfigurator(absolute_path_of_patch, config_file_filter)
            patch_deploy_factory = EnginneringFactory(patch_name,
                                                      installer=installer,
                                                      configurator=configurator)
            patch_deploy_factory.execute()
        except:
            err_info = 'Exception occur when deploy python patches for hybrid cloud, Exception: %s' %traceback.format_exc()
            logger.error(err_info)
Beispiel #5
0
    def deploy_wsgi_patches(self):
        try:
            patch_name = 'openstack_dashboard'
            install_file_filter = ['.py', '.html', '.po']
            absolute_path_of_patch = os.path.join(
                utils.get_hybrid_cloud_badam_path(),
                PathHybridCloud.PATH_PATCHES_OPENSTACK_DASHBOARD)
            install_path = PathHybridCloud.PATH_INSTALL_PATCH_OPENSTACK_DASHBOARD
            installer = PatchInstaller(absolute_path_of_patch, install_path,
                                       install_file_filter)
            patch_deploy_factory = EnginneringFactory(patch_name,
                                                      installer=installer)
            patch_deploy_factory.execute()

        except:
            err_info = 'Exception occur when deploy python patches for WSGI openstack dashboard, Exception: %s' % traceback.format_exc(
            )
            logger.error(err_info)
Beispiel #6
0
    def deploy_python_patches(self):
        try:
            patch_name = 'hybrid_python_patches'
            install_file_filter = ['.py']
            config_file_filter = ['.conf', '.filters']

            absolute_path_of_patch = os.path.join(
                utils.get_hybrid_cloud_badam_path(),
                PathHybridCloud.PATH_PATCHES_PYTHON)
            openstack_install_path = utils.get_openstack_installed_path()
            installer = PatchInstaller(absolute_path_of_patch,
                                       openstack_install_path,
                                       install_file_filter)

            configurator = PatchConfigurator(absolute_path_of_patch,
                                             config_file_filter)
            patch_deploy_factory = EnginneringFactory(
                patch_name, installer=installer, configurator=configurator)
            patch_deploy_factory.execute()
        except:
            err_info = 'Exception occur when deploy python patches for hybrid cloud, Exception: %s' % traceback.format_exc(
            )
            logger.error(err_info)
Beispiel #7
0
import sys
import logging
from utils import print_log, get_hybrid_cloud_badam_path

sys.path.append(get_hybrid_cloud_badam_path())

from common import config
from common.econstants import OperationType
from engineering_factory import EnginneringFactory, HostnameConfigurator, AllInOneConfigurator
from installation import CascadingDeploy, HybridDeploy
from utils import ELog

module_logger = logging.getLogger(__name__)
logger = ELog(module_logger)


def main():
    """
    How to use:
    Step1. Copy hybrid_cloud_badam and tricircle-master to <Your-Dir>
    Step2. Config <Your-Dir>/hybrid_cloud_badam/engineering/config/configuration.conf
    Step3. Install by execute following commands.
        # cd <Your-Dir>/hybrid_cloud_badam/engineering
        # python install_exe.py --config-file config/configuration.conf
    :return:
    """
    logger.info('Start to doing deploy...')

    operation = config.CONF.sysconfig.operation
    logger.info('Your operation is - <%s>' % operation)
    if operation == OperationType.CFG_HOST_NAME:
Beispiel #8
0
__author__ = 'nash.xiejun'

import os
import logging
import traceback
import sys
from utils import get_hybrid_cloud_badam_path

sys.path.append(get_hybrid_cloud_badam_path())

from keystoneclient.v2_0 import client as keystone_client
from keystoneclient.v2_0.endpoints import Endpoint
from utils import print_log, ELog
from common.econstants import EndpointType, EndpointURL
from common.engineering_logging import log_for_func_args_of_class
from novaclient import client as nova_client

logger_name = __name__
logger_module = logging.getLogger(__name__)
logger = ELog(logger_module)


class RefServices(object):
    def __init__(self):
        self.tenant = os.environ['OS_TENANT_NAME']
        self.user = os.environ['OS_USERNAME']
        self.pwd = os.environ['OS_PASSWORD']
        self.url = os.environ['OS_AUTH_URL']
        self.keystone = keystone_client.Client(username=self.user, password=self.pwd,
                                               tenant_name=self.tenant, auth_url=self.url)
        credentials = self.get_nova_credentials_v2()