sudo apt-add-repository ppa:maas/stable -y
fi
if [ "bionic" != "$opnfvdistro" ]; then
- sudo apt-add-repository cloud-archive:pike -y
+ sudo apt-add-repository cloud-archive:queens -y
if [ "aarch64" == "$NODE_ARCTYPE" ]; then
- sudo add-apt-repository ppa:ubuntu-cloud-archive/pike-staging -y
+ sudo add-apt-repository ppa:ubuntu-cloud-archive/queens-staging -y
fi
fi
aodh:
charm: "./{{ ubuntu.release }}/aodh"
- num_units: 1
+ num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
"": *oam-space
{% endif %}
options:
openstack-origin: *openstack-origin
+{% if os.ha.mode == 'ha' %}
+ vip: *aodh-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_aodh_public
+ os-internal-hostname: *hostname_aodh_public
+ os-admin-hostname: *hostname_aodh_public
+{% endif %}
to:
- - "lxd:nodes/0"
+{% for unit_id in to_select() %}
+ - "lxd:nodes/{{ unit_id }}"
+{% endfor %}
{# Empty block to avoid bad block trim #}
{% include 'rabbitmq.yaml' %}
{% include 'neutron-api.yaml' %}
{% include 'heat.yaml' %}
+{% include 'designate.yaml' %}
{% if os.network.controller != 'ocl' %}
{% include 'neutron-gateway.yaml' %}
{% include 'ceilometer.yaml' %}
gnocchi:
charm: ./{{ ubuntu.release }}/gnocchi
- num_units: 1
+ num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- "": *internal-space
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
{% endif %}
options:
openstack-origin: *openstack-origin
+{% if os.ha.mode == 'ha' %}
+ vip: *gnocchi-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_gnocchi_public
+ os-internal-hostname: *hostname_gnocchi_public
+ os-admin-hostname: *hostname_gnocchi_public
+{% endif %}
to:
- - "lxd:nodes/0"
+{% for unit_id in to_select() %}
+ - "lxd:nodes/{{ unit_id }}"
+{% endfor %}
memcached:
charm: ./{{ ubuntu.release }}/memcached
- num_units: 1
+ num_units: 2
{% if os.service.bindings %}
bindings:
"": *internal-space
{% endif %}
+ options:
+ allow-ufw-ip6-softfail: True
to:
- - "lxd:nodes/0"
+ - "designate-bind/0"
+ - "designate-bind/1"
ceilometer:
charm: "./{{ ubuntu.release }}/ceilometer"
num_units: {{ unit_qty() }}
openstack-origin: *openstack-origin
region: *openstack-region
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.ceilometer }}
+ vip: *ceilometer-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_ceilometer_public
+ os-internal-hostname: *hostname_ceilometer_public
+ os-admin-hostname: *hostname_ceilometer_public
{% endif %}
to:
{% for unit_id in to_select() %}
ceph-osd-replication-count: {{ unit_ceph_qty() }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.radosgw }}
+ vip: *rados-gateway-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_radosgw_public
+ os-admin-hostname: *hostname_radosgw_public
+ os-internal-hostname: *hostname_radosgw_public
{% endif %}
to:
{% for unit_id in to_select(unit_qty()) %}
ceph-osd-replication-count: {{ unit_ceph_qty() }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.cinder }}
+ vip: *cinder-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_cinder_public
+ os-internal-hostname: *hostname_cinder_public
+ os-admin-hostname: *hostname_cinder_public
{% endif %}
to:
{% if opnfv.storage_dict.scaleio is defined %}
--- /dev/null
+ designate:
+ charm: "./{{ ubuntu.release }}/designate"
+ num_units: {{ unit_qty() }}
+{% if os.service.bindings %}
+ bindings:
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
+{% endif %}
+ options:
+ openstack-origin: *openstack-origin
+{% if os.git_repo.origin_git %}
+ openstack-origin-git: "{{ os.git_repo.branch }}"
+{% endif %}
+ region: *openstack-region
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_keystone_public
+ os-internal-hostname: *hostname_keystone_public
+ os-admin-hostname: *hostname_keystone_public
+{% endif %}
+{% if os.network.ipv6 %}
+ prefer-ipv6: {{ os.network.ipv6 }}
+{% endif %}
+{% if os.api.worker_multiplier %}
+ worker-multiplier: *worker-multiplier
+{% endif %}
+{% if os.ha.mode == 'ha' %}
+ vip: *designate-vip
+{% endif %}
+ to:
+{% for unit_id in to_select() %}
+ - "lxd:nodes/{{ unit_id }}"
+{% endfor %}
+ designate-bind:
+ charm: "./{{ ubuntu.release }}/designate-bind"
+ num_units: 2
+ bindings:
+ "": *internal-space
+ to:
+ - lxd:nodes/0
+ - lxd:nodes/1
+
ceph-osd-replication-count: {{ unit_ceph_qty() }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.glance }}
+ vip: *glance-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_glance_public
+ os-internal-hostname: *hostname_glance_public
+ os-admin-hostname: *hostname_glance_public
{% endif %}
to:
{% for unit_id in to_select() %}
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
-{% if os.beta.hacluster_ceph_radosgw %}
hacluster-ceph-radosgw:
charm: "./{{ ubuntu.release }}/hacluster"
options:
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
+ hacluster-aodh:
+ charm: "./{{ ubuntu.release }}/hacluster"
+ options:
+ corosync_transport: unicast
+ cluster_count: 3
+{% if os.network.ipv6 %}
+ prefer-ipv6: {{ os.network.ipv6 }}
+{% endif %}
+ hacluster-gnocchi:
+ charm: "./{{ ubuntu.release }}/hacluster"
+ options:
+ corosync_transport: unicast
+ cluster_count: 3
+{% if os.network.ipv6 %}
+ prefer-ipv6: {{ os.network.ipv6 }}
+{% endif %}
+ hacluster-designate:
+ charm: "./{{ ubuntu.release }}/hacluster"
+ options:
+ corosync_transport: unicast
+ cluster_count: 3
+{% if os.network.ipv6 %}
+ prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
- [ 'nova-cloud-controller:ha', 'hacluster-nova:ha' ]
- [ 'openstack-dashboard:ha', 'hacluster-horizon:ha' ]
- [ 'ceph-radosgw:ha', 'hacluster-ceph-radosgw:ha' ]
+ - [ 'aodh:ha', 'hacluster-aodh:ha' ]
+ - [ 'gnocchi:ha', 'hacluster-gnocchi:ha' ]
+ - [ 'designate:ha', 'hacluster-designate:ha' ]
{% endif %}
{% endif %}
worker-multiplier: *worker-multiplier
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.heat }}
+ vip: *heat-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_heat_public
+ os-internal-hostname: *hostname_heat_public
+ os-admin-hostname: *hostname_heat_public
{% endif %}
to:
{% for unit_id in to_select() %}
admin-role: {{ os.admin.role }}
keystone-admin-role: {{ os.admin.role }}
preferred-api-version: 3
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ #use-https: 'yes'
+ #https-service-endpoints: 'True'
+ os-public-hostname: *hostname_keystone_public
+ os-internal-hostname: *hostname_keystone_public
+ os-admin-hostname: *hostname_keystone_public
+{% endif %}
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
admin-password: {{ opnfv.admin_password | default(os.admin.password) }}
admin-token: {{ os.admin.name }}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.keystone }}
+ vip: *keystone-vip
{% endif %}
to:
{% for unit_id in to_select() %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.mysql }}
+ vip: *mysql-vip
{% endif %}
min-cluster-size: {{ unit_qty() }}
to:
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.neutron }}
+ vip: *neutron-api-vip
{% endif %}
{% if os.network.controller == 'nosdn' %}
flat-network-providers: physnet1
{% endif %}
{% if os.network.l2_population %}
l2-population: true
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_neutron_public
+ os-internal-hostname: *hostname_neutron_public
+ os-admin-hostname: *hostname_neutron_public
{% endif %}
to:
{% for unit_id in to_select() %}
{% if os.network.controller == 'nosdn' %}
bridge-mappings: physnet1:br-data
data-port: *data-port
+ #enable-local-dhcp-and-metadata: true
{% else %}
ext-port: {{ opnfv.ext_port }}
{% endif %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.nova }}
+ vip: *nova-cc-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_nova_public
+ os-internal-hostname: *hostname_nova_public
+ os-admin-hostname: *hostname_nova_public
{% endif %}
{% if opnfv.domain is defined %}
#console-proxy-ip: {{ opnfv.domain }}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- vip: {{ opnfv.vip.dashboard }}
+ vip: *dashboard-vip
+{% endif %}
+{% if os.api.ssl %}
+ ssl_ca: *ssl_ca
+ ssl_cert: *ssl_cert
+ ssl_key: *ssl_key
+ os-public-hostname: *hostname_dashboard_public
+ os-internal-hostname: *hostname_dashboard_public
+ os-admin-hostname: *hostname_dashboard_public
{% endif %}
to:
{% for unit_id in to_select() %}
- [ 'aodh:amqp', 'rabbitmq-server:amqp' ]
- [ 'aodh:shared-db', 'mysql:shared-db' ]
- [ 'aodh:identity-service', 'keystone:identity-service' ]
+ - [ designate, mysql ]
+ - [ designate, designate-bind ]
+ - [ designate, keystone ]
+ - [ designate, rabbitmq-server ]
+ - [ designate, memcached ]
{% if os.lxd %}
- [ 'nova-compute:lxd', 'lxd:lxd' ]
{% endif %}
{% endif %}
osd-journal: &osd-journal
+{% if os.ha.mode == 'ha' %}
+ # Various VIPs
+ aodh-vip: &aodh-vip {{ opnfv.vip.aodh }}
+ ceilometer-vip: &ceilometer-vip {{ opnfv.vip.ceilometer }}
+ cinder-vip: &cinder-vip {{ opnfv.vip.cinder }}
+ dashboard-vip: &dashboard-vip {{ opnfv.vip.dashboard }}
+ designate-vip: &designate-vip {{ opnfv.vip.designate }}
+ glance-vip: &glance-vip {{ opnfv.vip.glance }}
+ gnocchi-vip: &gnocchi-vip {{ opnfv.vip.gnocchi }}
+ heat-vip: &heat-vip {{ opnfv.vip.heat }}
+ keystone-vip: &keystone-vip {{ opnfv.vip.keystone }}
+ mysql-vip: &mysql-vip {{ opnfv.vip.mysql }}
+ neutron-api-vip: &neutron-api-vip {{ opnfv.vip.neutron }}
+ nova-cc-vip: &nova-cc-vip {{ opnfv.vip.nova }}
+ rados-gateway-vip: &rados-gateway-vip {{ opnfv.vip.radosgw }}
+{% endif %}
+
+{% if os.api.ssl %}
+ ssl_ca: &ssl_ca include-base64://ssl/ca.crt
+ ssl_cert: &ssl_cert include-base64://ssl/maas.crt
+ ssl_key: &ssl_key include-base64://ssl/maas.key
+
+ hostname_aodh_public: &hostname_aodh_public aodh.maas
+ hostname_ceilometer_public: &hostname_ceilometer_public ceilometer.maas
+ hostname_cinder_public: &hostname_cinder_public cinder.maas
+ hostname_dashboard_public: &hostname_dashboard_public openstack-dashboard.maas
+ hostname_designate_public: &hostname_designate_public designate.maas
+ hostname_glance_public: &hostname_glance_public glance.maas
+ hostname_gnocchi_public: &hostname_gnocchi_public gnocchi.maas
+ hostname_heat_public: &hostname_heat_public heat.maas
+ hostname_keystone_public: &hostname_keystone_public keystone.maas
+ hostname_rabbitmq: &hostname_rabbitmq rabbitmq.maas
+ hostname_neutron_public: &hostname_neutron_public neutron-api.maas
+ hostname_nova_public: &hostname_nova_public nova-cloud-controller.maas
+ hostname_radosgw_public: &hostname_radosgw_public rados-gateway.maas
+{% endif %}
+
units: {{ lab.racks[0].nodes|count }}
vip:
{% if opnfv.spaces_dict.public is defined %}
+ aodh: {{ netpublic_prefix }}33 {{ net_prefix }}33
+ ceilometer: {{ netpublic_prefix }}24 {{ net_prefix }}24
+ cinder: {{ netpublic_prefix }}29 {{ net_prefix }}29
dashboard: {{ netpublic_prefix }}21 {{ net_prefix }}21
+ designate: {{ netpublic_prefix }}32 {{ net_prefix }}32
glance: {{ netpublic_prefix }}22 {{ net_prefix }}22
+ gnocchi: {{ netpublic_prefix }}31 {{ net_prefix }}31
+ heat: {{ netpublic_prefix }}28 {{ net_prefix }}28
keystone: {{ netpublic_prefix }}23 {{ net_prefix }}23
- ceilometer: {{ netpublic_prefix }}24 {{ net_prefix }}24
mysql: {{ net_prefix }}25
- nova: {{ netpublic_prefix }}26 {{ net_prefix }}26
neutron: {{ netpublic_prefix }}27 {{ net_prefix }}27
- heat: {{ netpublic_prefix }}28 {{ net_prefix }}28
- cinder: {{ netpublic_prefix }}29 {{ net_prefix }}29
+ nova: {{ netpublic_prefix }}26 {{ net_prefix }}26
radosgw: {{ netpublic_prefix }}30 {{ net_prefix }}30
{% else %}
+ aodh: {{ net_prefix }}33
+ ceilometer: {{ net_prefix }}24
+ cinder: {{ net_prefix }}29
dashboard: {{ net_prefix }}21
+ designate: {{ net_prefix }}32
glance: {{ net_prefix }}22
+ gnocchi: {{ net_prefix }}31
+ heat: {{ net_prefix }}28
keystone: {{ net_prefix }}23
- ceilometer: {{ net_prefix }}24
mysql: {{ net_prefix }}25
- nova: {{ net_prefix }}26
neutron: {{ net_prefix }}27
- heat: {{ net_prefix }}28
- cinder: {{ net_prefix }}29
+ nova: {{ net_prefix }}26
radosgw: {{ net_prefix }}30
{% endif %}
+
ubuntu:
release: xenial
os:
- release: pike
+ release: queens
git_repo:
origin_git: False
- branch: pike
+ branch: queens
hyperconverged: True
ha:
mode: ha
api:
worker_multiplier: 1.0
haproxy_timeout: 10000
+ ssl: False
admin:
role: admin
name: admin
ipv6: False
l2_population: False
beta:
- hacluster_ceph_radosgw: True
huge_pages: False
cpu_pin: False
cpu_pin_set: all
opnfvsdn=nosdn
opnfvtype=noha
-openstack=pike
+openstack=queens
opnfvlab=default
opnfvlabfile=
opnfvrel=e
usage() { echo "Usage: $0
[-s|--sdn <nosdn|odl|ocl>]
[-t|--type <noha|ha|tip>]
- [-o|--openstack <ocata|pike>]
+ [-o|--openstack <ocata|queens>]
[-l|--lab <default|custom>]
[-f|--feature <ipv6,dpdk,lxd,dvr,openbaton,multus>]
[-d|--distro <xenial>]
config['os']['beta']['cpu_pin'] = True
if 'ocata' in extra:
config['os']['release'] = 'ocata'
+if 'pike' in extra:
+ config['os']['release'] = 'pike'
if 'trusty' in extra:
config['ubuntu']['release'] = 'trusty'
if 'ocata' in extra:
git clone -b stable/18.02 https://github.com/openstack/charm-lxd.git $distro/lxd
git clone https://github.com/openbaton/juju-charm.git $distro/openbaton
++charm pull cs:designate $distro/designate
++charm pull cs:designate-bind $distro/designate-bind
charm pull cs:memcached $distro/memcached
charm pull cs:gnocchi $distro/gnocchi
charm pull cs:$distro/aodh $distro/aodh
if [ $(juju status keystone --format=short | grep " keystone"|wc -l) == 1 ];then
unitAddress keystone 0
else
- juju config keystone | python -c "import yaml; import sys; print yaml.load(sys.stdin)['settings']['vip']['value']" | cut -d " " -f 1
+ juju config keystone vip | cut -d " " -f 1
fi
}
echo_info "Creating the openrc (OpenStack client environment scripts)"
mkdir -m 0700 -p cloud
- keystoneIp=$(keystoneIp)
- adminPasswd=$(juju config keystone | python -c "import yaml; import sys; print yaml.load(sys.stdin)['settings']['admin-password']['value']" | cut -d " " -f 1)
+ usessl=$(juju config keystone ssl_ca)
+ if [[ "$usessl" == "" ]]; then
+ usessl=no
+ else
+ usessl=yes
+ fi
+ keystoneIp=$(juju config keystone os-public-hostname | cut -d " " -f 1)
+ if [[ "$keystoneIp" == "" ]]; then
+ keystoneIp=$(keystoneIp)
+ fi
+ adminPasswd=$(juju config keystone admin-password | cut -d " " -f 1)
- v3api=`juju config keystone preferred-api-version`
+ v3api=$(juju config keystone preferred-api-version)
if [[ "$v3api" == "3" ]]; then
- configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v3 RegionOne publicURL > ~/joid_config/admin-openrc
+ if [ "$usessl" == "yes" ]; then
+ configOpenrc admin $adminPasswd admin https://$keystoneIp:5000/v3 RegionOne publicURL > ~/joid_config/admin-openrc
+ else
+ configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v3 RegionOne publicURL > ~/joid_config/admin-openrc
+ fi
chmod 0600 ~/joid_config/admin-openrc
source ~/joid_config/admin-openrc
projectid=`openstack project show admin -c id -f value`
}
configOpenrc() {
+if [ "$usessl" == "yes" ]; then
cat <<-EOF
#export OS_NO_CACHE='true'
export OS_AUTH_URL=$4
export OS_IDENTITY_API_VERSION=3
export OS_REGION_NAME=$5
export OS_INTERFACE=public
-#export OS_INSECURE=true
-#export OS_CASSL=~/joid_config/ca.pem
+export OS_CACERT=~/joid_config/keystone_juju_ca_cert.crt
EOF
+else
+cat <<-EOF
+#export OS_NO_CACHE='true'
+export OS_AUTH_URL=$4
+export OS_USER_DOMAIN_NAME=admin_domain
+export OS_PROJECT_DOMAIN_NAME=admin_domain
+export OS_USERNAME=$1
+export OS_TENANT_NAME=$3
+export OS_PROJECT_NAME=$3
+export OS_PASSWORD=$2
+export OS_IDENTITY_API_VERSION=3
+export OS_REGION_NAME=$5
+export OS_INTERFACE=public
+#export OS_CACERT=~/joid_config/bradm.etsi-ubuntu-jh.maas.pem
+EOF
+fi
}
+
+if [ "$usessl" == "yes" ]; then
+ juju scp keystone/0:/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt ~/joid_config/
+fi
+
# Create an load openrc
create_openrc
if grep -q 'virt-type: lxd' bundles.yaml; then
URLS=" \
- http://download.cirros-cloud.net/daily/20161201/cirros-dl161201-$NODE_ARCTYPE-lxc.tar.gz \
- http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-$NODE_ARCHES-root.tar.gz "
-
-else
- URLS=" \
+ http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-$NODE_ARCTYPE-lxc.tar.gz \
+ http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-$NODE_ARCHES-root.tar.gz \
http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-$NODE_ARCHES-uefi1.img \
http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-$NODE_ARCHES-uefi1.img \
http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \
http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 \
- http://download.cirros-cloud.net/daily/20161201/cirros-dl161201-$NODE_ARCTYPE-disk.img "
+ http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-$NODE_ARCTYPE-disk.img \
fi
for URL in $URLS