diff options
Diffstat (limited to 'ci/onos')
-rw-r--r-- | ci/onos/01-deploybundle.sh | 11 | ||||
-rw-r--r-- | ci/onos/juju-deployer/ovs-onos-ha.yaml | 32 | ||||
-rw-r--r-- | ci/onos/juju-deployer/ovs-onos-nonha.yaml | 18 | ||||
-rw-r--r-- | ci/onos/juju-deployer/ovs-onos-tip.yaml | 20 | ||||
-rw-r--r-- | ci/onos/juju_test_prepare.sh | 84 |
5 files changed, 126 insertions, 39 deletions
diff --git a/ci/onos/01-deploybundle.sh b/ci/onos/01-deploybundle.sh index 85a5ff98..60935ad4 100644 --- a/ci/onos/01-deploybundle.sh +++ b/ci/onos/01-deploybundle.sh @@ -4,18 +4,18 @@ set -ex case "$1" in 'nonha' ) - cp onos/juju-deployer/onos.yaml ./bundles.yaml + cp onos/juju-deployer/ovs-onos-nonha.yaml ./bundles.yaml ;; 'ha' ) - cp onos/juju-deployer/onos-ha.yaml ./bundles.yaml + cp onos/juju-deployer/ovs-onos-ha.yaml ./bundles.yaml ;; 'tip' ) - cp onos/juju-deployer/onos-tip.yaml ./bundles.yaml + cp onos/juju-deployer/ovs-onos-tip.yaml ./bundles.yaml cp common/source/* ./ sed -i -- "s|branch: master|branch: stable/$2|g" ./*.yaml ;; * ) - cp onos/juju-deployer/onos.yaml ./bundles.yaml + cp onos/juju-deployer/ovs-onos-nonha.yaml ./bundles.yaml ;; esac @@ -76,3 +76,6 @@ case "$1" in ;; esac +echo "... onos prepare test ..." + sleep 180s + sh onos/juju_test_prepare.sh "$3"
\ No newline at end of file diff --git a/ci/onos/juju-deployer/ovs-onos-ha.yaml b/ci/onos/juju-deployer/ovs-onos-ha.yaml index 77e42013..0e9373b7 100644 --- a/ci/onos/juju-deployer/ovs-onos-ha.yaml +++ b/ci/onos/juju-deployer/ovs-onos-ha.yaml @@ -35,32 +35,32 @@ openstack-phase2: - "lxc:nodes-api=0" - "lxc:nodes-api=2" "hacluster-keystone": - charm: "cs:trusty/hacluster" + branch: "lp:~openstack-charmers/charms/trusty/hacluster/next" options: corosync_key: | 'QisjNpoKHLkvyc3PEdDHP5VZjgD0kOk9t0ABPWmCELlu5AgWgnW6bJd34BVXO7VhW+3ZwNQM3W+bZ3pl28ftY4ki4N/S0KLFNia5egFgiA3AH2QXLnokS7OYXuu6GMJJ1S5mDe6P5zU+tfJe/Mebq24u7CgR0gAvohSPRdDTwdY=' "hacluster-horizon": - charm: "cs:trusty/hacluster" + branch: "lp:~openstack-charmers/charms/trusty/hacluster/next" options: corosync_key: | 'aCVPHw6XYne+Hxv0WPiM3+yEfeIxs0Ly0EMKB494Rdzjf5rE52GcXqqxuvIa/nXJ4GCR+UdKk9FEwcASfYkeu3HDWUld9uTE6pOc+ibWYnybNH7VBfEHW8h9YmQKs3HD2T3wlTcS2irU4CUW7/IKNok4etYdM3iFn1K2ReSGXEI=' "hacluster-nova": - charm: "cs:trusty/hacluster" + branch: "lp:~openstack-charmers/charms/trusty/hacluster/next" options: corosync_key: | 'gel86qmEze8dYKYbfqIgRpqapJpKtdYL2hxC1y5nWYBPq7EMf6V8mF01IjeUkSRs14CUDrsPpT4PWeom7EOY2fleuLx/aIuqQUfEDkhf/gvaz7BaU4hrmTCoDBK7/HvEwY+/wu4qkEeckzSRPsm9MYzqnLRshh8yjZJ70xU/mmk=' "hacluster-neutron": - charm: "cs:trusty/hacluster" + branch: "lp:~openstack-charmers/charms/trusty/hacluster/next" options: corosync_key: | 'KNhb4++3jlllbnscS5D3qdzOJDsQPEeZ7zOLZJHbkKrRjX9gRCijVVOiv2JCvq03HqQ7LIufQzWGl9Za8qh0f6QmQ3XhFh/Cb/3WaYFj+tEf0zArWv+8miswmM1z4eyTSrTWBq0dTgx1z96wjBxP5HV0+1LWW+3Ei4oZWyRGeR0=' "hacluster-glance": - charm: "cs:trusty/hacluster" + branch: "lp:~openstack-charmers/charms/trusty/hacluster/next" options: corosync_key: | 'el1dd8107J5mwQDPS7tEJPZrr0XFfL95+Tku/QG90W5Q5f5SP4W8TRfKvddGmZWZl2lVd1neG5WqaHa1mq/aScJpoflzVAJCvshN7Gd2AjHhLNNugeI8S90j/7wrKUhqiCAlkKaeri2xs5bB5PZ7Z9AHuNZL7SW1al8lxrKhUFI=' "hacluster-ceilometer": - charm: "cs:trusty/hacluster" + branch: "lp:~openstack-charmers/charms/trusty/hacluster/next" options: corosync_key: | 'cHkgKGJpdHMgPSA5NjApLgpQcmVzcyBrZXlzIG9uIHlvdXIga2V5Ym9hcmQgdG8gZ2VuZXJhdGUgZW50cm9weSAoYml0cyA9IDEwMDgpLgpXcml0aW5nIGNvcm9zeW5jIGtleSB0byAvZXRjL2Nvcm9zeW5jL2F1dGhrZXkuCg==' @@ -85,7 +85,7 @@ openstack-phase2: to: - "lxc:nodes-api=0" ceph: - charm: cs:trusty/ceph + branch: "lp:~openstack-charmers/charms/trusty/ceph/next" num_units: 2 options: fsid: 5a791d94-980b-11e4-b6f6-3c970e8b1cf7 @@ -99,7 +99,7 @@ openstack-phase2: - "nodes-compute=0" - "nodes-compute=1" ceph-osd: - charm: cs:trusty/ceph-osd + branch: "lp:~openstack-charmers/charms/trusty/ceph-osd/next" num_units: 1 options: osd-devices: /srv @@ -107,7 +107,7 @@ openstack-phase2: to: - "nodes-api=0" ceph-radosgw: - charm: cs:trusty/ceph-radosgw + branch: "lp:~openstack-charmers/charms/trusty/ceph-radosgw/next" num_units: 3 options: use-embedded-webserver: true @@ -118,7 +118,7 @@ openstack-phase2: - "lxc:nodes-api=2" cinder: - charm: cs:trusty/cinder + branch: "lp:~openstack-charmers/charms/trusty/cinder/next" num_units: 3 options: block-device: None @@ -129,16 +129,16 @@ openstack-phase2: - "lxc:nodes-api=0" - "lxc:nodes-api=1" cinder-ceph: - charm: cs:trusty/cinder-ceph + branch: "lp:~openstack-charmers/charms/trusty/cinder-ceph/next" "rabbitmq-server": - branch: lp:charms/trusty/rabbitmq-server + branch: "lp:~openstack-charmers/charms/trusty/rabbitmq-server/next" num_units: 3 to: - "lxc:nodes-api=0" - "lxc:nodes-api=1" - "lxc:nodes-api=2" "keystone": - branch: lp:charms/trusty/keystone + branch: "lp:~openstack-charmers/charms/trusty/keystone/next" num_units: 3 options: # ha-mcastport: 5402 @@ -150,7 +150,7 @@ openstack-phase2: - "lxc:nodes-api=0" - "lxc:nodes-api=2" "openstack-dashboard": - branch: lp:charms/trusty/openstack-dashboard + branch: "lp:~openstack-charmers/charms/trusty/openstack-dashboard/next" num_units: 3 options: secret: admin @@ -173,7 +173,7 @@ openstack-phase2: # - "nodes-api=1" # - "nodes-api=2" "nova-cloud-controller": - branch: lp:charms/trusty/nova-cloud-controller + branch: "lp:~openstack-charmers/charms/trusty/nova-cloud-controller/next" num_units: 3 options: "console-access-protocol": novnc @@ -209,7 +209,7 @@ openstack-phase2: to: - "lxc:nodes-api=1" "glance": - branch: lp:charms/trusty/glance + branch: lp:~openstack-charmers/charms/trusty/glance/next num_units: 3 options: vip: 10.4.1.12 diff --git a/ci/onos/juju-deployer/ovs-onos-nonha.yaml b/ci/onos/juju-deployer/ovs-onos-nonha.yaml index 28983bbe..32055774 100644 --- a/ci/onos/juju-deployer/ovs-onos-nonha.yaml +++ b/ci/onos/juju-deployer/ovs-onos-nonha.yaml @@ -21,7 +21,7 @@ openstack-phase2: inherits: openstack-phase1 services: "mysql": - charm: "cs:trusty/mysql" + branch: "lp:~openstack-charmers/charms/trusty/percona-cluster/next" num_units: 1 options: "dataset-size": 2G @@ -45,7 +45,7 @@ openstack-phase2: to: - "lxc:nodes-api=0" ceph: - charm: cs:trusty/ceph + branch: "lp:~openstack-charmers/charms/trusty/ceph/next" num_units: 1 options: fsid: 5a791d94-980b-11e4-b6f6-3c970e8b1cf7 @@ -74,7 +74,7 @@ openstack-phase2: # to: # - "lxc:nodes-api=0" cinder: - charm: cs:trusty/cinder + branch: "lp:~openstack-charmers/charms/trusty/cinder/next" num_units: 1 options: block-device: None @@ -83,14 +83,14 @@ openstack-phase2: to: - "lxc:nodes-api=0" cinder-ceph: - charm: cs:trusty/cinder-ceph + branch: "lp:~openstack-charmers/charms/trusty/cinder-ceph/next" "rabbitmq-server": - branch: lp:charms/trusty/rabbitmq-server + branch: "lp:~openstack-charmers/charms/trusty/rabbitmq-server/next" num_units: 1 to: - "lxc:nodes-api=0" "keystone": - branch: lp:charms/trusty/keystone + branch: "lp:~openstack-charmers/charms/trusty/keystone/next" num_units: 1 options: # ha-mcastport: 5402 @@ -99,7 +99,7 @@ openstack-phase2: to: - "lxc:nodes-api=0" "openstack-dashboard": - branch: lp:charms/trusty/openstack-dashboard + branch: "lp:~openstack-charmers/charms/trusty/openstack-dashboard/next" num_units: 1 options: secret: admin @@ -119,7 +119,7 @@ openstack-phase2: # - "nodes-api=1" # - "nodes-api=2" "nova-cloud-controller": - branch: lp:charms/trusty/nova-cloud-controller + branch: "lp:~openstack-charmers/charms/trusty/nova-cloud-controller/next" num_units: 1 options: "console-access-protocol": novnc @@ -148,7 +148,7 @@ openstack-phase2: to: - "lxc:nodes-api=0" "glance": - branch: lp:charms/trusty/glance + branch: lp:~openstack-charmers/charms/trusty/glance/next num_units: 1 to: - "lxc:nodes-api=0" diff --git a/ci/onos/juju-deployer/ovs-onos-tip.yaml b/ci/onos/juju-deployer/ovs-onos-tip.yaml index 11ff4717..c1164ceb 100644 --- a/ci/onos/juju-deployer/ovs-onos-tip.yaml +++ b/ci/onos/juju-deployer/ovs-onos-tip.yaml @@ -21,7 +21,7 @@ openstack-phase2: inherits: openstack-phase1 services: "mysql": - charm: "cs:trusty/mysql" + branch: "lp:~openstack-charmers/charms/trusty/percona-cluster/next" num_units: 1 options: "dataset-size": 2G @@ -45,7 +45,7 @@ openstack-phase2: to: - "lxc:nodes-api=0" ceph: - charm: cs:trusty/ceph + branch: "lp:~openstack-charmers/charms/trusty/ceilometer/next" num_units: 1 options: fsid: 5a791d94-980b-11e4-b6f6-3c970e8b1cf7 @@ -75,7 +75,7 @@ openstack-phase2: # - "lxc:nodes-api=0" cinder: - charm: cs:trusty/cinder + branch: "lp:~openstack-charmers/charms/trusty/cinder/next" num_units: 1 options: block-device: None @@ -85,14 +85,14 @@ openstack-phase2: to: - "lxc:nodes-api=0" cinder-ceph: - charm: cs:trusty/cinder-ceph + branch: "lp:~openstack-charmers/charms/trusty/cinder-ceph/next" "rabbitmq-server": - branch: lp:charms/trusty/rabbitmq-server + branch: "lp:~openstack-charmers/charms/trusty/rabbitmq-server/next" num_units: 1 to: - "lxc:nodes-api=0" "keystone": - branch: lp:charms/trusty/keystone + branch: "lp:~openstack-charmers/charms/trusty/keystone/next" num_units: 1 options: openstack-origin-git: include-file://keystone-master.yaml @@ -101,7 +101,7 @@ openstack-phase2: to: - "lxc:nodes-api=0" "openstack-dashboard": - branch: lp:charms/trusty/openstack-dashboard + branch: "lp:~openstack-charmers/charms/trusty/openstack-dashboard/next" num_units: 1 options: openstack-origin-git: include-file://horizon-master.yaml @@ -119,7 +119,7 @@ openstack-phase2: - "nodes-compute=0" # - "nodes-compute=1" "nova-cloud-controller": - branch: lp:charms/trusty/nova-cloud-controller + branch: "lp:~openstack-charmers/charms/trusty/nova-cloud-controller/next" num_units: 1 options: openstack-origin-git: include-file://nova-master.yaml @@ -141,7 +141,7 @@ openstack-phase2: options: openstack-origin-git: include-file://neutron-master.yaml # "ext-port": "eth1" - plugin: ovs-onos + plugin: onos instance-mtu: 1400 to: - "nodes-api=0" @@ -150,7 +150,7 @@ openstack-phase2: to: - "lxc:nodes-api=0" "glance": - branch: lp:charms/trusty/glance + branch: "lp:~openstack-charmers/charms/trusty/glance/next" num_units: 1 options: openstack-origin-git: include-file://glance-master.yaml diff --git a/ci/onos/juju_test_prepare.sh b/ci/onos/juju_test_prepare.sh new file mode 100644 index 00000000..60b51a72 --- /dev/null +++ b/ci/onos/juju_test_prepare.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +# launch eth on computer nodes and remove default gw route +# Update gateway mac to onos for l3 function + +# author: York(Yuanyou) +# set the gateway ip and cidr and compute-node eth name. +case "$1" in + 'orangepod2' ) + GW_IP=192.168.22.1 + CIDR=192.168.22.0/24 + COMPUTE_ETH=eth1 + ;; + 'intelpod6' ) + GW_IP=10.2.66.1 + CIDR=10.2.66.0/24 + COMPUTE_ETH=eth2 + ;; + 'intelpod5' ) + GW_IP=10.2.65.1 + CIDR=10.2.65.0/24 + COMPUTE_ETH=eth2.724 + ;; + 'attvirpod1' ) + GW_IP=10.10.15.1 + CIDR=10.10.15.0/24 + COMPUTE_ETH=eth1 + ;; + 'default' ) + GW_IP=192.168.122.1 + CIDR=192.168.122.0/24 + COMPUTE_ETH=eth1 + ;; + * ) + GW_IP=192.168.122.1 + CIDR=192.168.122.0/24 + COMPUTE_ETH=eth1 + ;; +esac + +# launch eth on computer nodes and remove default gw route +launch_eth() { + computer_list=$(juju status --format short | grep -Eo 'nodes-compute/[0-9]') + for node in $computer_list; do + echo "node name is ${node}" + juju ssh $node "sudo ifconfig $COMPUTE_ETH up" + juju ssh $node "sudo route del default gw $GW_IP" + done +} + +# create external network and subnet in openstack +create_ext_network() { + keystoneIp=$(juju status --format short | grep keystone/0 | grep -v ha | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}') + configOpenrc admin openstack admin http://$keystoneIp:5000/v2.0 Canonical + juju scp ./admin-openrc nova-cloud-controller/0: + juju ssh nova-cloud-controller/0 "source admin-openrc;neutron net-create ext-net --shared --router:external=True;neutron subnet-create ext-net --name ext-subnet $CIDR" +} + +configOpenrc() +{ + echo " " > ./admin-openrc + echo "export OS_USERNAME=$1" >> ./admin-openrc + echo "export OS_PASSWORD=$2" >> ./admin-openrc + echo "export OS_TENANT_NAME=$3" >> ./admin-openrc + echo "export OS_AUTH_URL=$4" >> ./admin-openrc + echo "export OS_REGION_NAME=$5" >> ./admin-openrc + } + +# Update gateway mac to onos for l3 function +update_gw_mac() { + ## get gateway mac + GW_MAC=$(juju ssh nova-compute/0 "arp -a ${GW_IP} | grep -Eo '([0-9a-fA-F]{2})(([/\s:-][0-9a-fA-F]{2}){5})'") + ## set external gateway mac in onos + juju set onos-controller gateway-mac=$GW_MAC + +} + +main() { + launch_eth + create_ext_network + update_gw_mac +} + +main "$@" |