templates and added support for multiple networks.
Change-Id: I1074c722c9007bd12c711dbfc58afa1a098d2a17
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
if [ "$virtinstall" -eq 1 ]; then
netw=" --network bridge=virbr0,model=virtio"
- elif ([ $VIRSHHOST != "" ]); then
+ elif ([ "$VIRSHHOST" != "" ]); then
# Get the bridge hosting the remote virsh
brid=$(ssh $VIRSHHOST "ip a l | grep $VIRSHHOST | perl -pe 's/.* (.*)\$/\$1/g'")
netw=" --network bridge=$brid,model=virtio"
num_units: 1
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
to:
- "lxd:nodes/0"
{# Empty block to avoid bad block trim #}
# vim: set ts=2 et:
series: {{ ubuntu.release }}
+ variables:
+{% include 'spaces.yaml' %}
services:
{% if os.hyperconverged %}
nodes:
num_units: 1
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *internal-space
{% endif %}
to:
- "lxd:nodes/0"
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- shared-db: internal-api
- internal: internal-api
- admin: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
- region: {{ os.region }}
+ openstack-origin: *openstack-origin
+ region: *openstack-region
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.ceilometer }}
{% endif %}
num_units: {{ unit_ceph_qty() }}
{% if os.service.bindings %}
bindings:
- "": internal-api
-{% if opnfv.spaces_dict.storage is defined %}
- cluster: storage-cluster
-{% endif %}
+ "": *oam-space
+ public: *ceph-public-space
{% endif %}
options:
monitor-count: {{ unit_ceph_qty() }}
fsid: ecbb8960-0e21-11e2-b495-83a88f44db01
monitor-secret: AQD1P2xQiKglDhAA4NGUF5j38Mhq56qwz+45wg==
-{% if ubuntu.release == 'trusty' and os.release < 'newton' %}
- source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
- source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% endif %}
+ source: *openstack-origin
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% endif %}
{% if os.service.bindings %}
bindings:
- "": internal-api
-{% if opnfv.spaces_dict.storage is defined %}
- cluster: storage-cluster
-{% endif %}
+ "": *oam-space
+ public: *ceph-public-space
+ cluster: *ceph-cluster-space
{% endif %}
options:
-{% if os.lxd %}
- osd-devices: /srv/ceph-osd
-{% else %}
- osd-devices: {{ opnfv.storage_dict.ceph.disk }}
-{% endif %}
+ osd-devices: *osd-devices
+ osd-journal: *osd-journal
osd-reformat: 'yes'
-{% if ubuntu.release == 'trusty' and os.release < 'newton' %}
- source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
- source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% endif %}
+ source: *openstack-origin
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
{% if os.service.bindings %}
bindings:
- "": internal-api
- internal: internal-api
- admin: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ mon: *ceph-public-space
{% endif %}
options:
- region: {{ os.region }}
+ region: *openstack-region
operator-roles: "Member,admin"
-{% if ubuntu.release == 'trusty' and os.release < 'newton' %}
- source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
- source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% endif %}
+ source: *openstack-origin
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% endif %}
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
- region: {{ os.region }}
+ region: *openstack-region
block-device: None
glance-api-version: 2
{% if os.beta.public_api %}
- use-internal-endpoints: true
+ use-internal-endpoints: True
{% endif %}
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.api.worker_multiplier %}
- worker-multiplier: {{ os.api.worker_multiplier }}
+ worker-multiplier: *worker-multiplier
{% endif %}
{% if opnfv.storage_dict.ceph is defined %}
ceph-osd-replication-count: {{ unit_ceph_qty() }}
num_units: 1
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ internal: *internal-space
+ admin: *admin-space
+ shared-db: *internal-space
+ public: *public-space
{% endif %}
options:
- region: {{ os.region }}
+ region: *openstack-region
{% if ubuntu.release == 'trusty' %}
source-branch: "stable/{{ os.release }}"
{% endif %}
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
+ worker-multiplier: *worker-multiplier
+ region: *openstack-region
+{% if os.beta.public_api %}
+ use-internal-endpoints: True
+{% endif %}
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
-{% endif %}
- region: {{ os.region }}
-{% if os.beta.public_api %}
- use-internal-endpoints: true
{% endif %}
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% if opnfv.storage_dict.ceph is defined %}
ceph-osd-replication-count: {{ unit_ceph_qty() }}
{% endif %}
-{% if os.api.worker_multiplier %}
- worker-multiplier: {{ os.api.worker_multiplier }}
-{% endif %}
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.glance }}
{% endif %}
num_units: 1
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
- region: {{ os.region }}
+ openstack-origin: *openstack-origin
+ region: *openstack-region
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
-{% if os.api.worker_multiplier %}
- worker-multiplier: {{ os.api.worker_multiplier }}
-{% endif %}
+ worker-multiplier: *worker-multiplier
{% if os.ha.mode == 'ha' %}
# vip: {{ opnfv.vip.heat }}
{% endif %}
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
- region: {{ os.region }}
+ region: *openstack-region
admin-role: {{ os.admin.role }}
keystone-admin-role: {{ os.admin.role }}
preferred-api-version: 3
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.api.worker_multiplier %}
- worker-multiplier: {{ os.api.worker_multiplier }}
+ worker-multiplier: *worker-multiplier
{% endif %}
admin-password: {{ opnfv.admin_password | default(os.admin.password) }}
admin-token: {{ os.admin.name }}
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- access: internal-api
- shared-db: internal-api
+ "": *oam-space
+ cluster: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
-{% if os.ha.mode == 'ha' %}
- innodb-buffer-pool-size: 1G
- max-connections: 4000
-{% else %}
innodb-buffer-pool-size: 1G
max-connections: 4000
-{% endif %}
#performance-schema: true
#source: "deb http://repo.percona.com/apt xenial main"
#key: "8507EFA5"
root-password: {{ get_password('mysql_root') }}
sst-password: {{ get_password('mysql_sst') }}
sst-method: rsync
+ wait-timeout: 180
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
- region: {{ os.region }}
+ region: *openstack-region
neutron-security-groups: true
{% if os.beta.public_api %}
- #use-internal-endpoints: true
+ use-internal-endpoints: True
{% endif %}
+ worker-multiplier: *worker-multiplier
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
-{% if os.api.worker_multiplier %}
- worker-multiplier: {{ os.api.worker_multiplier }}
-{% endif %}
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.neutron }}
{% endif %}
charm: "./{{ ubuntu.release }}/neutron-gateway"
num_units: 1
{% if os.service.bindings %}
-{% if opnfv.spaces_dict.data is defined %}
bindings:
- data: tenant-data
-{% else %}
- bindings:
- data: internal-api
-{% endif %}
+ "": *oam-space
+ data: *overlay-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
-{% if os.api.worker_multiplier %}
- worker-multiplier: {{ os.api.worker_multiplier }}
-{% endif %}
+ worker-multiplier: *worker-multiplier
{% if os.network.controller == 'nosdn' %}
-{% if opnfv.ext_port is defined %}
-{% if opnfv.data_port is defined %}
- bridge-mappings: physnet1:br-ex physnet2:br-data
- data-port: br-ex:{{ opnfv.ext_port }} br-data:{{ opnfv.data_port }}
-{% else %}
- bridge-mappings: physnet1:br-ex
- data-port: br-ex:{{ opnfv.ext_port }}
-{% endif %}
-{% endif %}
+ bridge-mappings: physnet1:br-data
+ data-port: *data-port
{% elif os.network.controller == 'onos' %}
plugin: onos
-{% if opnfv.ext_port is defined %}
-{% if opnfv.data_port is defined %}
- bridge-mappings: physnet1:br-data external:br-ex
- data-port: br-data:{{ opnfv.data_port }} br-ex:{{ opnfv.ext_port }}
-{% else %}
- bridge-mappings: external:br-ex
- data-port: br-ex:{{ opnfv.ext_port }}
-{% endif %}
-{% endif %}
+ bridge-mappings: physnet1:br-data
+ data-port: *data-port
{% if os.network.sfc %}
profile: onos-sfc
{% endif %}
{% elif os.network.controller == 'odl' %}
plugin: ovs-odl
-{% if opnfv.ext_port is defined %}
-{% if opnfv.data_port is defined %}
- bridge-mappings: physnet1:br-ex physnet2:br-data
- data-port: br-ex:{{ opnfv.ext_port }} br-data:{{ opnfv.data_port }}
-{% else %}
- bridge-mappings: physnet1:br-ex
- data-port: br-ex:{{ opnfv.ext_port }}
-{% endif %}
-{% endif %}
-{% else %}
-{% if opnfv.ext_port is defined %}
- ext-port: {{ opnfv.ext_port }}
-{% endif %}
+ bridge-mappings: physnet1:br-data
+ data-port: *data-port
{% endif %}
instance-mtu: 1400
to:
neutron-openvswitch:
charm: ./{{ ubuntu.release }}/neutron-openvswitch
{% if os.service.bindings %}
-{% if opnfv.spaces_dict.data is defined %}
bindings:
- data: tenant-data
+ data: *overlay-space
options:
{% else %}
- bindings:
- data: internal-api
options:
-{% endif %}
-{% else %}
- options:
-{% if os.git_repo.origin_git %}
- openstack-origin-git: "{{ os.git_repo.branch }}"
-{% endif %}
{% if opnfv.spaces_dict.data is defined %}
os-data-network: {{ opnfv.spaces_dict.data.cidr }}
{% endif %}
{% endif %}
+{% if os.git_repo.origin_git %}
+ openstack-origin-git: "{{ os.git_repo.branch }}"
+{% endif %}
{% if os.network.dpdk %}
enable-dpdk: true
#dpdk-driver: uio_pci_generic
#default-socket-memory: 1024
#default-socket-cores: 1
{% endif %}
-{% if opnfv.ext_port is defined %}
{% if os.network.controller == 'nosdn' %}
-{% if opnfv.data_port is defined %}
- bridge-mappings: physnet1:br-ex physnet2:br-data
- data-port: br-ex:{{ opnfv.ext_port }} br-data:{{ opnfv.data_port }}
-{% else %}
- bridge-mappings: physnet1:br-ex
- data-port: br-ex:{{ opnfv.ext_port }}
-{% endif %}
+ bridge-mappings: physnet1:br-data
+ #data-port: *data-port
{% else %}
ext-port: {{ opnfv.ext_port }}
{% endif %}
-{% endif %}
{# Empty block to avoid bad block trim #}
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- internal: internal-api
- admin: internal-api
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- public: public-api
-{% else %}
- public: internal-api
-{% endif %}
+ "": *oam-space
+ public: *public-space
+ admin: *admin-space
+ internal: *internal-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
- region: {{ os.region }}
+ region: *openstack-region
console-access-protocol: novnc
neutron-external-network: ext-net
service-guard: true
+ worker-multiplier: *worker-multiplier
+ single-nova-consoleauth: False
+ network-manager: Neutron
{% if os.beta.public_api %}
use-internal-endpoints: true
{% endif %}
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
-{% if os.api.worker_multiplier %}
- worker-multiplier: {{ os.api.worker_multiplier }}
-{% endif %}
{% if os.ha.mode == 'ha' %}
vip: {{ opnfv.vip.nova }}
{% endif %}
{% if opnfv.domain is defined %}
#console-proxy-ip: {{ opnfv.domain }}
{% endif %}
- network-manager: Neutron
{% if os.beta.public_api %}
os-public-hostname: api.{{ opnfv.domain }}
{% endif %}
num_units: {{ opnfv.units - 1 }}
{% endif %}
{% endif %}
+ bindings:
+ "": *oam-space
+ internal: *internal-space
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
- enable-live-migration: true
- enable-resize: true
+ enable-live-migration: True
+ enable-resize: True
migration-auth-type: ssh
{% if os.beta.public_api %}
- use-internal-endpoints: true
+ use-internal-endpoints: True
{% endif %}
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.lxd %}
virt-type: lxd
+{% else %}
+ virt-type: kvm
{% endif %}
to:
{% if os.hyperconverged %}
num_units: 1
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *oam-space
+ internal: internal-space
{% endif %}
options:
install-url: "https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.0-Carbon/distribution-karaf-0.6.0-Carbon.tar.gz"
num_units: 1
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *oam-space
+ internal: *internal-space
{% endif %}
to:
- "lxd:nodes/0"
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- shared-db: internal-api
-{% if opnfv.spaces_dict.public is defined %}
- website: public-api
-{% else %}
- website: internal-api
-{% endif %}
-{% if os.ha.mode == 'ha' %}
- cluster: internal-api
-{% endif %}
+ "": *public-space
+ shared-db: *internal-space
{% endif %}
options:
- openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
+ openstack-origin: *openstack-origin
{% if os.git_repo.origin_git %}
openstack-origin-git: "{{ os.git_repo.branch }}"
{% endif %}
secret: admin
webroot: /
+ neutron-network-lb: True
+ neutron-network-firewall: False
+ cinder-backup: False
+ password-retrieve: True
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
num_units: 1
{% if os.service.bindings %}
bindings:
- "": internal-api
+ "": *internal-space
{% endif %}
to:
- "lxd:nodes/0"
num_units: {{ unit_qty() }}
{% if os.service.bindings %}
bindings:
- amqp: internal-api
+ "": *oam-space
+ amqp: *internal-space
+ cluster: *internal-space
{% endif %}
options:
+ source: *openstack-origin
{% if opnfv.storage_dict.ceph is defined %}
ceph-osd-replication-count: {{ unit_ceph_qty() }}
{% endif %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
{% if os.ha.mode == 'ha' %}
- #vip: {{ opnfv.vip.rabbitmq }}
min-cluster-size: {{ unit_qty() }}
{% endif %}
to:
--- /dev/null
+
+
+{% if os.release == 'mitaka' %}
+ openstack-origin: &openstack-origin distro
+{% else %}
+ openstack-origin: &openstack-origin cloud:{{ ubuntu.release }}-{{ os.release }}
+{% endif %}
+
+ openstack-region: &openstack-region {{ os.region }}
+ worker-multiplier: &worker-multiplier {{ os.api.worker_multiplier }}
+ 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 Admin network; for adminURL endpoints
+ admin-space: &admin-space internal-api
+
+ # This is OpenStack Public network; for publicURL endpoints
+{% if opnfv.spaces_dict.public is defined %}
+ public-space: &public-space public-api
+{% else %}
+ public-space: &public-space internal-api
+{% endif %}
+
+ # This is OpenStack Internal network; for internalURL endpoints
+ internal-space: &internal-space internal-api
+
+ # This is the overlay network
+{% if opnfv.spaces_dict.data is defined %}
+ overlay-space: &overlay-space tenant-data
+{% else %}
+ overlay-space: &overlay-space internal-api
+{% endif %}
+
+ # CEPH configuration
+ # CEPH access network
+ ceph-public-space: &ceph-public-space internal-api
+
+ # CEPH replication network
+{% if opnfv.spaces_dict.storage is defined %}
+ ceph-cluster-space: &ceph-cluster-space storage-cluster
+{% else %}
+ ceph-cluster-space: &ceph-cluster-space internal-api
+{% endif %}
+
+ # Workaround for 'only one default binding supported'
+ oam-space-constr: &oam-space-constr spaces=oam-space
+ ceph-access-constr: &ceph-access-constr spaces=ceph-access-space
+
+ # CEPH OSD and journal devices; temporary workaround for #1674148
+{% if os.lxd %}
+ osd-devices: &osd-devices /srv/ceph-osd
+{% else %}
+ osd-devices: &osd-devices {{ opnfv.storage_dict.ceph.disk }}
+{% endif %}
+ osd-journal: &osd-journal
+
done
fi
-// Configuring deployment
+# Configuring deployment
if ([ $opnfvmodel == "openstack" ]); then
echo_info "Configuring OpenStack deployment"