Merge "fix deployment bug" into dev/experimental
This commit is contained in:
commit
5ac173e9bb
@ -51,7 +51,9 @@ def deploy(cluster_id, hosts_id_list, username=None):
|
||||
#deploy_manager.prepare_for_deploy()
|
||||
deployed_config = deploy_manager.deploy()
|
||||
|
||||
ActionHelper.save_deployed_config(deployed_config, user)
|
||||
ActionHelper.save_deployed_config(
|
||||
cluster_id, hosts_id_list, deployed_config, user
|
||||
)
|
||||
|
||||
|
||||
def redeploy(cluster_id, hosts_id_list, username=None):
|
||||
@ -224,17 +226,25 @@ class ActionHelper(object):
|
||||
return hosts_info
|
||||
|
||||
@staticmethod
|
||||
def save_deployed_config(deployed_config, user):
|
||||
cluster_config = deployed_config[const.CLUSTER]
|
||||
cluster_id = cluster_config[const.ID]
|
||||
del cluster_config[const.ID]
|
||||
def save_deployed_config(
|
||||
cluster_id, hosts_id_list, deployed_config, user
|
||||
):
|
||||
cluster_config = dict([
|
||||
(key, value[const.CLUSTER])
|
||||
for key, value in deployed_config.items()
|
||||
])
|
||||
for key, value in cluster_config.items():
|
||||
if const.ID in value:
|
||||
del value[const.ID]
|
||||
|
||||
cluster_db.update_cluster_deployed_config(user, cluster_id,
|
||||
**cluster_config)
|
||||
|
||||
hosts_id_list = deployed_config[const.HOSTS].keys()
|
||||
for clusterhost_id in hosts_id_list:
|
||||
config = deployed_config[const.HOSTS][clusterhost_id]
|
||||
config = dict([
|
||||
(key, value[const.HOSTS][clusterhost_id])
|
||||
for key, value in deployed_config.items()
|
||||
])
|
||||
cluster_db.update_clusterhost_deployed_config(user,
|
||||
clusterhost_id,
|
||||
**config)
|
||||
|
@ -92,7 +92,7 @@ class DeployManager(object):
|
||||
# start to deploy OS
|
||||
try:
|
||||
os_deploy_config = self.os_installer.deploy()
|
||||
deploy_config = os_deploy_config
|
||||
deploy_config['os_config'] = os_deploy_config
|
||||
except Exception as ex:
|
||||
logging.error(ex.message)
|
||||
|
||||
@ -101,7 +101,7 @@ class DeployManager(object):
|
||||
self.pk_installer)
|
||||
|
||||
pk_deploy_config = self.pk_installer.deploy()
|
||||
util.merge_dict(deploy_config, pk_deploy_config)
|
||||
deploy_config['package_config'] = pk_deploy_config
|
||||
|
||||
return deploy_config
|
||||
|
||||
|
@ -10,6 +10,7 @@ mkdir -p /var/www/compass
|
||||
sudo cp -rf $COMPASSDIR/misc/apache/ods-server.conf /etc/httpd/conf.d/ods-server.conf
|
||||
sudo cp -rf $COMPASSDIR/misc/apache/compass.wsgi /var/www/compass/compass.wsgi
|
||||
sudo cp -rf $COMPASSDIR/conf/* /etc/compass/
|
||||
sudo cp -rf $COMPASSDIR/templates /etc/compass/
|
||||
sudo cp -rf $COMPASSDIR/service/* /etc/init.d/
|
||||
sudo cp -rf $COMPASSDIR/bin/*.py /opt/compass/bin/
|
||||
sudo cp -rf $COMPASSDIR/bin/*.sh /opt/compass/bin/
|
||||
|
Loading…
Reference in New Issue
Block a user