support to assign ppa name when deploy openstack 81/1781/4
authorbaigk <baiguoku@huawei.com>
Sat, 19 Sep 2015 03:07:44 +0000 (11:07 +0800)
committerbaigk <baiguoku@huawei.com>
Sat, 19 Sep 2015 08:57:18 +0000 (16:57 +0800)
JIRA: COMPASS-63

Change-Id: Ifdaa8a82e849291c1b5d5a48f9f678f5bb417a89
Signed-off-by: baigk <baiguoku@huawei.com>
20 files changed:
deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml [moved from deploy/adapters/ansible/openstack_juno/HA-ansible-multinodes.yml with 100% similarity]
deploy/adapters/ansible/openstack/allinone.yml [moved from deploy/adapters/ansible/openstack_juno/allinone.yml with 100% similarity]
deploy/adapters/ansible/openstack/compute.yml [moved from deploy/adapters/ansible/openstack_juno/compute.yml with 100% similarity]
deploy/adapters/ansible/openstack/controller.yml [moved from deploy/adapters/ansible/openstack_juno/controller.yml with 100% similarity]
deploy/adapters/ansible/openstack/group_vars/all [moved from deploy/adapters/ansible/openstack_juno/group_vars/all with 100% similarity]
deploy/adapters/ansible/openstack/multinodes.yml [moved from deploy/adapters/ansible/openstack_juno/multinodes.yml with 100% similarity]
deploy/adapters/ansible/openstack/network.yml [moved from deploy/adapters/ansible/openstack_juno/network.yml with 100% similarity]
deploy/adapters/ansible/openstack/single-controller.yml [moved from deploy/adapters/ansible/openstack_juno/single-controller.yml with 100% similarity]
deploy/adapters/ansible/openstack/storage.yml [moved from deploy/adapters/ansible/openstack_juno/storage.yml with 100% similarity]
deploy/adapters/ansible/openstack/templates/dnsmasq-neutron.conf [moved from deploy/adapters/ansible/openstack_juno/templates/dnsmasq-neutron.conf with 100% similarity]
deploy/adapters/ansible/openstack/templates/ml2_conf.ini [moved from deploy/adapters/ansible/openstack_juno/templates/ml2_conf.ini with 100% similarity]
deploy/adapters/ansible/openstack/templates/neutron-network.conf [moved from deploy/adapters/ansible/openstack_juno/templates/neutron-network.conf with 100% similarity]
deploy/adapters/ansible/openstack/templates/neutron.conf [moved from deploy/adapters/ansible/openstack_juno/templates/neutron.conf with 100% similarity]
deploy/adapters/ansible/openstack/templates/nova.conf [moved from deploy/adapters/ansible/openstack_juno/templates/nova.conf with 100% similarity]
deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
deploy/client.py
deploy/compass_vm.sh
deploy/conf/cluster.conf
deploy/conf/five.conf
deploy/deploy_host.sh

index 3c18d36..f1a2312 100644 (file)
@@ -6,7 +6,7 @@ global
     group haproxy
     maxconn 4000
     pidfile /var/run/haproxy/haproxy.pid
-    log 127.0.0.1 local0
+    #log 127.0.0.1 local0
     tune.bufsize 1000000
     stats socket /var/run/haproxy.sock
     stats timeout 2m
index 48602c4..33d987e 100644 (file)
@@ -213,6 +213,9 @@ opts = [
     cfg.StrOpt('cluster_prv_vip',
               help='cluster ip address',
               default=''),
+    cfg.StrOpt('repo_name',
+              help='repo name',
+              default=''),
 ]
 CONF.register_cli_opts(opts)
 
@@ -414,6 +417,7 @@ class CompassClient(object):
         http_proxy = CONF.http_proxy
         https_proxy = CONF.https_proxy
         local_repo_url = CONF.local_repo_url
+        repo_name = CONF.repo_name
         if not https_proxy and http_proxy:
             https_proxy = http_proxy
 
@@ -453,7 +457,6 @@ class CompassClient(object):
         if not default_gateway:
             raise Exception('default gateway is not defined')
 
-
         general_config = {
             'language': language,
             'timezone': timezone,
@@ -474,6 +477,8 @@ class CompassClient(object):
             general_config['search_path'] = search_path
         if local_repo_url:
             general_config['local_repo'] = local_repo_url
+        if repo_name:
+            general_config['repo_name'] = repo_name
 
         os_config["general"] = general_config
 
index 067918d..d3fec23 100644 (file)
@@ -28,6 +28,7 @@ function install_compass_core() {
 }
 
 function wait_ok() {
+    set +x
     log_info "wait_compass_ok enter"
     retry=0
     until timeout 1s ssh $ssh_args root@$MGMT_IP "exit" >/dev/null 2>&1
@@ -40,7 +41,7 @@ function wait_ok() {
             exit 1
         fi
     done
-
+    set -x
     log_warn "os install time used: 100%"
     log_info "wait_compass_ok exit"
 }
index 71fe0b7..b905957 100644 (file)
@@ -1,5 +1,7 @@
-export ADAPTER_OS_PATTERN='(?i)ubuntu-14\.04\.3.*'
-#export ADAPTER_OS_PATTERN='(?i)CentOS-7.*1503-01.*'
+export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)ubuntu-14\.04\.3.*'}
+#export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*1503-01.*'}
+export REPO_NAME=${REPO_NAME:-"trusty-juno-ppa"}
+#export REPO_NAME=${REPO_NAME:-"centos7-juno-ppa"}
 export ADAPTER_NAME="openstack_juno"
 export ADAPTER_TARGET_SYSTEM_PATTERN="^openstack$"
 export ADAPTER_FLAVOR_PATTERN="HA-ansible-multinodes"
index 9abc3e9..beff1c5 100644 (file)
@@ -1,5 +1,7 @@
 export ADAPTER_OS_PATTERN='(?i)ubuntu-14\.04\.3.*'
-#export ADAPTER_OS_PATTERN='(?i)CentOS-7.*1503-01.*'
+#export ADAPTER_OS_PATTERN=${ADAPTER_OS_PATTERN:-'(?i)CentOS-7.*1503-01.*'}
+export REPO_NAME=${REPO_NAME:-"trusty-juno-ppa"}
+#export REPO_NAME=${REPO_NAME:-"centos7-juno-ppa"}
 export ADAPTER_NAME="openstack_juno"
 export ADAPTER_TARGET_SYSTEM_PATTERN="^openstack$"
 export ADAPTER_FLAVOR_PATTERN="single-controller"
index a4dbd00..9285346 100644 (file)
@@ -14,7 +14,7 @@ function deploy_host(){
     --hostnames="${HOSTNAMES}" --partitions="${PARTITIONS}" --subnets="${SUBNETS}" \
     --adapter_os_pattern="${ADAPTER_OS_PATTERN}" --adapter_name="${ADAPTER_NAME}" \
     --adapter_target_system_pattern="${ADAPTER_TARGET_SYSTEM_PATTERN}" \
-    --adapter_flavor_pattern="${ADAPTER_FLAVOR_PATTERN}" \
+    --adapter_flavor_pattern="${ADAPTER_FLAVOR_PATTERN}" --repo_name="${REPO_NAME}" \
     --http_proxy="${PROXY}" --https_proxy="${PROXY}" --no_proxy="${IGNORE_PROXY}" \
     --ntp_server="${NTP_SERVER}" --dns_servers="${NAMESERVERS}" --domain="${DOMAIN}" \
     --search_path="${SEARCH_PATH}" --default_gateway="${GATEWAY}" \