From: Narinder Gupta Date: Wed, 21 Dec 2016 18:24:09 +0000 (-0600) Subject: modfiied to have space support in the juju2 configuration. X-Git-Tag: danube.1.0~101 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F26391%2F2;p=joid.git modfiied to have space support in the juju2 configuration. Change-Id: I2ccdee8604ef41ef79bb76eb9a165b1c02147d10 Signed-off-by: Narinder Gupta --- diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index 1e5fcf69..b7e684f5 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -164,14 +164,14 @@ fi mkdir ~/joid_config/ || true mkdir ~/.juju/ || true -sudo mkdir -p ~maas || true -sudo chown maas:maas ~maas -if [ ! -e ~maas/.ssh/id_rsa ]; then - sudo -u maas ssh-keygen -N '' -f ~maas/.ssh/id_rsa -y +sudo mkdir -p ~/maas || true +sudo chown maas:maas ~/maas +if [ ! -e ~/maas/.ssh/id_rsa ]; then + sudo -u maas ssh-keygen -N '' -f ~/maas/.ssh/id_rsa -y fi # Ensure virsh can connect without ssh auth -sudo cat ~maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys +sudo cat ~/maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys sudo cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys # @@ -213,7 +213,7 @@ configuremaas(){ maas $PROFILE tags create name='storage' } -enablesubnetand dhcp(){ +enablesubnetanddhcp(){ SUBNET_PREFIX="192.168.122" SUBNET_CIDR="($SUBNET_PREFIX).0/24" @@ -243,7 +243,6 @@ enablesubnetand dhcp(){ maas $PROFILE subnet update $SUBNET_CIDR gateway_ip=$MY_GATEWAY maas $PROFILE subnet update $SUBNET_CIDR dns_servers=$MY_NAMESERVER - } ## derived from https://gist.github.com/epiloque/8cf512c6d64641bde388 @@ -458,6 +457,8 @@ if [ -e ./deployconfig.yaml ]; then # split EXTERNAL_NETWORK=first ip;last ip; gateway;network + maas maas spaces create internal "Using for pxe network within the lab" + if [ "$datanet" != "''" ]; then EXTNET=(${enableiflist//,/ }) i="0" @@ -466,6 +467,8 @@ if [ -e ./deployconfig.yaml ]; then enableautomode ${EXTNET[i]} AUTO $datanet || true i=$[$i+1] done + maas maas spaces create admin "Using for admin network within the lab" + fi if [ "$stornet" != "''" ]; then EXTNET=(${enableiflist//,/ }) @@ -484,6 +487,7 @@ if [ -e ./deployconfig.yaml ]; then enableautomode ${EXTNET[i]} AUTO $pubnet || true i=$[$i+1] done + maas maas spaces create public "Using for public network within the lab" fi fi diff --git a/ci/config_tpl/juju2/bundle_tpl/aodh.yaml b/ci/config_tpl/juju2/bundle_tpl/aodh.yaml index ab5f6dbb..fc5f148f 100644 --- a/ci/config_tpl/juju2/bundle_tpl/aodh.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/aodh.yaml @@ -1,6 +1,18 @@ aodh: charm: "./{{ ubuntu.release }}/aodh" num_units: 1 + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" to: diff --git a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml index 24048105..6c3eec4b 100644 --- a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml @@ -6,6 +6,18 @@ ceilometer: charm: "./{{ ubuntu.release }}/ceilometer" num_units: {{ unit_qty() }} + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" region: {{ os.region }} diff --git a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml index 412b9667..63a95d9b 100644 --- a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml @@ -70,6 +70,18 @@ ceph-radosgw: charm: "./{{ ubuntu.release }}/ceph-radosgw" num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }} + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: region: {{ os.region }} use-embedded-webserver: true diff --git a/ci/config_tpl/juju2/bundle_tpl/cinder.yaml b/ci/config_tpl/juju2/bundle_tpl/cinder.yaml index dd541f7f..18313cbb 100644 --- a/ci/config_tpl/juju2/bundle_tpl/cinder.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/cinder.yaml @@ -4,6 +4,18 @@ num_units: 1 {% else %} num_units: {{ unit_qty() }} +{% endif %} + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/congress.yaml b/ci/config_tpl/juju2/bundle_tpl/congress.yaml index 07ae71c5..8e75826a 100644 --- a/ci/config_tpl/juju2/bundle_tpl/congress.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/congress.yaml @@ -1,6 +1,18 @@ congress: charm: "./{{ ubuntu.release }}/congress" num_units: 1 + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: region: {{ os.region }} {% if ubuntu.release == 'trusty' %} diff --git a/ci/config_tpl/juju2/bundle_tpl/glance.yaml b/ci/config_tpl/juju2/bundle_tpl/glance.yaml index eb812e9a..cf535486 100644 --- a/ci/config_tpl/juju2/bundle_tpl/glance.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/glance.yaml @@ -1,6 +1,18 @@ glance: charm: "./{{ ubuntu.release }}/glance" num_units: {{ unit_qty() }} + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" region: {{ os.region }} diff --git a/ci/config_tpl/juju2/bundle_tpl/heat.yaml b/ci/config_tpl/juju2/bundle_tpl/heat.yaml index aa676f19..f6f29ef1 100644 --- a/ci/config_tpl/juju2/bundle_tpl/heat.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/heat.yaml @@ -1,6 +1,18 @@ heat: charm: "./{{ ubuntu.release }}/heat" num_units: 1 + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" region: {{ os.region }} diff --git a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml index 65c1f76c..bbb23584 100644 --- a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml @@ -1,11 +1,24 @@ keystone: charm: "./{{ ubuntu.release }}/keystone" num_units: {{ unit_qty() }} + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" region: {{ os.region }} admin-role: {{ os.admin.role }} keystone-admin-role: {{ os.admin.role }} + preferred-api-version: 3 {% if os.network.ipv6 %} prefer-ipv6: {{ os.network.ipv6 }} {% endif %} diff --git a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml index 420a0af4..c7789d82 100644 --- a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml @@ -1,6 +1,18 @@ neutron-api: charm: "./{{ ubuntu.release }}/neutron-api" num_units: {{ unit_qty() }} + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" region: {{ os.region }} diff --git a/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml b/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml index 2f9e9ab4..c240cb74 100644 --- a/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml @@ -1,6 +1,18 @@ neutron-gateway: charm: "./{{ ubuntu.release }}/neutron-gateway" num_units: 1 + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" {% if os.api.worker_multiplier %} diff --git a/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml b/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml index 2a7f8487..ef36ea78 100644 --- a/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml @@ -1,6 +1,18 @@ nova-cloud-controller: charm: "./{{ ubuntu.release }}/nova-cloud-controller" num_units: {{ unit_qty() }} + bindings: + internal: internal +{% if opnfv.spaces_dict.data is defined %} + admin: admin +{% else %} + admin: internal +{% endif %} +{% if opnfv.spaces_dict.public is defined %} + public: public +{% else %} + public: internal +{% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" region: {{ os.region }}