summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j21
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_controller/templates/ceilometer.j21
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_controller/templates/glance.j21
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mongodb.yml2
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg1
-rwxr-xr-xdeploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml7
-rw-r--r--deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py1
-rw-r--r--deploy/compass_vm.sh3
-rw-r--r--deploy/conf/baremetal_cluster_sh.yml1
-rw-r--r--deploy/conf/compass.conf9
-rw-r--r--deploy/conf/virtual_cluster_odl.yml29
-rw-r--r--deploy/conf/virtual_cluster_onos.yml29
-rw-r--r--deploy/deploy_host.sh6
-rw-r--r--deploy/template/power/ipmitool.tmpl12
14 files changed, 87 insertions, 16 deletions
diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j2 b/deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j2
index d3ee52ab..716317da 100644
--- a/deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j2
+++ b/deploy/adapters/ansible/roles/ceilometer_compute/templates/ceilometer.j2
@@ -2,6 +2,7 @@
verbose = True
rpc_backend = rabbit
rabbit_host = {{ internal_vip.ip }}
+rabbit_userid = {{ RABBIT_USER }}
rabbit_password = {{ RABBIT_PASS }}
[publisher]
diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/templates/ceilometer.j2 b/deploy/adapters/ansible/roles/ceilometer_controller/templates/ceilometer.j2
index 09ca5272..c2993885 100644
--- a/deploy/adapters/ansible/roles/ceilometer_controller/templates/ceilometer.j2
+++ b/deploy/adapters/ansible/roles/ceilometer_controller/templates/ceilometer.j2
@@ -1,6 +1,7 @@
[DEFAULT]
rpc_backend = rabbit
rabbit_host = {{ internal_vip.ip }}
+rabbit_userid = {{ RABBIT_USER }}
rabbit_password = {{ RABBIT_PASS }}
auth_strategy = keystone
verbose = True
diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/templates/glance.j2 b/deploy/adapters/ansible/roles/ceilometer_controller/templates/glance.j2
index c34f5d81..616e7e05 100644
--- a/deploy/adapters/ansible/roles/ceilometer_controller/templates/glance.j2
+++ b/deploy/adapters/ansible/roles/ceilometer_controller/templates/glance.j2
@@ -2,4 +2,5 @@
notification_driver = messagingv2
rpc_backend = rabbit
rabbit_host = {{ internal_vip.ip }}
+rabbit_userid = {{ RABBIT_USER }}
rabbit_password = {{ RABBIT_PASS }}
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
index ca61e905..5ca23a19 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
@@ -19,7 +19,7 @@
- name: manually restart mongodb server
service: name=mongodb state=restarted
-- wait_for: port=27017 delay=3 timeout=30 host={{ internal_vip.ip }}
+- wait_for: port=27017 delay=3 timeout=60 host={{ internal_vip.ip }}
- name: create mongodb user
run_once: True
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 721c9731..c8065f05 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -39,7 +39,6 @@ listen proxy-glance_api_cluster
bind {{ internal_vip.ip }}:9292
bind {{ public_vip.ip }}:9292
option tcpka
- option httpchk
option tcplog
balance source
{% for host,ip in haproxy_hosts.items() %}
diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
index 7658d90d..5bea0ae2 100755
--- a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
+++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
@@ -9,10 +9,9 @@
- name: Stop the Open vSwitch service and clear existing OVSDB
shell: >
- service openvswitch-switch stop ;
- rm -rf /var/log/openvswitch/* ;
- rm -rf /etc/openvswitch/conf.db ;
- service openvswitch-switch start ;
+ ovs-vsctl del-br br-int ;
+ ovs-vsctl del-br br-tun ;
+ ovs-vsctl del-manager ;
#- name: get image http server
# shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
diff --git a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
index 5e6520af..bf784bb3 100644
--- a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
+++ b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
@@ -56,6 +56,7 @@ def setup_ips(ip_settings, sys_intf_mappings):
cmd = "ip addr add %s/%s brd %s dev %s;" \
% (intf_info["ip"], intf_info["netmask"], str(network.broadcast),intf_name)
if "gw" in intf_info:
+ cmd += "route del default;"
cmd += "ip route add default via %s dev %s" % (intf_info["gw"], intf_name)
LOG.info("setup_ips: cmd=%s" % cmd)
os.system(cmd)
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 9e192281..79eb1ecf 100644
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -30,6 +30,7 @@ function install_compass_core() {
function wait_ok() {
set +x
log_info "wait_compass_ok enter"
+ ssh-keygen -f "/root/.ssh/known_hosts" -R $MGMT_IP >/dev/null 2>&1
retry=0
until timeout 1s ssh $ssh_args root@$MGMT_IP "exit" >/dev/null 2>&1
do
@@ -108,7 +109,7 @@ function launch_compass() {
sudo virsh define $compass_vm_dir/libvirt.xml
sudo virsh start compass
- if ! wait_ok 300;then
+ if ! wait_ok 360;then
log_error "install os timeout"
exit 1
fi
diff --git a/deploy/conf/baremetal_cluster_sh.yml b/deploy/conf/baremetal_cluster_sh.yml
index 1078cb5c..fe329548 100644
--- a/deploy/conf/baremetal_cluster_sh.yml
+++ b/deploy/conf/baremetal_cluster_sh.yml
@@ -5,6 +5,7 @@ POWER_TOOL: ipmitool
ipmiUser: root
ipmiPass: Huawei@123
+ipmiVer: '1.0'
hosts:
- name: host1
diff --git a/deploy/conf/compass.conf b/deploy/conf/compass.conf
index eee23e9f..0bae6d3b 100644
--- a/deploy/conf/compass.conf
+++ b/deploy/conf/compass.conf
@@ -1,14 +1,15 @@
export COMPASS_VIRT_CPUS=4
export COMPASS_VIRT_MEM=4096
export COMPASS_SERVER=$INSTALL_IP
-export COMPASS_SERVER_URL="http://$COMPASS_SERVER/api"
+export COMPASS_SERVER_URL="http://$MGMT_IP/api"
+export HTTP_SERVER_URL="http://$MGMT_IP/api"
export COMPASS_USER_EMAIL="admin@huawei.com"
export COMPASS_USER_PASSWORD="admin"
export COMPASS_DNS1=${COMPASS_DNS1:-'8.8.8.8'}
export COMPASS_DNS2=${COMPASS_DNS2:-}
-export COMPASS_EXTERNAL_IP=${COMPASS_EXTERNAL_IP:-192.168.124.221}
-export COMPASS_EXTERNAL_MASK=${COMPASS_EXTERNAL_MASK:-255.255.252.0}
-export COMPASS_EXTERNAL_GW=${COMPASS_EXTERNAL_GW:-192.168.124.1}
+export COMPASS_EXTERNAL_IP=${COMPASS_EXTERNAL_IP:-}
+export COMPASS_EXTERNAL_MASK=${COMPASS_EXTERNAL_MASK:-}
+export COMPASS_EXTERNAL_GW=${COMPASS_EXTERNAL_GW:-}
export LANGUAGE="EN"
export TIMEZONE="America/Los_Angeles"
export NTP_SERVER="$COMPASS_SERVER"
diff --git a/deploy/conf/virtual_cluster_odl.yml b/deploy/conf/virtual_cluster_odl.yml
new file mode 100644
index 00000000..e2ee19c6
--- /dev/null
+++ b/deploy/conf/virtual_cluster_odl.yml
@@ -0,0 +1,29 @@
+TYPE: virtual
+FLAVOR: cluster
+
+hosts:
+ - name: host1
+ roles:
+ - controller
+ - ha
+ - odl
+
+ - name: host2
+ roles:
+ - controller
+ - ha
+ - odl
+
+ - name: host3
+ roles:
+ - controller
+ - ha
+ - odl
+
+ - name: host4
+ roles:
+ - compute
+
+ - name: host5
+ roles:
+ - compute
diff --git a/deploy/conf/virtual_cluster_onos.yml b/deploy/conf/virtual_cluster_onos.yml
new file mode 100644
index 00000000..fcd07efc
--- /dev/null
+++ b/deploy/conf/virtual_cluster_onos.yml
@@ -0,0 +1,29 @@
+TYPE: virtual
+FLAVOR: cluster
+
+hosts:
+ - name: host1
+ roles:
+ - controller
+ - ha
+ - onos
+
+ - name: host2
+ roles:
+ - controller
+ - ha
+ - onos
+
+ - name: host3
+ roles:
+ - controller
+ - ha
+ - onos
+
+ - name: host4
+ roles:
+ - compute
+
+ - name: host5
+ roles:
+ - compute
diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh
index 2ec7b8c8..a055702e 100644
--- a/deploy/deploy_host.sh
+++ b/deploy/deploy_host.sh
@@ -3,12 +3,12 @@ function deploy_host(){
NEUTRON_FILE=${COMPASS_DIR}/deploy/conf/neutron_cfg.yaml
pip install oslo.config
- ssh $ssh_args root@${COMPASS_SERVER} mkdir -p /opt/compass/bin/ansible_callbacks
- scp $ssh_args -r ${COMPASS_DIR}/deploy/status_callback.py root@${COMPASS_SERVER}:/opt/compass/bin/ansible_callbacks/status_callback.py
+ ssh $ssh_args root@${MGMT_IP} mkdir -p /opt/compass/bin/ansible_callbacks
+ scp $ssh_args -r ${COMPASS_DIR}/deploy/status_callback.py root@${MGMT_IP}:/opt/compass/bin/ansible_callbacks/status_callback.py
reboot_hosts
- python ${COMPASS_DIR}/deploy/client.py --compass_server="${COMPASS_SERVER_URL}" \
+ python ${COMPASS_DIR}/deploy/client.py --compass_server="${HTTP_SERVER_URL}" \
--compass_user_email="${COMPASS_USER_EMAIL}" --compass_user_password="${COMPASS_USER_PASSWORD}" \
--cluster_name="${CLUSTER_NAME}" --language="${LANGUAGE}" --timezone="${TIMEZONE}" \
--hostnames="${HOSTNAMES}" --partitions="${PARTITIONS}" --subnets="${SUBNETS}" \
diff --git a/deploy/template/power/ipmitool.tmpl b/deploy/template/power/ipmitool.tmpl
index 5d2630af..73278e45 100644
--- a/deploy/template/power/ipmitool.tmpl
+++ b/deploy/template/power/ipmitool.tmpl
@@ -1,6 +1,7 @@
source \${COMPASS_DIR}/util/log.sh
#set default_ipmiUser=$getVar('ipmiUser', '')
#set default_ipmiPass=$getVar('ipmiPass', '')
+#set default_ipmiVer=$getVar('ipmiVer', '2.0')
#set hosts=$getVar('hosts', [])
#set fail_list=""
#for host in $hosts
@@ -20,8 +21,15 @@ exit 1
#set ipmiIp=$host.get('ipmiIp', '')
#set ipmiUser=$host.get('ipmiUser', $default_ipmiUser)
#set ipmiPass=$host.get('ipmiPass', $default_ipmiPass)
+#set ipmiVer=$host.get('ipmiVer', $default_ipmiVer)
+#if $ipmiVer == '2.0'
+ #set interface='lanplus'
+#else
+ #set interface='lan'
+#end if
+
for i in {1..5}; do
- if ipmitool -I lan -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1
+ if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1
then
break
elif [[ i -lt 5 ]]
@@ -34,7 +42,7 @@ for i in {1..5}; do
done
sleep 1
for i in {1..5}; do
- if ipmitool -I lan -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1
+ if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1
then
break
elif [[ i -lt 5 ]]