summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornarindergupta <narinder.gupta@canonical.com>2017-08-16 20:29:25 -0500
committernarindergupta <narinder.gupta@canonical.com>2017-08-16 20:35:46 -0500
commita3ed9667edf4cac27777eef983673b727ebbc5ee (patch)
tree765c87be903029fed09c28dfda14fe5873a6294e
parentc1982e3e96a5607e614b44f59f080eef0eac54e5 (diff)
modified to add the opensack api on seperate network.
Change-Id: I8e909778cf50bc93118b68cfc2282c113fb7d7be Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
-rwxr-xr-xci/03-maasdeploy.sh30
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/oclphase1.yaml2
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/spaces.yaml19
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml2
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml2
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml4
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml4
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml5
8 files changed, 32 insertions, 36 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index a162bfb9..a13549c8 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -253,9 +253,9 @@ configuremaas(){
#create the required spaces.
maas $PROFILE space update 0 name=default || true
- for space in unused admin-api internal-api public-api \
+ for space in admin-api internal-api public-api \
storage-access storage-cluster admin \
- tenant-data tenant-api tenant-public oam-space
+ tenant-data tenant-api tenant-public os-api
do
echo_info "Creating the space $space"
maas $PROFILE spaces create name=$space || true
@@ -279,7 +279,7 @@ configuremaas(){
setupspacenetwork(){
#get space, subnet and vlan and create accordingly.
- #for type in pxe admin data storage external floating public; do
+ #for type in admin osapi data storage external floating public; do
nettypes=`cat labconfig.json | jq '.opnfv.spaces[]'.type | cut -d \" -f 2`
for type in $nettypes; do
config_done=0
@@ -333,13 +333,13 @@ setupspacenetwork(){
fi
fi
case "$type" in
- 'pxe') JUJU_SPACE="oam-space"; DHCP='enabled' ;;
'admin') JUJU_SPACE="internal-api"; DHCP='enabled' ;;
'data') JUJU_SPACE="tenant-data"; DHCP='' ;;
'public') JUJU_SPACE="public-api"; DHCP='' ;;
'storage') JUJU_SPACE="storage-cluster"; DHCP='' ;;
'storageaccess') JUJU_SPACE="storage-data"; DHCP='' ;;
'floating') JUJU_SPACE="tenant-public"; DHCP='' ;;
+ 'osapi') JUJU_SPACE="os-api"; DHCP='' ;;
*) JUJU_SPACE='default'; DHCP='OFF'; echo_info " >>> Unknown SPACE" ;;
esac
JUJU_SPACE_ID=$(maas $PROFILE spaces read | jq -r ".[] | select(.name==\"$JUJU_SPACE\")".id)
@@ -350,7 +350,7 @@ setupspacenetwork(){
maas $PROFILE vlan update $NET_FABRIC_ID $JUJU_VLAN_VID space=$JUJU_SPACE_ID
fi
fi
- if ([ $type == "admin" ] || [ $type == "pxe" ]); then
+ if ([ $type == "admin" ]); then
# If we have a network, we create it
if ([ $NET_FABRIC_ID ]); then
# Set ranges
@@ -407,10 +407,9 @@ addnodes(){
brid=`brctl show | grep 8000 | cut -d "8" -f 1 | tr "\n" " " | tr " " " " | tr -s " "`
ADMIN_BR=`cat labconfig.json | jq '.opnfv.spaces[] | select(.type=="admin")'.bridge | cut -d \" -f 2 `
- PXE_BR=`cat labconfig.json | jq '.opnfv.spaces[] | select(.type=="admin")'.bridge | cut -d \" -f 2 `
for feature in $brid; do
- if ([ "$feature" == "$ADMIN_BR" ] || [ "$feature" == "$PXE_BR" ]); then
+ if ([ "$feature" == "$ADMIN_BR" ]); then
netw=$netw" --network bridge="$feature",model=virtio"
else
netw=$netw
@@ -487,8 +486,6 @@ addnodes(){
units=$(($units - 1));
NODE_NAME=`cat labconfig.json | jq ".lab.racks[].nodes[$units].name" | cut -d \" -f 2 `
MAC_ADDRESS=`cat labconfig.json | jq ".lab.racks[].nodes[$units].nics[] | select(.spaces[]==\"admin\").mac"[0] | cut -d \" -f 2 `
- MAC_ADDRESS_PXE=`cat labconfig.json | jq ".lab.racks[].nodes[$units].nics[] | select(.spaces[]==\"pxe\").mac"[0] | cut -d \" -f 2 `
- #MAC_ADDRESS1=`cat labconfig.json | jq ".lab.racks[].nodes[$units].nics[] | select(.spaces[]==\"floating\").mac"[0] | cut -d \" -f 2 `
POWER_TYPE=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.type" | cut -d \" -f 2 `
POWER_IP=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.address" | cut -d \" -f 2 `
POWER_USER=`cat labconfig.json | jq ".lab.racks[].nodes[$units].power.user" | cut -d \" -f 2 `
@@ -506,17 +503,10 @@ addnodes(){
NODE_ARC="$NODE_ARCHES/generic"
echo_info "Creating node $NODE_NAME"
- if ([ $MAC_ADDRESS_PXE ] && ["$MAC_ADDRESS_PXE" != "null" ]); then
- maas $PROFILE machines create autodetect_nodegroup='yes' name=$NODE_NAME \
- hostname=$NODE_NAME power_type=$POWER_TYPE power_parameters_power_address=$POWER_IP \
- power_parameters_power_user=$POWER_USER power_parameters_power_pass=$POWER_PASS \
- mac_addresses=$MAC_ADDRESS_PXE architecture=$NODE_ARC
- else
- maas $PROFILE machines create autodetect_nodegroup='yes' name=$NODE_NAME \
- hostname=$NODE_NAME power_type=$POWER_TYPE power_parameters_power_address=$POWER_IP \
- power_parameters_power_user=$POWER_USER power_parameters_power_pass=$POWER_PASS \
- mac_addresses=$MAC_ADDRESS architecture=$NODE_ARC
- fi
+ maas $PROFILE machines create autodetect_nodegroup='yes' name=$NODE_NAME \
+ hostname=$NODE_NAME power_type=$POWER_TYPE power_parameters_power_address=$POWER_IP \
+ power_parameters_power_user=$POWER_USER power_parameters_power_pass=$POWER_PASS \
+ mac_addresses=$MAC_ADDRESS architecture=$NODE_ARC
done
fi
diff --git a/ci/config_tpl/juju2/bundle_tpl/oclphase1.yaml b/ci/config_tpl/juju2/bundle_tpl/oclphase1.yaml
index 588eeb2b..e27b0d48 100644
--- a/ci/config_tpl/juju2/bundle_tpl/oclphase1.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/oclphase1.yaml
@@ -105,7 +105,7 @@
charm: ./{{ ubuntu.release }}/contrail-keystone-auth
num_units: 1
bindings:
- "": internal-api
+ "": *oam-space
to:
- "lxd:nodes/0"
diff --git a/ci/config_tpl/juju2/bundle_tpl/spaces.yaml b/ci/config_tpl/juju2/bundle_tpl/spaces.yaml
index 63f624f3..73096ef5 100644
--- a/ci/config_tpl/juju2/bundle_tpl/spaces.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/spaces.yaml
@@ -11,24 +11,29 @@
data-port: &data-port br-data:{{ opnfv.ext_port }}
# OAM - Operations, Administration and Maintenance
-{% if opnfv.spaces_dict.pxe is defined %}
- oam-space: &oam-space oam-space
-{% else %}
oam-space: &oam-space internal-api
-{% endif %}
+ # This is OpenStack Internal network; for internalURL endpoints
# This is OpenStack Admin network; for adminURL endpoints
+{% if opnfv.spaces_dict.osapi is defined %}
+ internal-space: &internal-space os-api
+ admin-space: &admin-space os-api
+{% else %}
+ internal-space: &internal-space internal-api
admin-space: &admin-space internal-api
+{% endif %}
+
# This is OpenStack Public network; for publicURL endpoints
{% if opnfv.spaces_dict.public is defined %}
public-space: &public-space public-api
{% else %}
+{% if opnfv.spaces_dict.osapi is defined %}
+ public-space: &public-space os-api
+{% else %}
public-space: &public-space internal-api
{% endif %}
-
- # This is OpenStack Internal network; for internalURL endpoints
- internal-space: &internal-space internal-api
+{% endif %}
# This is the overlay network
{% if opnfv.spaces_dict.data is defined %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
index ea46e424..87802a0e 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/easyrsa.yaml
@@ -3,7 +3,7 @@
num_units: 1
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *oam-space
{% endif %}
to:
{% if k8.network.controller == 'ovn' %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
index d902adf8..0908e3a1 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/etcd.yaml
@@ -11,7 +11,7 @@
{% endif %}
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *oam-space
{% endif %}
to:
{% if k8.network.controller == 'ovn' %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml b/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml
index 561e0880..79b89c7f 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/flannel.yaml
@@ -3,5 +3,5 @@
charm: cs:~containers/flannel
{% if os.service.bindings %}
bindings:
- "": internal-api
-{% endif %} \ No newline at end of file
+ "": *oam-space
+{% endif %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
index 933c1ef7..645ab157 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/kubernetes.yaml
@@ -4,7 +4,7 @@
expose: true
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *oam-space
{% endif %}
{% if k8.network.controller == 'ovn' %}
options:
@@ -23,7 +23,7 @@
expose: true
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *oam-space
{% endif %}
{% if k8.network.controller == 'ovn' %}
options:
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml b/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml
index 978c07c9..98def5ae 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/ovn.yaml
@@ -3,7 +3,8 @@
charm: "cs:~aakashkt/ovn-15"
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *oam-space
{% endif %}
options:
- gateway-physical-interface: "none" \ No newline at end of file
+ gateway-physical-interface: "none"
+