From: Narinder Gupta Date: Wed, 8 Nov 2017 05:40:00 +0000 (-0600) Subject: modified to replace neutron with openstack commands. X-Git-Tag: opnfv-6.0.0~41 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F46835%2F9;p=joid.git modified to replace neutron with openstack commands. Added intel pod19 labconfig as well. updated with comments. Change-Id: I206da5afdfc1ed73f6fd589853bbbdf2bcc27e07 Signed-off-by: Narinder Gupta --- diff --git a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml index 0568b38a..b8948e61 100644 --- a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml @@ -33,11 +33,7 @@ ceph-osd: charm: "./{{ ubuntu.release }}/ceph-osd" {% if os.hyperconverged %} -{% if opnfv.units >= 3 %} - num_units: {{ unit_ceph_qty() }} -{% else %} num_units: {{ opnfv.units }} -{% endif %} {% else %} num_units: 3 {% endif %} @@ -57,15 +53,9 @@ {% endif %} to: {% if os.hyperconverged %} -{% if opnfv.units >= 3 %} -{% for unit_id in range(0, 3) %} - - "nodes/{{ unit_id }}" -{% endfor %} -{% else %} - {% for unit_id in range(0, opnfv.units) %} +{% for unit_id in range(0, opnfv.units) %} - "nodes/{{ unit_id }}" - {% endfor %} -{% endif %} +{% endfor %} {% else %} {% if os.ha.mode == 'ha' %} {% for unit_id in range(0, 3) %} diff --git a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml index ef5bbe37..6d777720 100644 --- a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml +++ b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml @@ -23,6 +23,8 @@ {% if k8.network.controller == 'ovn' %} {% include 'ovn.yaml' %} +{% elif k8.network.controller == 'canal' %} +{% include 'canal.yaml' %} {% else %} {% include 'flannel.yaml' %} {% endif %} diff --git a/ci/config_tpl/juju2/bundlek8_tpl/canal.yaml b/ci/config_tpl/juju2/bundlek8_tpl/canal.yaml new file mode 100644 index 00000000..2b130652 --- /dev/null +++ b/ci/config_tpl/juju2/bundlek8_tpl/canal.yaml @@ -0,0 +1,8 @@ + + canal: + charm: "cs:~containers/canal-6" +{% if os.service.bindings %} + bindings: + "": *oam-space +{% endif %} + diff --git a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml index 42c9e136..602fbaad 100644 --- a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml +++ b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml @@ -10,6 +10,10 @@ {% if k8.network.controller == 'ovn' %} - [ 'ovn:cni', 'kubernetes-master:cni' ] - [ 'ovn:cni', 'kubernetes-worker:cni' ] +{% elif k8.network.controller == 'canal' %} + - [ 'canal:etcd', 'etcd:db' ] + - [ 'canal:cni', 'kubernetes-master:cni' ] + - [ 'canal:cni', 'kubernetes-worker:cni' ] {% else %} - [ 'flannel:etcd', 'etcd:db' ] - [ 'flannel:cni', 'kubernetes-master:cni' ] diff --git a/ci/openstack.sh b/ci/openstack.sh index a7d91fb6..9d90db6a 100755 --- a/ci/openstack.sh +++ b/ci/openstack.sh @@ -145,22 +145,22 @@ echo_info "Creating external network with neutron" if [ "onos" == "$opnfvsdn" ]; then launch_eth - neutron net-show ext-net > /dev/null 2>&1 || neutron net-create ext-net \ - --router:external=True + openstack network show ext-net > /dev/null 2>&1 || openstack network create \ + --external --share --enable ext-net elif [ "ocl" == "$opnfvsdn" ]; then - neutron net-show ext-net > /dev/null 2>&1 || neutron net-create ext-net \ - --router:external=True + openstack network show ext-net > /dev/null 2>&1 || openstack network create \ + --external --share --enable ext-net else - neutron net-show ext-net > /dev/null 2>&1 || neutron net-create ext-net \ - --router:external=True \ - --provider:network_type flat \ - --provider:physical_network physnet1 + openstack network show ext-net > /dev/null 2>&1 || openstack network create \ + --provider-network-type flat \ + --provider-physical-network physnet1 \ + --external --share --enable ext-net fi -neutron subnet-show ext-subnet > /dev/null 2>&1 || neutron subnet-create ext-net \ - --name ext-subnet --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \ - --disable-dhcp --gateway $EXTNET_GW $EXTNET_NET +openstack subnet show ext-subnet > /dev/null 2>&1 || openstack subnet create \ + --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \ + --no-dhcp --gateway $EXTNET_GW --network ext-net --subnet-range $EXTNET_NET ext-subnet # Ocl can push packets to the fabric network in order to reach a gateway if BGP/L3VPN hasn't been configured. if [ "ocl" == "$opnfvsdn" ]; then diff --git a/juju/configure-juju-on-openstack b/juju/configure-juju-on-openstack index 1d98fd08..6717ce53 100755 --- a/juju/configure-juju-on-openstack +++ b/juju/configure-juju-on-openstack @@ -70,8 +70,20 @@ T_IMAGE_ID=`openstack image list -f value | grep -i trusty | cut -f 1 -d " "` #We can now use Juju to generate the metadata: -juju metadata generate-image -d ~/simplestreams -i $X_IMAGE_ID -s xenial -r $OS_REGION_NAME -u $OS_AUTH_URL -juju metadata generate-image -d ~/simplestreams -i $T_IMAGE_ID -s trusty -r $OS_REGION_NAME -u $OS_AUTH_URL +#Upload images to glance +## image name is used by script to generate metadata .. don't screw the series +NODE_ARCTYPE=`arch` + +if [ "ppc64le" == "$NODE_ARCTYPE" ]; then + NODE_ARCHES="ppc64el" +elif [ "aarch64" == "$NODE_ARCTYPE" ]; then + NODE_ARCHES="arm" +else + NODE_ARCHES="amd64" +fi + +juju metadata generate-image -d ~/simplestreams -i $X_IMAGE_ID -s xenial -r $OS_REGION_NAME -u $OS_AUTH_URL -a $NODE_ARCHES +juju metadata generate-image -d ~/simplestreams -i $T_IMAGE_ID -s trusty -r $OS_REGION_NAME -u $OS_AUTH_URL -a $NODE_ARCHES #To verify that the correct metadata files have been generated, you may run: #You should see .json files containing the details we just added on the images. diff --git a/juju/joid-configure-openstack b/juju/joid-configure-openstack index 0feebeec..47db0893 100755 --- a/juju/joid-configure-openstack +++ b/juju/joid-configure-openstack @@ -39,18 +39,19 @@ EXTERNAL_NETWORK_ID=$(openstack network show ext-net | grep " id" | awk '{print #Create private network for neutron for tenant VMs openstack network show private > /dev/null 2>&1 || openstack network create private -openstack subnet show private_subnet > /dev/null 2>&1 || neutron subnet-create private $NEUTRON_FIXED_NET_CIDR -- --name private_subnet --dns_nameservers list=true 8.8.8.8 +openstack subnet show private_subnet > /dev/null 2>&1 || openstack subnet create --network private --subnet-range $NEUTRON_FIXED_NET_CIDR --dns-nameserver 8.8.8.8 private_subnet SUBNET_ID=$(openstack subnet show private_subnet | grep " id" | awk '{print $4}') #Create router for external network and private network openstack router show provider-router > /dev/null 2>&1 || openstack router create --project-domain=$OS_PROJECT_DOMAIN_NAME --project $OS_PROJECT_NAME provider-router ROUTER_ID=$(openstack router show provider-router | grep " id" | awk '{print $4}') -neutron router-gateway-clear provider-router || true -neutron router-gateway-set $ROUTER_ID $EXTERNAL_NETWORK_ID -## make it always ok to have it indempodent. -neutron router-interface-add $ROUTER_ID $SUBNET_ID || true +openstack router set --external-gateway $EXTERNAL_NETWORK_ID --enable $ROUTER_ID || true + ## make it always ok to have it indempodent. +openstack router add subnet $ROUTER_ID $SUBNET_ID || true + +#neutron router-gateway-clear provider-router || true echo "Configuring security groups for access to ICMP, SSH and RDP by default" @@ -80,7 +81,6 @@ openstack flavor show m1.xlarge > /dev/null 2>&1 || openstack flavor create --ra echo "modifying default quotas for admin user" #Modify quotas for the tenant to allow large deployments -PROJECT_ID=`openstack quota show -f value -c project` openstack quota set --instances 400 --cores 800 --ram 404800 --secgroups 4000 --floating-ips -1 --secgroup-rules -1 $PROJECT_ID ### need to find how to change quota for the project not the tenant diff --git a/labconfig/enea/pod5/labconfig.yaml b/labconfig/enea/pod5/labconfig.yaml index 498b0a4f..a1c8a7ea 100644 --- a/labconfig/enea/pod5/labconfig.yaml +++ b/labconfig/enea/pod5/labconfig.yaml @@ -132,7 +132,7 @@ lab: osdomainname: #below section shoiuld define the jumphost. opnfv: - release: d + release: f distro: xenial type: noha openstack: pike diff --git a/labconfig/enea/pod6/labconfig.yaml b/labconfig/enea/pod6/labconfig.yaml new file mode 100644 index 00000000..193078bf --- /dev/null +++ b/labconfig/enea/pod6/labconfig.yaml @@ -0,0 +1,170 @@ +lab: + location: enea + racks: + - rack: pod6 + nodes: + - name: cn8890-24 + architecture: aarch64 + roles: [network,control] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["68:05:ca:5a:c3:a7"] + - ifname: intf1.2323 + spaces: [public] + mac: ["1c:1b:0d:e8:fa:83"] + - ifname: intf1.2324 + spaces: [storage] + mac: ["1c:1b:0d:e8:fa:83"] + - ifname: intf1.2325 + spaces: [data] + mac: ["1c:1b:0d:e8:fa:83"] + - ifname: intf1 + spaces: [floating] + mac: ["1c:1b:0d:e8:fa:83"] + power: + type: ipmi + address: 10.0.1.54 + user: ADMIN + pass: ADMIN + - name: cn8890-25 + architecture: aarch64 + roles: [network,control] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["68:05:ca:5a:c3:bc"] + - ifname: intf1.2323 + spaces: [public] + mac: ["1c:1b:0d:e8:fb:a5"] + - ifname: intf1.2324 + spaces: [storage] + mac: ["1c:1b:0d:e8:fb:a5"] + - ifname: intf1.2325 + spaces: [data] + mac: ["1c:1b:0d:e8:fb:a5"] + - ifname: intf1 + spaces: [floating] + mac: ["1c:1b:0d:e8:fb:a5"] + power: + type: ipmi + address: 10.0.1.55 + user: ADMIN + pass: ADMIN + + - name: cn8890-26 + architecture: aarch64 + roles: [network,control] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["68:05:ca:61:b9:00"] + - ifname: intf1.2323 + spaces: [public] + mac: ["1c:1b:0d:e8:fa:65"] + - ifname: intf1.2324 + spaces: [storage] + mac: ["1c:1b:0d:e8:fa:65"] + - ifname: intf1.2325 + spaces: [data] + mac: ["1c:1b:0d:e8:fa:65"] + - ifname: intf1 + spaces: [floating] + mac: ["1c:1b:0d:e8:fa:65"] + power: + type: ipmi + address: 10.0.1.56 + user: ADMIN + pass: ADMIN + + - name: cn8890-27 + architecture: aarch64 + roles: [network,control] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["68:05:ca:57:f7:16"] + - ifname: intf1.2323 + spaces: [public] + mac: ["1c:1b:0d:e8:fb:19"] + - ifname: intf1.2324 + spaces: [storage] + mac: ["1c:1b:0d:e8:fb:19"] + - ifname: intf1.2325 + spaces: [data] + mac: ["1c:1b:0d:e8:fb:19"] + - ifname: intf1 + spaces: [floating] + mac: ["1c:1b:0d:e8:fb:19"] + power: + type: ipmi + address: 10.0.1.57 + user: ADMIN + pass: ADMIN + + - name: cn8890-28 + architecture: aarch64 + roles: [network,control] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["68:05:ca:61:97:5a"] + - ifname: intf1.2323 + spaces: [public] + mac: ["1c:1b:0d:e8:fb:7d"] + - ifname: intf1.2324 + spaces: [storage] + mac: ["1c:1b:0d:e8:fb:7d"] + - ifname: intf1.2325 + spaces: [data] + mac: ["1c:1b:0d:e8:fb:7d"] + - ifname: intf1 + spaces: [floating] + mac: ["1c:1b:0d:e8:fb:7d"] + power: + type: ipmi + address: 10.0.1.58 + user: ADMIN + pass: ADMIN + floating-ip-range: 10.0.15.40,10.0.15.250,10.0.15.254,10.0.15.0/24 + ext-port: "intf1" + dns: 8.8.8.8 + osdomainname: +#below section shoiuld define the jumphost. +opnfv: + release: f + distro: xenial + type: noha + openstack: pike + sdncontroller: + - type: nosdn + storage: + - type: ceph + disk: /dev/sdb + feature: odl_l2 + spaces: + - type: admin + bridge: admin14_br0 + cidr: 192.168.11.0/24 + gateway: 192.168.11.1 + vlan: + - type: floating + cidr: 10.0.15.0/24 + gateway: 10.0.15.254 + vlan: + mac: ["00:01:73:02:36:d5"] + - type: public + cidr: 172.16.10.0/24 + gateway: + vlan: 2323 + mac: ["00:01:73:02:36:d5"] + - type: storage + cidr: 10.2.0.0/24 + gateway: + vlan: 2324 + mac: ["00:01:73:02:36:d5"] + - type: data + cidr: 10.1.0.0/24 + gateway: + vlan: 2325 + mac: ["00:01:73:02:36:d5"] diff --git a/labconfig/intel/pod19/labconfig.yaml b/labconfig/intel/pod19/labconfig.yaml new file mode 100644 index 00000000..cc6ad70e --- /dev/null +++ b/labconfig/intel/pod19/labconfig.yaml @@ -0,0 +1,171 @@ +lab: + location: intel + racks: + - rack: pod19 + nodes: + - name: rack-19-m1 + architecture: x86_64 + roles: [network,control] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["00:1E:67:FC:FC:B0"] + - ifname: intf1 + spaces: [data] + mac: ["00:1E:67:F8:6A:78"] + - ifname: intf3 + spaces: [floating] + mac: ["00:1E:67:FC:FC:AF"] + - ifname: intf2.4000 + spaces: [public] + mac: ["00:1E:67:F8:6A:79"] + - ifname: intf2 + spaces: [storage] + mac: ["00:1E:67:F8:6A:79"] + power: + type: ipmi + address: 10.10.190.11 + user: root + pass: root + - name: rack-19-m2 + architecture: x86_64 + roles: [compute,control,storage] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["00:1E:67:FE:F4:1A"] + - ifname: intf1 + spaces: [data] + mac: ["00:1E:67:F8:6A:40"] + - ifname: intf3 + spaces: [floating] + mac: ["00:1E:67:FE:F4:19"] + - ifname: intf2.4000 + spaces: [public] + mac: ["00:1E:67:F8:6A:41"] + - ifname: intf2 + spaces: [storage] + mac: ["00:1E:67:F8:6A:41"] + power: + type: ipmi + address: 10.10.190.12 + user: root + pass: root + - name: rack-19-m3 + architecture: x86_64 + roles: [compute,control,storage] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["00:1E:67:F1:5B:91"] + - ifname: intf1 + spaces: [data] + mac: ["00:1E:67:F8:69:80"] + - ifname: intf3 + spaces: [floating] + mac: ["00:1E:67:F1:5B:90"] + - ifname: intf2.4000 + spaces: [public] + mac: ["00:1E:67:F8:69:81"] + - ifname: intf2 + spaces: [storage] + mac: ["00:1E:67:F8:69:81"] + power: + type: ipmi + address: 10.10.190.13 + user: root + pass: root + - name: rack-19-m4 + architecture: x86_64 + roles: [compute,storage] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["00:1E:67:FE:F0:78"] + - ifname: intf1 + spaces: [data] + mac: ["00:1E:67:F8:6A:58"] + - ifname: intf3 + spaces: [floating] + mac: ["00:1E:67:FE:F0:77"] + - ifname: intf2.4000 + spaces: [public] + mac: ["00:1E:67:F8:6A:59"] + - ifname: intf2 + spaces: [storage] + mac: ["00:1E:67:F8:6A:59"] + power: + type: ipmi + address: 10.10.190.14 + user: root + pass: root + - name: rack-19-m5 + architecture: x86_64 + roles: [compute,storage] + nics: + - ifname: intf0 + spaces: [admin] + mac: ["00:1E:67:FC:FF:17"] + - ifname: intf1 + spaces: [data] + mac: ["00:1E:67:F8:6A:60"] + - ifname: intf3 + spaces: [floating] + mac: ["00:1E:67:FC:FF:16"] + - ifname: intf2.4000 + spaces: [public] + mac: ["00:1E:67:F8:6A:61"] + - ifname: intf2 + spaces: [storage] + mac: ["00:1E:67:F8:6A:61"] + power: + type: ipmi + address: 10.10.190.15 + user: root + pass: root + floating-ip-range: 10.10.190.40,10.10.190.250,10.10.190.1,10.10.190.0/24 + ext-port: "intf3" + dns: 8.8.8.8 + osdomainname: +opnfv: + release: d + distro: xenial + type: noha + openstack: pike + sdncontroller: + - type: nosdn + storage: + - type: ceph + disk: /dev/sdb + feature: odl_l2 + spaces: + - type: admin + bridge: brAdm + cidr: 10.10.191.0/24 + gateway: 10.10.191.1 + vlan: + - type: data + bridge: brData + cidr: 10.10.192.0/24 + gateway: + vlan: + - type: storage + bridge: brStor + cidr: 10.10.193.0/24 + gateway: + vlan: + - type: floating + bridge: brExt + cidr: 10.10.190.0/24 + gateway: + vlan: +# - type: storage +# bridge: brMgmt +# cidr: 10.10.194.0/24 +# gateway: +# vlan: 214 + - type: public + bridge: brPublic + cidr: 10.10.195.0/24 + gateway: + vlan: 4000 diff --git a/labconfig/lenovo/pod1/labconfig.yaml b/labconfig/lenovo/pod1/labconfig.yaml index ab479420..fb8637eb 100644 --- a/labconfig/lenovo/pod1/labconfig.yaml +++ b/labconfig/lenovo/pod1/labconfig.yaml @@ -13,6 +13,9 @@ lab: - ifname: intf101 spaces: [floating] mac: ["24:8a:07:3f:84:ad"] + - ifname: intf101.104 + spaces: [public] + mac: ["24:8a:07:3f:84:ad"] power: type: ipmi address: 192.0.5.125 @@ -28,6 +31,9 @@ lab: - ifname: intf101 spaces: [floating] mac: ["24:8a:07:3f:96:87"] + - ifname: intf101.104 + spaces: [public] + mac: ["24:8a:07:3f:96:87"] power: type: ipmi address: 192.0.5.126 @@ -43,6 +49,9 @@ lab: - ifname: intf101 spaces: [floating] mac: ["24:8a:07:3f:84:c5"] + - ifname: intf101.104 + spaces: [public] + mac: ["24:8a:07:3f:84:c5"] power: type: ipmi address: 192.0.5.127 @@ -58,6 +67,9 @@ lab: - ifname: intf101 spaces: [floating] mac: ["24:8a:07:3f:96:4f"] + - ifname: intf101.104 + spaces: [public] + mac: ["24:8a:07:3f:96:4f"] power: type: ipmi address: 192.0.5.128 @@ -73,6 +85,9 @@ lab: - ifname: intf101 spaces: [floating] mac: ["24:8a:07:3f:95:b7"] + - ifname: intf101.104 + spaces: [public] + mac: ["24:8a:07:3f:95:b7"] power: type: ipmi address: 192.0.5.129 @@ -83,10 +98,10 @@ lab: dns: 8.8.8.8 osdomainname: opnfv: - release: d + release: f distro: xenial type: nonha - openstack: Newton + openstack: pike sdncontroller: - type: nosdn storage: @@ -100,10 +115,13 @@ opnfv: gateway: 192.0.5.5 vlan: - type: floating - bridge: brPublic cidr: 172.21.159.0/24 gateway: 172.21.159.1 vlan: + - type: public + cidr: 172.22.159.0/24 + gateway: + vlan: 104 - type: external bridge: brExt cidr: