summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/02-deploybundle.sh3
-rw-r--r--ci/config_tpl/deployconfig.yaml2
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml3
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/ceph.yaml4
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/cinder.yaml4
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/glance.yaml4
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/heat.yaml3
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/keystone.yaml3
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml4
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml4
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/nova-compute.yaml1
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml3
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/subordinate.yaml1
-rw-r--r--ci/config_tpl/juju2/deployconfig.yaml4
-rw-r--r--ci/config_tpl/juju2/public-api-proxy.yaml14
-rw-r--r--ci/config_tpl/public-api-proxy.yaml14
-rw-r--r--ci/default_deployment_config.yaml1
-rwxr-xr-xci/deploy.sh26
-rw-r--r--ci/genBundle.py2
-rw-r--r--ci/genPublicAPIProxyBundle.py111
-rwxr-xr-xci/nosdn/fetch-charms.sh6
-rwxr-xr-xci/openstack.sh72
22 files changed, 4 insertions, 285 deletions
diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh
index 0d4166e5..b88bb2b0 100755
--- a/ci/02-deploybundle.sh
+++ b/ci/02-deploybundle.sh
@@ -133,9 +133,6 @@ if [[ "$opnfvmodel" = "openstack" ]]; then
#update source if trusty is target distribution
var=os-$opnfvsdn-$fea-$opnfvtype"-"$opnfvdistro"_"$openstack
- if ([ $osdomname ] && [ $osdomname != "null" ] && [ $osdomname != "None" ]); then
- var=$var"_"publicapi
- fi
else
var=k8-$opnfvsdn-$fea-baremetal-core
fi
diff --git a/ci/config_tpl/deployconfig.yaml b/ci/config_tpl/deployconfig.yaml
index 8800f302..492c6606 100644
--- a/ci/config_tpl/deployconfig.yaml
+++ b/ci/config_tpl/deployconfig.yaml
@@ -15,12 +15,10 @@ opnfv:
{% set netdata_prefix = opnfv.spaces_dict.data.cidr[:-4] %}
dataNetwork: {{ opnfv.spaces_dict.data.cidr }}
{% endif %}
- domain: {{ lab.racks[0].osdomainname }}
ext-port: {{ lab.racks[0]['ext-port'] }}
ext_port: {{ lab.racks[0]['ext-port'] }}
floating-ip-range: {{ lab.racks[0]['floating-ip-range'] }}
interface-enable: {{ lab.racks[0].ifnamelist }}
- os-domain-name: {{ lab.racks[0].osdomainname }}
{% if opnfv.spaces_dict.public is defined %}
{% set netpublic_prefix = opnfv.spaces_dict.public.cidr[:-4] %}
publicNetwork: {{ opnfv.spaces_dict.public.cidr }}
diff --git a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
index de6a1214..49bd4f7d 100644
--- a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
@@ -24,9 +24,6 @@
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.ceilometer }}
{% endif %}
-{% if os.beta.public_api %}
- os-public-hostname: api.{{ opnfv.domain }}
-{% endif %}
to:
{% for unit_id in to_select() %}
- "lxd:nodes/{{ unit_id }}"
diff --git a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
index 1b032ab8..0bd600aa 100644
--- a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
@@ -9,9 +9,7 @@
cluster: *ceph-cluster-space
{% endif %}
options:
- monitor-count: {{ unit_ceph_qty() }}
- fsid: ecbb8960-0e21-11e2-b495-83a88f44db01
- monitor-secret: AQD1P2xQiKglDhAA4NGUF5j38Mhq56qwz+45wg==
+ expceted-osd-count: {{ unit_ceph_qty() }}
source: *openstack-origin
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
diff --git a/ci/config_tpl/juju2/bundle_tpl/cinder.yaml b/ci/config_tpl/juju2/bundle_tpl/cinder.yaml
index 0313f07c..12b6acc6 100644
--- a/ci/config_tpl/juju2/bundle_tpl/cinder.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/cinder.yaml
@@ -22,7 +22,6 @@
region: *openstack-region
block-device: None
glance-api-version: 2
- use-internal-endpoints: True
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
@@ -35,9 +34,6 @@
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.cinder }}
{% endif %}
-{% if os.beta.public_api %}
- os-public-hostname: api.{{ opnfv.domain }}
-{% endif %}
to:
{% if opnfv.storage_dict.scaleio is defined %}
- "nodes/0"
diff --git a/ci/config_tpl/juju2/bundle_tpl/glance.yaml b/ci/config_tpl/juju2/bundle_tpl/glance.yaml
index 725c436e..e765bc30 100644
--- a/ci/config_tpl/juju2/bundle_tpl/glance.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/glance.yaml
@@ -14,7 +14,6 @@
openstack-origin: *openstack-origin
worker-multiplier: *worker-multiplier
region: *openstack-region
- use-internal-endpoints: True
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
@@ -27,9 +26,6 @@
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.glance }}
{% endif %}
-{% if os.beta.public_api %}
- os-public-hostname: api.{{ opnfv.domain }}
-{% endif %}
to:
{% for unit_id in to_select() %}
- "lxd:nodes/{{ unit_id }}"
diff --git a/ci/config_tpl/juju2/bundle_tpl/heat.yaml b/ci/config_tpl/juju2/bundle_tpl/heat.yaml
index e5e33605..175283ce 100644
--- a/ci/config_tpl/juju2/bundle_tpl/heat.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/heat.yaml
@@ -19,9 +19,6 @@
{% if os.ha.mode == 'ha' %}
# vip: {{ opnfv.vip.heat }}
{% endif %}
-{% if os.beta.public_api %}
-# os-public-hostname: api.{{ opnfv.domain }}
-{% endif %}
to:
- "lxd:nodes/0"
{# Empty block to avoid bad block trim #}
diff --git a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
index 22912e68..1c6b78f6 100644
--- a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
@@ -29,9 +29,6 @@
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.keystone }}
{% endif %}
-{% if os.beta.public_api %}
- os-public-hostname: api.{{ opnfv.domain }}
-{% endif %}
to:
{% for unit_id in to_select() %}
- "lxd:nodes/{{ unit_id }}"
diff --git a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml
index d3b3be5b..e59530c1 100644
--- a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml
@@ -16,7 +16,6 @@
{% endif %}
region: *openstack-region
neutron-security-groups: true
- use-internal-endpoints: True
worker-multiplier: *worker-multiplier
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
@@ -39,9 +38,6 @@
flat-network-providers: physnet1
manage-neutron-plugin-legacy-mode: False
{% endif %}
-{% if os.beta.public_api %}
- os-public-hostname: api.{{ opnfv.domain }}
-{% endif %}
{% if os.network.dvr %}
enable-dvr: true
{% endif %}
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 1c373b92..bfb4c27d 100644
--- a/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml
@@ -21,7 +21,6 @@
worker-multiplier: *worker-multiplier
single-nova-consoleauth: False
network-manager: Neutron
- use-internal-endpoints: true
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
@@ -31,9 +30,6 @@
{% if opnfv.domain is defined %}
#console-proxy-ip: {{ opnfv.domain }}
{% endif %}
-{% if os.beta.public_api %}
- os-public-hostname: api.{{ opnfv.domain }}
-{% endif %}
to:
{% for unit_id in to_select() %}
- "lxd:nodes/{{ unit_id }}"
diff --git a/ci/config_tpl/juju2/bundle_tpl/nova-compute.yaml b/ci/config_tpl/juju2/bundle_tpl/nova-compute.yaml
index fe3a7224..3c3a7200 100644
--- a/ci/config_tpl/juju2/bundle_tpl/nova-compute.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/nova-compute.yaml
@@ -20,7 +20,6 @@
enable-live-migration: True
enable-resize: True
migration-auth-type: ssh
- use-internal-endpoints: True
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
diff --git a/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml b/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml
index 9132096e..87fe85e9 100644
--- a/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml
@@ -24,9 +24,6 @@
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.dashboard }}
{% endif %}
-{% if os.beta.public_api %}
- endpoint-type: internalURL
-{% endif %}
to:
{% for unit_id in to_select() %}
- "lxd:nodes/{{ unit_id }}"
diff --git a/ci/config_tpl/juju2/bundle_tpl/subordinate.yaml b/ci/config_tpl/juju2/bundle_tpl/subordinate.yaml
index 59469aef..488462fe 100644
--- a/ci/config_tpl/juju2/bundle_tpl/subordinate.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/subordinate.yaml
@@ -4,7 +4,6 @@
charm: ./{{ ubuntu.release }}/ceilometer-agent
options:
openstack-origin: *openstack-origin
- use-internal-endpoints: true
{% endif %}
{% if opnfv.storage_dict.ceph is defined %}
cinder-ceph:
diff --git a/ci/config_tpl/juju2/deployconfig.yaml b/ci/config_tpl/juju2/deployconfig.yaml
index 81426091..8e7d3a05 100644
--- a/ci/config_tpl/juju2/deployconfig.yaml
+++ b/ci/config_tpl/juju2/deployconfig.yaml
@@ -15,10 +15,6 @@ opnfv:
{% set netdata_prefix = opnfv.spaces_dict.data.cidr[:-4] %}
dataNetwork: {{ opnfv.spaces_dict.data.cidr }}
{% endif %}
-{% if lab.racks[0].osdomainname is defined %}
- domain: {{ lab.racks[0].osdomainname }}
- os-domain-name: {{ lab.racks[0].osdomainname }}
-{% endif %}
ext-port: {{ lab.racks[0]['ext-port'] }}
ext_port: {{ lab.racks[0]['ext-port'] }}
floating-ip-range: {{ lab.racks[0]['floating-ip-range'] }}
diff --git a/ci/config_tpl/juju2/public-api-proxy.yaml b/ci/config_tpl/juju2/public-api-proxy.yaml
deleted file mode 100644
index 02299aec..00000000
--- a/ci/config_tpl/juju2/public-api-proxy.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
- haproxy:
- charm: "local:{{ opnfv.distro }}/haproxy"
- num_units: 1
- options:
- services: |-
-{% for service in public_api_services.values() %}
- - service_name: {{ service.name }}
- service_host: {{ public_api_ip }}
- service_port: {{ service.port }}
- service_options: [mode http, balance leastconn]
- servers: [[{{ service.name }}, {{ service.ip }}, {{ service.port }}, 'maxconn 100 cookie S0 check']]
-{% endfor %}
- to:
- - "nodes=0"
diff --git a/ci/config_tpl/public-api-proxy.yaml b/ci/config_tpl/public-api-proxy.yaml
deleted file mode 100644
index 02299aec..00000000
--- a/ci/config_tpl/public-api-proxy.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
- haproxy:
- charm: "local:{{ opnfv.distro }}/haproxy"
- num_units: 1
- options:
- services: |-
-{% for service in public_api_services.values() %}
- - service_name: {{ service.name }}
- service_host: {{ public_api_ip }}
- service_port: {{ service.port }}
- service_options: [mode http, balance leastconn]
- servers: [[{{ service.name }}, {{ service.ip }}, {{ service.port }}, 'maxconn 100 cookie S0 check']]
-{% endfor %}
- to:
- - "nodes=0"
diff --git a/ci/default_deployment_config.yaml b/ci/default_deployment_config.yaml
index 9a068177..6d66ba71 100644
--- a/ci/default_deployment_config.yaml
+++ b/ci/default_deployment_config.yaml
@@ -28,7 +28,6 @@ os:
l2_population: False
beta:
hacluster_ceph_radosgw: False
- public_api: False
huge_pages: False
cpu_pin: False
cpu_pin_set: all
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 066b457b..b004885d 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -304,32 +304,6 @@ echo_info "Configuring public access"
# translate bundle.yaml to json
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < bundles.yaml > bundles.json
-public_service() {
- # get services list having a public interface
- srv_list=$(cat bundles.json | jq -r ".services | to_entries[] | {\"key\": .key, \"value\": .value[\"bindings\"]} | select (.value!=null) | select(.value[] | contains(\"public-api\"))".key)
- # get cnt list from service list
- cnt_list=$(for cnt in $srv_list; do juju status $cnt --format=json | jq -r ".machines[].containers | to_entries[]".key; done)
- # get public network gateway (supposing it is the first ip of the network)
- public_api_gw=$(cat labconfig.json | jq --raw-output ".opnfv.spaces[] | select(.type==\"public\")".gateway)
- admin_gw=$(cat labconfig.json | jq --raw-output ".opnfv.spaces[] | select(.type==\"admin\")".gateway)
-
- if ([ $admin_gw ] && [ $admin_gw != "null" ]); then
- # set default gateway to public api gateway
- for cnt in $cnt_list; do
- echo_info "Changing default gateway on $cnt"
- if ([ $public_api_gw ] && [ $public_api_gw != "null" ]); then
- juju ssh $cnt "sudo ip r d default && sudo ip r a default via $public_api_gw";
- juju ssh $cnt "gw_dev=\$(ip r l | grep 'via $public_api_gw' | cut -d \ -f5) &&\
- sudo cp /etc/network/interfaces /etc/network/interfaces.bak &&\
- echo 'removing old default gateway' &&\
- sudo perl -i -pe 's/^\ *gateway $admin_gw\n$//' /etc/network/interfaces &&\
- sudo perl -i -pe \"s/iface \$gw_dev inet static/iface \$gw_dev inet static\\n gateway $public_api_gw/\" /etc/network/interfaces \
- ";
- fi
- done
- fi
-}
-
# Configuring deployment
if ([ $opnfvmodel == "openstack" ]); then
echo_info "Configuring OpenStack deployment"
diff --git a/ci/genBundle.py b/ci/genBundle.py
index 78dfae04..1bd09bb0 100644
--- a/ci/genBundle.py
+++ b/ci/genBundle.py
@@ -201,8 +201,6 @@ if 'openbaton' in features:
# Set beta option from extra
-if 'publicapi' in extra:
- config['os']['beta']['public_api'] = True
if 'radosgwcluster' in extra:
config['os']['beta']['hacluster_ceph_radosgw'] = True
if 'hugepages' in extra:
diff --git a/ci/genPublicAPIProxyBundle.py b/ci/genPublicAPIProxyBundle.py
deleted file mode 100644
index 87acee2c..00000000
--- a/ci/genPublicAPIProxyBundle.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-"""
-This script generates a bundle config for the haproxy managing public apis
-
-Parameters:
- -l, --lab : lab config file
-"""
-
-from jinja2 import Environment, FileSystemLoader
-from keystoneauth1.identity import v2
-from keystoneauth1 import session
-from keystoneclient.v2_0 import client
-from optparse import OptionParser
-
-import os
-import yaml
-
-#
-# Parse parameters
-#
-
-parser = OptionParser()
-parser.add_option("-l", "--lab", dest="lab", help="lab config file")
-(options, args) = parser.parse_args()
-labconfig_file = options.lab
-
-#
-# Set Path and configs path
-#
-
-# Capture our current directory
-TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl'
-
-#
-# Local Functions
-#
-
-
-def load_yaml(filepath):
- """Load YAML file"""
- with open(filepath, 'r') as stream:
- try:
- return yaml.load(stream)
- except yaml.YAMLError as exc:
- print(exc)
-
-#
-# Config import
-#
-
-# Load scenario Config
-config = load_yaml(labconfig_file)
-
-# Add public api ip to config
-if 'public_api_ip' in config['lab']['racks'][0]:
- config['public_api_ip'] = config['lab']['racks'][0]['public_api_ip']
-else:
- first_public_ip = config['lab']['racks'][0][
- 'floating-ip-range'].split(',')[0]
- # managing ipv6 and ipv4 format
- sep = ':' if ':' in first_public_ip else '.'
- api_ip = first_public_ip.split(sep)
- api_ip[-1] = str(int(api_ip[-1])-1)
- config['public_api_ip'] = sep.join(api_ip)
-
-# get endpoint list from keystone
-username = os.environ['OS_USERNAME']
-password = os.environ['OS_PASSWORD']
-tenant_name = os.environ['OS_TENANT_NAME']
-auth_url = os.environ['OS_AUTH_URL']
-auth = v2.Password(username=username,
- password=password,
- tenant_name=tenant_name,
- auth_url=auth_url)
-sess = session.Session(auth=auth)
-keystone = client.Client(session=sess)
-services = keystone.services.list()
-endpoints = keystone.endpoints.list()
-srv = dict()
-for service in services:
- if service.name != 'cinderv2':
- srv[service.id] = {'name': service.name}
-for endpoint in endpoints:
- if endpoint.service_id in srv.keys():
- internal = endpoint.internalurl.split('/')[2].split(':')
- srv[endpoint.service_id]['ip'] = ':'.join(internal[:-1])
- srv[endpoint.service_id]['port'] = internal[-1]
-config['public_api_services'] = srv
-
-#
-# Transform template to deployconfig.yaml according to config
-#
-
-# Create the jinja2 environment.
-env = Environment(loader=FileSystemLoader(TPL_DIR),
- trim_blocks=True)
-template = env.get_template('public-api-proxy.yaml')
-
-# Render the template
-output = template.render(**config)
-
-# Check output syntax
-try:
- yaml.load(output)
-except yaml.YAMLError as exc:
- print(exc)
-
-# print output
-print(output)
diff --git a/ci/nosdn/fetch-charms.sh b/ci/nosdn/fetch-charms.sh
index 4a218da4..c3131c6b 100755
--- a/ci/nosdn/fetch-charms.sh
+++ b/ci/nosdn/fetch-charms.sh
@@ -11,8 +11,6 @@ function build {
# openstack
bzr branch lp:~narindergupta/charms/trusty/promise/trunk $distro/promise
-bzr branch lp:~billy-olsen/charms/xenial/mongodb/trunk $distro/mongodb
-bzr branch lp:~narindergupta/opnfv/ntp $distro/ntp
git clone https://github.com/openstack/charm-hacluster.git $distro/hacluster
git clone https://github.com/openstack/charm-ceilometer.git $distro/ceilometer
@@ -37,7 +35,9 @@ git clone https://github.com/openstack/charm-lxd.git $distro/lxd
git clone https://github.com/openbaton/juju-charm.git $distro/openbaton
charm pull cs:$distro/aodh $distro/aodh
-charm pull cs:~free.ekanayaka/xenial/haproxy-1 $distro/haproxy
+charm pull cs:$distro/mongodb $distro/mongodb
+charm pull cs:$distro/ntp $distro/ntp
+charm pull cs:$distro/haproxy $distro/haproxy
charm pull cs:~narindergupta/congress-1 $distro/congress
#pulling scaleio charms.
diff --git a/ci/openstack.sh b/ci/openstack.sh
index 151e60e7..6b819cd5 100755
--- a/ci/openstack.sh
+++ b/ci/openstack.sh
@@ -32,7 +32,6 @@ if [ -f ./deployconfig.yaml ];then
EXTNET_NET=${EXTNET[3]}
EXTNET_PORT=`grep "ext-port" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
ADMNET_GW=`grep "admNetgway" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
- API_FQDN=`grep "os-domain-name" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
fi
# launch eth on computer nodes and remove default gw route
@@ -144,82 +143,11 @@ export OS_IMAGE_API_VERSION=2
EOF
}
-if ([ $API_FQDN ] && [ $API_FQDN != "null" ] && [ $API_FQDN != "None" ]); then
- echo_info "OS domain name was specified - injecting API FQDN to nodes"
-
- # Push api fqdn local ip to all /etc/hosts
- if [[ "$jujuver" < "2" ]]; then
- API_FQDN=$(juju get keystone | python -c "import yaml; import sys;\
- print yaml.load(sys.stdin)['settings']['os-public-hostname']['value']")
- else
- API_FQDN=$(juju config keystone | python -c "import yaml; import sys;\
- print yaml.load(sys.stdin)['settings']['os-public-hostname']['value']")
- fi
-
-
- KEYSTONEIP=$(keystoneIp)
- juju run --all "if grep $API_FQDN /etc/hosts > /dev/null; then \
- echo 'API FQDN already present'; \
- else \
- sudo sh -c 'echo $KEYSTONEIP $API_FQDN >> /etc/hosts'; \
- echo 'API FQDN injected'; \
- fi"
-
- # remove this enhancement for heat that does not manage endpoints
- juju run --application=heat "cp /etc/hosts /tmp/hosts ; \
- grep -v $API_FQDN /tmp/hosts > /etc/hosts"
-
- #change in jumphost as well as below commands will run on jumphost
- if grep $API_FQDN /etc/hosts; then
- echo 'API FQDN already present'
- else
- sudo sh -c "echo $KEYSTONEIP $API_FQDN >> /etc/hosts"
- echo 'API FQDN injected'
- fi
-fi
-
# Create an load openrc
create_openrc
. ~/joid_config/admin-openrc
-if ([ "$opnfvlab" == "orangepod1" ] \
- || [ "$opnfvlab" == "intelpod6" ]) \
- && [ "$opnfvsdn" == "nosdn" ] \
- && [ "$API_FQDN" != "None" ]; then # only for first test phase
- if [ -e ./labconfig.yaml ]; then
- echo_info "Deploying public API proxy"
-
- PUB_API_MASK=$(grep floating-ip-range ./labconfig.yaml |cut -d/ -f2)
- PUB_API_NET=$(grep floating-ip-range ./labconfig.yaml |cut -d, -f4)
- PUB_API_IP=$(grep public-api-ip ./labconfig.yaml |cut -d: -f2)
- if grep "- type: public" ./labconfig.yaml; then
- # The public network exists on MAAS, so we push the dns record to it
-
- # Recover maas ips and login to it
- maas_ip=$(grep " ip_address" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //')
- maas_pubip=$(grep floating-ip-range ./labconfig.yaml |cut -d, -f4 |perl -pe 's!^(.*)\.\d+/\d+$!$1.5!')
- apikey=$(grep maas-oauth: environments.yaml | cut -d "'" -f 2)
- maas login maas http://${maas_ip}/MAAS/api/1.0 ${apikey}
-
- # Configure maas to add the record
- CLUSTER_UUID=$(maas ubuntu node-groups list | grep uuid | cut -d\" -f4)
- PUBLIC_MAAS_IF=$(maas ubuntu node-group-interfaces list $cluster_uuid |\
- python -c "import yaml; import sys; cfg=yaml.load(sys.stdin); net_h={net['ip']:net['name'] for net in cfg}; print(net_h['$maas_pubip'])")
- maas maas node-group-interface update ${CLUSTER_UUID} ${PUBLIC_MAAS_IF} static_ip_range_high=${PUB_API_IP} static_ip_range_low=${PUB_API_IP}
- maas maas ipaddresses reserve network=${PUB_API_NET} requested_address=${PUB_API_IP} hostname=${API_FQDN}
- dig ${PUB_API_IP} @${maas_ip} # just for log
- fi
- juju run --unit nodes/0 "sudo ip a a ${PUB_API_IP}/${PUB_API_MASK} dev br-ex" || true
- juju run --unit nodes/0 "sudo ip l set dev br-ex up" || true
- python genPublicAPIProxyBundle.py -l labconfig.yaml >> bundles.yaml
- juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$opnfvos" || true
-
- echo_info "Public API proxy deployed!"
- fi
-fi
-
-
##
## removing the swift API endpoint which is created by radosgw.
## one option is not to used radosgw and other one is remove endpoint.