aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/barometer/plugin.desc10
-rw-r--r--plugins/barometer/roles/collectd/files/install_docker.sh25
-rw-r--r--plugins/barometer/roles/collectd/tasks/collectd.yml233
-rw-r--r--plugins/barometer/roles/collectd/tasks/main.yml2
-rw-r--r--plugins/barometer/roles/collectd/templates/collectd-aodh.conf.j22
-rw-r--r--plugins/barometer/roles/collectd/templates/collectd-gnocchi.conf.j24
-rw-r--r--plugins/barometer/roles/collectd/templates/csv.conf.j220
-rw-r--r--plugins/barometer/roles/collectd/templates/default_plugins.conf.j231
-rw-r--r--plugins/barometer/roles/collectd/templates/hugepages.conf.j213
-rw-r--r--plugins/barometer/roles/collectd/templates/intel_pmu.conf.j223
-rw-r--r--plugins/barometer/roles/collectd/templates/logfile.conf.j213
-rw-r--r--plugins/barometer/roles/collectd/templates/mcelog.conf.j222
-rw-r--r--plugins/barometer/roles/collectd/templates/network.conf.j219
-rw-r--r--plugins/barometer/roles/collectd/templates/ovs_events.conf.j215
-rw-r--r--plugins/barometer/roles/collectd/templates/ovs_stats.conf.j214
-rw-r--r--plugins/barometer/roles/collectd/templates/rdt.conf.j221
-rw-r--r--plugins/barometer/roles/collectd/templates/rrdtool.conf.j221
-rw-r--r--plugins/barometer/roles/collectd/templates/virt.conf.j232
-rw-r--r--plugins/barometer/roles/collectd/vars/main.yml8
-rw-r--r--plugins/barometer/roles/grafana/files/configure_grafana.sh35
-rw-r--r--plugins/barometer/roles/grafana/files/install_grafana.sh26
-rw-r--r--plugins/barometer/roles/grafana/tasks/grafana.yml34
-rw-r--r--plugins/barometer/roles/grafana/tasks/main.yml11
-rw-r--r--plugins/barometer/roles/influxdb/files/install_influxdb.sh31
-rw-r--r--plugins/barometer/roles/influxdb/tasks/influxdb.yml28
-rw-r--r--plugins/barometer/roles/influxdb/tasks/main.yml11
-rw-r--r--plugins/barometer/roles/influxdb/templates/influxdb.conf.j2478
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh9
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/files/opendaylight.service2
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml2
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml2
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/tasks/odl-pre.yml3
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg6
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/vars/main.yml12
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh9
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service2
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/files/sfc.conf2
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml2
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-2.yml8
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml4
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml4
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml2
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml13
-rw-r--r--plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml9
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml18
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/templates/odl_pkg.sh.j219
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg6
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml21
-rw-r--r--plugins/odl_sfc/roles/sfc-pre-2/files/odl_sfc.patch90
-rw-r--r--plugins/odl_sfc/roles/sfc-pre-2/tasks/setup_sfc.yml32
-rw-r--r--plugins/onap/roles/tasks/Ubuntu.yml117
-rw-r--r--plugins/onap/roles/tasks/main.yml11
-rw-r--r--plugins/onap/roles/templates/exports.j21
-rw-r--r--plugins/onap/roles/vars/main.yml13
-rw-r--r--plugins/opencontrail/plugin.desc43
-rw-r--r--plugins/opencontrail/roles/install-k8s-opencontrail/files/bms-instances.yaml32
-rw-r--r--plugins/opencontrail/roles/install-k8s-opencontrail/files/kvm-instances.yaml32
-rw-r--r--plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors.repo32
-rw-r--r--plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors_aarch64.repo22
-rw-r--r--plugins/opencontrail/roles/install-k8s-opencontrail/tasks/main.yml92
-rw-r--r--plugins/stor4nfv/plugin.desc49
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh18
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh28
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml13
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml72
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml143
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml14
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh60
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh18
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/main.yml13
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml72
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml69
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml12
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/templates/ceph.hosts.j214
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j214
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j220
76 files changed, 2312 insertions, 171 deletions
diff --git a/plugins/barometer/plugin.desc b/plugins/barometer/plugin.desc
index 896d6f27..3d976c2e 100644
--- a/plugins/barometer/plugin.desc
+++ b/plugins/barometer/plugin.desc
@@ -15,6 +15,7 @@ plugin:
maintainers:
- john.hinman@intel.com
+ - ramamani.yeleswarapu@intel.com
# host os type: ubuntu/centos
os_version: ubuntu
@@ -50,3 +51,12 @@ plugin:
inventory:
- compute
+ - role: influxdb
+ phrase: post_openstack
+ inventory:
+ - controller
+
+ - role: grafana
+ phrase: post_openstack
+ inventory:
+ - controller
diff --git a/plugins/barometer/roles/collectd/files/install_docker.sh b/plugins/barometer/roles/collectd/files/install_docker.sh
new file mode 100644
index 00000000..f0c08bae
--- /dev/null
+++ b/plugins/barometer/roles/collectd/files/install_docker.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+
+apt-get update
+apt-get install -y apt-transport-https ca-certificates curl software-properties-common
+sleep 3
+
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
+apt-key fingerprint 0EBFCD88
+
+add-apt-repository \
+ "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
+
+apt-get update
+sleep 3
+
+apt-get install -y docker-ce
+sleep 5
diff --git a/plugins/barometer/roles/collectd/tasks/collectd.yml b/plugins/barometer/roles/collectd/tasks/collectd.yml
index 48e15989..0f6a6266 100644
--- a/plugins/barometer/roles/collectd/tasks/collectd.yml
+++ b/plugins/barometer/roles/collectd/tasks/collectd.yml
@@ -1,5 +1,5 @@
# #############################################################################
-# Copyright (c) 2017 Intel Corp.
+# Copyright (c) 2017-18 Intel Corp.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -7,120 +7,173 @@
# http://www.apache.org/licenses/LICENSE-2.0
# #############################################################################
---
-- name: install dependencies
- apt:
- name: "{{ item }}"
- state: present
- with_items:
- - libltdl7
- - init-system-helpers
- - mcelog
- - rrdtool
- - libc6
- - librrd4
- - libvirt-bin
- - libvirt-dev
- - gcc
- - git
- - python3-pip
-
-- name: create workspace directory
- file:
- path: "{{ workspace }}"
- state: directory
- mode: 0755
-
-- name: download, unarchive and install collectd packages
+- name: copy install_docker script
+ remote_user: root
+ copy:
+ src: install_docker.sh
+ dest: /opt/install_docker.sh
+ mode: 0777
+
+- name: install docker
+ command: su -s /bin/sh -c "/opt/install_docker.sh"
+
+- name: create collectd_sample_configs dir
+ remote_user: root
shell: |
- cd "{{ workspace }}";
- wget "{{ artifacts_collectd_pkg }}";
- su -s /bin/sh -c \
- "tar xzf collectd_pkg.tar.gz -C {{ workspace }} --strip-components 1";
- apt-get install ./libcollectd*.deb -y;
- apt-get install ./collectd*.deb -y
-
-- name: make stack dir
- file:
- path: /opt/stack
- state: directory
- mode: 0755
-
-- name: check plugin dir exists
- stat:
- path: /opt/stack/collectd-ceilometer-plugin
- register: stat_result
+ rm -rf /root/collectd_sample_configs;
+ mkdir /root/collectd_sample_configs;
-- name: fetch collectd plugin source code
+- name: docker pull opnfv/barometer-collectd
+ remote_user: root
shell: |
- cd /opt/stack;
- git clone https://github.com/openstack/collectd-ceilometer-plugin.git;
- cd /opt/stack/collectd-ceilometer-plugin;
- git checkout stable/pike
- when: stat_result.stat.exists == False
+ docker pull opnfv/barometer-collectd;
+ sleep 5
- name: configure logfile conf
+ remote_user: root
template:
src: logfile.conf.j2
- dest: /etc/collectd/collectd.conf.d/logfile.conf
+ dest: /root/collectd_sample_configs/logfile.conf
+
+- name: configure csv conf
+ remote_user: root
+ template:
+ src: csv.conf.j2
+ dest: /root/collectd_sample_configs/csv.conf
+
+- name: check if vswitchd on host
+ shell: ps -ef | grep vswitchd | grep -v grep > /dev/null
+ register: vswitchd_result
+ ignore_errors: "true"
+
+- name: check if db.sock exists
+ stat:
+ path: /var/run/openvswitch/db.sock
+ register: dbsock_result
+ ignore_errors: "true"
+
+- name: configure ovs_stats conf and ovs_events conf
+ remote_user: root
+ template:
+ src: "{{ item }}.conf.j2"
+ dest: "/root/collectd_sample_configs/{{ item }}.conf"
+ when: vswitchd_result|succeeded and dbsock_result|succeeded
+ with_items:
+ - ovs_stats
+ - ovs_events
+
+- name: check if mcelog running on host
+ shell: ps -ef | grep mcelog | grep -v grep > /dev/null
+ register: mcelog_running
+ ignore_errors: "true"
+
+- name: check if mcelog exists
+ shell: which mcelog > /dev/null
+ register: mcelog_exists
+ ignore_errors: "true"
+
+- name: check if mcelog-client exists
+ stat:
+ path: /var/run/mcelog-client
+ register: mcelog_client_exists
+ ignore_errors: "true"
+
+- name: configure mcelog conf
+ remote_user: root
+ template:
+ src: mcelog.conf.j2
+ dest: /root/collectd_sample_configs/mcelog.conf
+ when: mcelog_running|succeeded and mcelog_exists|succeeded and mcelog_client_exists|succeeded
- name: configure collectd-aodh plugin conf
+ remote_user: root
template:
src: collectd-aodh.conf.j2
- dest: /etc/collectd/collectd.conf.d/collectd-aodh-plugin.conf
+ dest: /root/collectd_sample_configs/collectd-aodh-plugin.conf
- name: configure collectd-gnocchi plugin conf
+ remote_user: root
template:
src: collectd-gnocchi.conf.j2
- dest: /etc/collectd/collectd.conf.d/collectd-gnocchi-plugin.conf
+ dest: /root/collectd_sample_configs/collectd-gnocchi-plugin.conf
+
+- name: check if hugepages folders exist on host
+ stat:
+ path: "{{ item }}"
+ register: hugepages_result
+ ignore_errors: "true"
+ with_items:
+ /sys/devices/system/node
+ /sys/kernel/mm/hugepages
- name: configure hugepages conf
+ remote_user: root
template:
src: hugepages.conf.j2
- dest: /etc/collectd/collectd.conf.d/hugepages.conf
+ dest: /root/collectd_sample_configs/hugepages.conf
+ when: hugepages_result|succeeded
-- name: configure mcelog conf
+- name: check if rdt on host
+ shell: |
+ grep -q cqm* "/proc/cpuinfo"
+ register: rdt_result
+ ignore_errors: "true"
+
+- name: configure rdt conf
+ remote_user: root
template:
- src: mcelog.conf.j2
- dest: /etc/collectd/collectd.conf.d/mcelog.conf
+ src: rdt.conf.j2
+ dest: /root/collectd_sample_configs/rdt.conf
+ when: rdt_result|succeeded
+
+- name: load msr kernel module
+ modprobe:
+ name: msr
+ state: present
+
+- name: check if libvirtd on host
+ shell: ps -ef | grep libvirtd | grep -v grep > /dev/null
+ register: libvirt_result
+ ignore_errors: "true"
-- name: configure ovs_stats conf
+- name: configure virt conf
+ remote_user: root
template:
- src: ovs_stats.conf.j2
- dest: /etc/collectd/collectd.conf.d/ovs_stats.conf
+ src: virt.conf.j2
+ dest: /root/collectd_sample_configs/virt.conf
+ when: libvirt_result|succeeded
-- name: configure ovs_events conf
+- name: configure virt conf extra stats when rdt is present
+ remote_user: root
+ shell: |
+ sed -i '/ExtraStats/s/^#//g' /root/collectd_sample_configs/virt.conf
+ when: rdt_result|failed and libvirt_result|succeeded
+
+- name: configure rrdtool conf
template:
- src: ovs_events.conf.j2
- dest: /etc/collectd/collectd.conf.d/ovs_events.conf
-
-- name: configure collectd conf
- lineinfile:
- dest: /etc/collectd/collectd.conf
- regexp: '{{ item.regexp }}'
- line: '{{ item.line }}'
- with_items:
- - regexp: '#LoadPlugin numa'
- line: 'LoadPlugin numa'
- - regexp: '#LoadPlugin virt'
- line: 'LoadPlugin virt'
- - regexp: '#LoadPlugin cpufreq'
- line: 'LoadPlugin cpufreq'
- - regexp: '#LoadPlugin cpusleep'
- line: 'LoadPlugin cpusleep'
+ src: rrdtool.conf.j2
+ dest: /root/collectd_sample_configs/rrdtool.conf
-- name: configure mcelog conf
- lineinfile:
- dest: /etc/mcelog/mcelog.conf
- regexp: '{{ item.regexp }}'
- line: '{{ item.line }}'
- with_items:
- - regexp: '#socket-path = /var/run/mcelog-client'
- line: 'socket-path = /var/run/mcelog-client'
+- name: configure intel_pmu conf
+ remote_user: root
+ template:
+ src: intel_pmu.conf.j2
+ dest: /root/collectd_sample_configs/intel_pmu.conf
+
+- name: configure network conf
+ remote_user: root
+ template:
+ src: network.conf.j2
+ dest: /root/collectd_sample_configs/network.conf
+
+- name: configure default plugins
+ remote_user: root
+ template:
+ src: default_plugins.conf.j2
+ dest: /root/collectd_sample_configs/default_plugins.conf
-- name: install gnocchiclient, aodhclient, set ovs manager, restart mcelog, collectd
+- name: run barometer collectd container
+ remote_user: root
shell: |
- pip install gnocchiclient;
- pip install aodhclient;
- ovs-vsctl set-manager ptcp:6640:127.0.0.1;
- systemctl restart mcelog;
- systemctl restart collectd
+ docker run -dti --net=host -v /root/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \
+ -v /var/run:/var/run -v /tmp:/tmp --privileged opnfv/barometer-collectd /run_collectd.sh
diff --git a/plugins/barometer/roles/collectd/tasks/main.yml b/plugins/barometer/roles/collectd/tasks/main.yml
index d33823ed..88602ea2 100644
--- a/plugins/barometer/roles/collectd/tasks/main.yml
+++ b/plugins/barometer/roles/collectd/tasks/main.yml
@@ -1,5 +1,5 @@
# #############################################################################
-# Copyright (c) 2017 Intel Corp.
+# Copyright (c) 2017-18 Intel Corp.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
diff --git a/plugins/barometer/roles/collectd/templates/collectd-aodh.conf.j2 b/plugins/barometer/roles/collectd/templates/collectd-aodh.conf.j2
index 301ba25a..b7fcfb60 100644
--- a/plugins/barometer/roles/collectd/templates/collectd-aodh.conf.j2
+++ b/plugins/barometer/roles/collectd/templates/collectd-aodh.conf.j2
@@ -3,7 +3,7 @@
</LoadPlugin>
<Plugin python>
- ModulePath "/opt/stack/collectd-ceilometer-plugin"
+ ModulePath "/src/barometer/src/collectd-openstack-plugins/collectd-openstack-plugins"
LogTraces true
Interactive false
Import "collectd_ceilometer.aodh.plugin"
diff --git a/plugins/barometer/roles/collectd/templates/collectd-gnocchi.conf.j2 b/plugins/barometer/roles/collectd/templates/collectd-gnocchi.conf.j2
index b54e9d5a..22dd7966 100644
--- a/plugins/barometer/roles/collectd/templates/collectd-gnocchi.conf.j2
+++ b/plugins/barometer/roles/collectd/templates/collectd-gnocchi.conf.j2
@@ -3,7 +3,7 @@
</LoadPlugin>
<Plugin python>
- ModulePath "/opt/stack/collectd-ceilometer-plugin"
+ ModulePath "/src/barometer/src/collectd-openstack-plugins/collectd-openstack-plugins"
LogTraces true
Interactive false
Import "collectd_ceilometer.gnocchi.plugin"
@@ -16,6 +16,8 @@
# Batch size
BATCH_SIZE "1"
+ DEFAULT_ARCHIVE_POLICY "high"
+
# Service endpoint addresses
OS_AUTH_URL "http://{{ internal_vip.ip }}:35357/v3/"
diff --git a/plugins/barometer/roles/collectd/templates/csv.conf.j2 b/plugins/barometer/roles/collectd/templates/csv.conf.j2
new file mode 100644
index 00000000..06abf4ba
--- /dev/null
+++ b/plugins/barometer/roles/collectd/templates/csv.conf.j2
@@ -0,0 +1,20 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+LoadPlugin csv
+
+<Plugin csv>
+ DataDir "/tmp/collectd/csv"
+ StoreRates false
+</Plugin>
+
diff --git a/plugins/barometer/roles/collectd/templates/default_plugins.conf.j2 b/plugins/barometer/roles/collectd/templates/default_plugins.conf.j2
new file mode 100644
index 00000000..a4d632a6
--- /dev/null
+++ b/plugins/barometer/roles/collectd/templates/default_plugins.conf.j2
@@ -0,0 +1,31 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+Hostname "{{ inventory_hostname }}"
+
+LoadPlugin cpufreq
+LoadPlugin disk
+LoadPlugin ethstat
+LoadPlugin ipc
+LoadPlugin ipmi
+LoadPlugin load
+LoadPlugin memory
+LoadPlugin numa
+LoadPlugin processes
+LoadPlugin df
+LoadPlugin turbostat
+LoadPlugin uptime
+LoadPlugin contextswitch
+LoadPlugin irq
+LoadPlugin swap
+
diff --git a/plugins/barometer/roles/collectd/templates/hugepages.conf.j2 b/plugins/barometer/roles/collectd/templates/hugepages.conf.j2
index cefcc25d..9378c1f2 100644
--- a/plugins/barometer/roles/collectd/templates/hugepages.conf.j2
+++ b/plugins/barometer/roles/collectd/templates/hugepages.conf.j2
@@ -1,3 +1,16 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
LoadPlugin hugepages
<Plugin hugepages>
diff --git a/plugins/barometer/roles/collectd/templates/intel_pmu.conf.j2 b/plugins/barometer/roles/collectd/templates/intel_pmu.conf.j2
new file mode 100644
index 00000000..caba8825
--- /dev/null
+++ b/plugins/barometer/roles/collectd/templates/intel_pmu.conf.j2
@@ -0,0 +1,23 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+LoadPlugin intel_pmu
+
+<Plugin intel_pmu>
+ ReportHardwareCacheEvents true
+ ReportKernelPMUEvents true
+ ReportSoftwareEvents true
+# EventList "/var/cache/pmu/GenuineIntel-6-2D-core.json"
+# HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD"
+</Plugin>
+
diff --git a/plugins/barometer/roles/collectd/templates/logfile.conf.j2 b/plugins/barometer/roles/collectd/templates/logfile.conf.j2
index 77d86a99..bf53ae8f 100644
--- a/plugins/barometer/roles/collectd/templates/logfile.conf.j2
+++ b/plugins/barometer/roles/collectd/templates/logfile.conf.j2
@@ -1,3 +1,16 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
LoadPlugin "logfile"
<Plugin "logfile">
diff --git a/plugins/barometer/roles/collectd/templates/mcelog.conf.j2 b/plugins/barometer/roles/collectd/templates/mcelog.conf.j2
index 3a043ec8..f9ae8aa0 100644
--- a/plugins/barometer/roles/collectd/templates/mcelog.conf.j2
+++ b/plugins/barometer/roles/collectd/templates/mcelog.conf.j2
@@ -1,9 +1,25 @@
-LoadPlugin mcelog
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+<LoadPlugin mcelog>
+ Interval 1
+</LoadPlugin>
<Plugin mcelog>
<Memory>
- McelogClientSocket "/var/run/mcelog-client"
- PersistentNotification false
+ McelogClientSocket "/var/run/mcelog-client"
+ PersistentNotification false
</Memory>
+## McelogLogfile "/var/log/mcelog"
</Plugin>
diff --git a/plugins/barometer/roles/collectd/templates/network.conf.j2 b/plugins/barometer/roles/collectd/templates/network.conf.j2
new file mode 100644
index 00000000..e9343e66
--- /dev/null
+++ b/plugins/barometer/roles/collectd/templates/network.conf.j2
@@ -0,0 +1,19 @@
+# Copyright 2017-18 OPNFV, Intel Corp.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+LoadPlugin network
+
+<Plugin network>
+ Server "{{ internal_vip.ip }}" "25826"
+</Plugin>
+
diff --git a/plugins/barometer/roles/collectd/templates/ovs_events.conf.j2 b/plugins/barometer/roles/collectd/templates/ovs_events.conf.j2
index d72e2004..2d71fa18 100644
--- a/plugins/barometer/roles/collectd/templates/ovs_events.conf.j2
+++ b/plugins/barometer/roles/collectd/templates/ovs_events.conf.j2
@@ -1,8 +1,23 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
<LoadPlugin ovs_events>
Interval 1
</LoadPlugin>
+
<Plugin "ovs_events">
Port 6640
+ Address "127.0.0.1"
Socket "/var/run/openvswitch/db.sock"
Interfaces "br0" "veth0"
SendNotification false
diff --git a/plugins/barometer/roles/collectd/templates/ovs_stats.conf.j2 b/plugins/barometer/roles/collectd/templates/ovs_stats.conf.j2
index 945c4e92..b7e4d5c8 100644
--- a/plugins/barometer/roles/collectd/templates/ovs_stats.conf.j2
+++ b/plugins/barometer/roles/collectd/templates/ovs_stats.conf.j2
@@ -1,6 +1,20 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
<LoadPlugin ovs_stats>
Interval 1
</LoadPlugin>
+
<Plugin ovs_stats>
Port "6640"
Address "127.0.0.1"
diff --git a/plugins/barometer/roles/collectd/templates/rdt.conf.j2 b/plugins/barometer/roles/collectd/templates/rdt.conf.j2
new file mode 100644
index 00000000..96d5eb34
--- /dev/null
+++ b/plugins/barometer/roles/collectd/templates/rdt.conf.j2
@@ -0,0 +1,21 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+<LoadPlugin intel_rdt>
+ Interval 1
+</LoadPlugin>
+
+<Plugin "intel_rdt">
+ Cores ""
+</Plugin>
+
diff --git a/plugins/barometer/roles/collectd/templates/rrdtool.conf.j2 b/plugins/barometer/roles/collectd/templates/rrdtool.conf.j2
new file mode 100644
index 00000000..50bd6603
--- /dev/null
+++ b/plugins/barometer/roles/collectd/templates/rrdtool.conf.j2
@@ -0,0 +1,21 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+Loadplugin rrdtool
+
+<Plugin rrdtool>
+ DataDir "/tmp/collectd/rrd"
+ CacheFlush 120
+ WritesPerSecond 50
+</Plugin>
+
diff --git a/plugins/barometer/roles/collectd/templates/virt.conf.j2 b/plugins/barometer/roles/collectd/templates/virt.conf.j2
new file mode 100644
index 00000000..c6161237
--- /dev/null
+++ b/plugins/barometer/roles/collectd/templates/virt.conf.j2
@@ -0,0 +1,32 @@
+# Copyright 2017-18 OPNFV
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LoadPlugin virt
+
+<Plugin virt>
+# Connection "xen:///"
+ RefreshInterval 60
+# Domain "name"
+# BlockDevice "name:device"
+# BlockDeviceFormat target
+# BlockDeviceFormatBasename false
+# InterfaceDevice "name:device"
+# IgnoreSelected false
+# HostnameFormat name
+# InterfaceFormat name
+# PluginInstanceFormat name
+# Instances 1
+# ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin"
+</Plugin>
+
diff --git a/plugins/barometer/roles/collectd/vars/main.yml b/plugins/barometer/roles/collectd/vars/main.yml
index 9fc0687d..b3a0b3b7 100644
--- a/plugins/barometer/roles/collectd/vars/main.yml
+++ b/plugins/barometer/roles/collectd/vars/main.yml
@@ -1,5 +1,5 @@
# #############################################################################
-# Copyright (c) 2017 Intel Corp.
+# Copyright (c) 2017-18 Intel Corp.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -8,9 +8,3 @@
# #############################################################################
---
openstack_passwd_file: /etc/openstack_deploy/user_secrets.yml
-
-workspace: /tmp/plugin
-
-artifacts_collectd_pkg: http://artifacts.opnfv.org/compass4nfv/package/master/collectd_pkg.tar.gz
-
-collectd_ver: 5.8.0.23.g576797d-1~xenial_amd64.deb
diff --git a/plugins/barometer/roles/grafana/files/configure_grafana.sh b/plugins/barometer/roles/grafana/files/configure_grafana.sh
new file mode 100644
index 00000000..39fcc82b
--- /dev/null
+++ b/plugins/barometer/roles/grafana/files/configure_grafana.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Copyright 2017-2018 OPNFV, Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ -z "${influxdb_host}" ]
+then
+ influxdb_host=localhost
+fi
+
+
+while [ -z "$RETURN" ]
+do
+ sleep 1
+ RETURN=$(curl -u admin:admin -X POST -H 'content-type: application/json'\
+ http://127.0.0.1:3000/api/datasources -d \
+ '{"name":"collectd","type":"influxdb","url":"http://'"${influxdb_host}"':8086","access":"proxy","isDefault":true,"database":"collectd","user":"admin","password":"admin","basicAuth":false}')
+done
+
+FILES=/opt/barometer/docker/barometer-grafana/dashboards/*.json
+for f in $FILES
+do
+ curl -u admin:admin -X POST -H 'content-type: application/json' \
+ http://127.0.0.1:3000/api/dashboards/db -d @$f ;
+done
diff --git a/plugins/barometer/roles/grafana/files/install_grafana.sh b/plugins/barometer/roles/grafana/files/install_grafana.sh
new file mode 100644
index 00000000..43d9a588
--- /dev/null
+++ b/plugins/barometer/roles/grafana/files/install_grafana.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# Copyright 2017-2018 OPNFV, Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+echo "deb https://packagecloud.io/grafana/stable/debian/ stretch main" | tee /etc/apt/sources.list.d/grafana.list
+
+curl https://packagecloud.io/gpg.key | apt-key add -
+
+apt-get update
+
+apt-get install -y grafana
+
+sleep 5
+
+service grafana-server start
diff --git a/plugins/barometer/roles/grafana/tasks/grafana.yml b/plugins/barometer/roles/grafana/tasks/grafana.yml
new file mode 100644
index 00000000..9c01920f
--- /dev/null
+++ b/plugins/barometer/roles/grafana/tasks/grafana.yml
@@ -0,0 +1,34 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- name: copy install_grafana script
+ remote_user: root
+ copy:
+ src: install_grafana.sh
+ dest: /opt/install_grafana.sh
+ mode: 0777
+
+- name: install grafana
+ command: su -s /bin/sh -c "/opt/install_grafana.sh"
+
+- name: fetch barometer source code
+ remote_user: root
+ shell: |
+ cd /opt && rm -rf barometer;
+ git clone https://github.com/opnfv/barometer.git;
+
+- name: copy configure_grafana script
+ remote_user: root
+ copy:
+ src: configure_grafana.sh
+ dest: /opt/configure_grafana.sh
+ mode: 0777
+
+- name: configure grafana
+ command: su -s /bin/sh -c "/opt/configure_grafana.sh"
diff --git a/plugins/barometer/roles/grafana/tasks/main.yml b/plugins/barometer/roles/grafana/tasks/main.yml
new file mode 100644
index 00000000..50d15b49
--- /dev/null
+++ b/plugins/barometer/roles/grafana/tasks/main.yml
@@ -0,0 +1,11 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: grafana.yml
+ when: barometer is defined and barometer == "Enable"
diff --git a/plugins/barometer/roles/influxdb/files/install_influxdb.sh b/plugins/barometer/roles/influxdb/files/install_influxdb.sh
new file mode 100644
index 00000000..7fd1e046
--- /dev/null
+++ b/plugins/barometer/roles/influxdb/files/install_influxdb.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2017-2018 OPNFV, Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+curl -sL https://repos.influxdata.com/influxdb.key | apt-key add -
+
+source /etc/lsb-release
+
+echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | tee /etc/apt/sources.list.d/influxdb.list
+
+apt-get update
+
+apt-get install -y influxdb
+
+sleep 5
+
+# install types.db
+mkdir /opt/collectd && mkdir /opt/collectd/share && mkdir /opt/collectd/share/collectd && cd /opt/collectd/share/collectd
+
+wget https://raw.githubusercontent.com/collectd/collectd/master/src/types.db && cd -
diff --git a/plugins/barometer/roles/influxdb/tasks/influxdb.yml b/plugins/barometer/roles/influxdb/tasks/influxdb.yml
new file mode 100644
index 00000000..8e1f4ca1
--- /dev/null
+++ b/plugins/barometer/roles/influxdb/tasks/influxdb.yml
@@ -0,0 +1,28 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- name: copy install_influxdb script
+ remote_user: root
+ copy:
+ src: install_influxdb.sh
+ dest: /opt/install_influxdb.sh
+ mode: 0777
+
+- name: install influxdb
+ command: su -s /bin/sh -c "/opt/install_influxdb.sh"
+
+- name: configure /etc/influxdb/influxdb.conf
+ remote_user: root
+ template:
+ src: influxdb.conf.j2
+ dest: /etc/influxdb/influxdb.conf
+
+- name: start influxdb service
+ remote_user: root
+ shell: service influxdb start
diff --git a/plugins/barometer/roles/influxdb/tasks/main.yml b/plugins/barometer/roles/influxdb/tasks/main.yml
new file mode 100644
index 00000000..b6da783b
--- /dev/null
+++ b/plugins/barometer/roles/influxdb/tasks/main.yml
@@ -0,0 +1,11 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: influxdb.yml
+ when: barometer is defined and barometer == "Enable"
diff --git a/plugins/barometer/roles/influxdb/templates/influxdb.conf.j2 b/plugins/barometer/roles/influxdb/templates/influxdb.conf.j2
new file mode 100644
index 00000000..d35e93a7
--- /dev/null
+++ b/plugins/barometer/roles/influxdb/templates/influxdb.conf.j2
@@ -0,0 +1,478 @@
+### Welcome to the InfluxDB configuration file.
+
+# The values in this file override the default values used by the system if
+# a config option is not specified. The commented out lines are the configuration
+# field and the default value used. Uncommenting a line and changing the value
+# will change the value used at runtime when the process is restarted.
+
+# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com
+# The data includes a random ID, os, arch, version, the number of series and other
+# usage data. No data from user databases is ever transmitted.
+# Change this option to true to disable reporting.
+# reporting-disabled = false
+
+# Bind address to use for the RPC service for backup and restore.
+# bind-address = "127.0.0.1:8088"
+
+###
+### [meta]
+###
+### Controls the parameters for the Raft consensus group that stores metadata
+### about the InfluxDB cluster.
+###
+
+[meta]
+ # Where the metadata/raft database is stored
+ dir = "/var/lib/influxdb/meta"
+
+ # Automatically create a default retention policy when creating a database.
+ # retention-autocreate = true
+
+ # If log messages are printed for the meta service
+ # logging-enabled = true
+
+###
+### [data]
+###
+### Controls where the actual shard data for InfluxDB lives and how it is
+### flushed from the WAL. "dir" may need to be changed to a suitable place
+### for your system, but the WAL settings are an advanced configuration. The
+### defaults should work for most systems.
+###
+
+[data]
+ # The directory where the TSM storage engine stores TSM files.
+ dir = "/var/lib/influxdb/data"
+
+ # The directory where the TSM storage engine stores WAL files.
+ wal-dir = "/var/lib/influxdb/wal"
+
+ # The amount of time that a write will wait before fsyncing. A duration
+ # greater than 0 can be used to batch up multiple fsync calls. This is useful for slower
+ # disks or when WAL write contention is seen. A value of 0s fsyncs every write to the WAL.
+ # Values in the range of 0-100ms are recommended for non-SSD disks.
+ # wal-fsync-delay = "0s"
+
+
+ # The type of shard index to use for new shards. The default is an in-memory index that is
+ # recreated at startup. A value of "tsi1" will use a disk based index that supports higher
+ # cardinality datasets.
+ # index-version = "inmem"
+
+ # Trace logging provides more verbose output around the tsm engine. Turning
+ # this on can provide more useful output for debugging tsm engine issues.
+ # trace-logging-enabled = false
+
+ # Whether queries should be logged before execution. Very useful for troubleshooting, but will
+ # log any sensitive data contained within a query.
+ # query-log-enabled = true
+
+ # Settings for the TSM engine
+
+ # CacheMaxMemorySize is the maximum size a shard's cache can
+ # reach before it starts rejecting writes.
+ # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
+ # Vaues without a size suffix are in bytes.
+ # cache-max-memory-size = "1g"
+
+ # CacheSnapshotMemorySize is the size at which the engine will
+ # snapshot the cache and write it to a TSM file, freeing up memory
+ # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
+ # Values without a size suffix are in bytes.
+ # cache-snapshot-memory-size = "25m"
+
+ # CacheSnapshotWriteColdDuration is the length of time at
+ # which the engine will snapshot the cache and write it to
+ # a new TSM file if the shard hasn't received writes or deletes
+ # cache-snapshot-write-cold-duration = "10m"
+
+ # CompactFullWriteColdDuration is the duration at which the engine
+ # will compact all TSM files in a shard if it hasn't received a
+ # write or delete
+ # compact-full-write-cold-duration = "4h"
+
+ # The maximum number of concurrent full and level compactions that can run at one time. A
+ # value of 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime. Any number greater
+ # than 0 limits compactions to that value. This setting does not apply
+ # to cache snapshotting.
+ # max-concurrent-compactions = 0
+
+ # The maximum series allowed per database before writes are dropped. This limit can prevent
+ # high cardinality issues at the database level. This limit can be disabled by setting it to
+ # 0.
+ # max-series-per-database = 1000000
+
+ # The maximum number of tag values per tag that are allowed before writes are dropped. This limit
+ # can prevent high cardinality tag values from being written to a measurement. This limit can be
+ # disabled by setting it to 0.
+ # max-values-per-tag = 100000
+
+###
+### [coordinator]
+###
+### Controls the clustering service configuration.
+###
+
+[coordinator]
+ # The default time a write request will wait until a "timeout" error is returned to the caller.
+ # write-timeout = "10s"
+
+ # The maximum number of concurrent queries allowed to be executing at one time. If a query is
+ # executed and exceeds this limit, an error is returned to the caller. This limit can be disabled
+ # by setting it to 0.
+ # max-concurrent-queries = 0
+
+ # The maximum time a query will is allowed to execute before being killed by the system. This limit
+ # can help prevent run away queries. Setting the value to 0 disables the limit.
+ # query-timeout = "0s"
+
+ # The time threshold when a query will be logged as a slow query. This limit can be set to help
+ # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging.
+ # log-queries-after = "0s"
+
+ # The maximum number of points a SELECT can process. A value of 0 will make
+ # the maximum point count unlimited. This will only be checked every second so queries will not
+ # be aborted immediately when hitting the limit.
+ # max-select-point = 0
+
+ # The maximum number of series a SELECT can run. A value of 0 will make the maximum series
+ # count unlimited.
+ # max-select-series = 0
+
+ # The maxium number of group by time bucket a SELECT can create. A value of zero will max the maximum
+ # number of buckets unlimited.
+ # max-select-buckets = 0
+
+###
+### [retention]
+###
+### Controls the enforcement of retention policies for evicting old data.
+###
+
+[retention]
+ # Determines whether retention policy enforcement enabled.
+ # enabled = true
+
+ # The interval of time when retention policy enforcement checks run.
+ # check-interval = "30m"
+
+###
+### [shard-precreation]
+###
+### Controls the precreation of shards, so they are available before data arrives.
+### Only shards that, after creation, will have both a start- and end-time in the
+### future, will ever be created. Shards are never precreated that would be wholly
+### or partially in the past.
+
+[shard-precreation]
+ # Determines whether shard pre-creation service is enabled.
+ # enabled = true
+
+ # The interval of time when the check to pre-create new shards runs.
+ # check-interval = "10m"
+
+ # The default period ahead of the endtime of a shard group that its successor
+ # group is created.
+ # advance-period = "30m"
+
+###
+### Controls the system self-monitoring, statistics and diagnostics.
+###
+### The internal database for monitoring data is created automatically if
+### if it does not already exist. The target retention within this database
+### is called 'monitor' and is also created with a retention period of 7 days
+### and a replication factor of 1, if it does not exist. In all cases the
+### this retention policy is configured as the default for the database.
+
+[monitor]
+ # Whether to record statistics internally.
+ # store-enabled = true
+
+ # The destination database for recorded statistics
+ # store-database = "_internal"
+
+ # The interval at which to record statistics
+ # store-interval = "10s"
+
+###
+### [http]
+###
+### Controls how the HTTP endpoints are configured. These are the primary
+### mechanism for getting data into and out of InfluxDB.
+###
+
+[http]
+ # Determines whether HTTP endpoint is enabled.
+ # enabled = true
+
+ # The bind address used by the HTTP service.
+ # bind-address = ":8086"
+
+ # Determines whether user authentication is enabled over HTTP/HTTPS.
+ # auth-enabled = false
+
+ # The default realm sent back when issuing a basic auth challenge.
+ # realm = "InfluxDB"
+
+ # Determines whether HTTP request logging is enabled.
+ # log-enabled = true
+
+ # Determines whether detailed write logging is enabled.
+ # write-tracing = false
+
+ # Determines whether the pprof endpoint is enabled. This endpoint is used for
+ # troubleshooting and monitoring.
+ # pprof-enabled = true
+
+ # Determines whether HTTPS is enabled.
+ # https-enabled = false
+
+ # The SSL certificate to use when HTTPS is enabled.
+ # https-certificate = "/etc/ssl/influxdb.pem"
+
+ # Use a separate private key location.
+ # https-private-key = ""
+
+ # The JWT auth shared secret to validate requests using JSON web tokens.
+ # shared-secret = ""
+
+ # The default chunk size for result sets that should be chunked.
+ # max-row-limit = 0
+
+ # The maximum number of HTTP connections that may be open at once. New connections that
+ # would exceed this limit are dropped. Setting this value to 0 disables the limit.
+ # max-connection-limit = 0
+
+ # Enable http service over unix domain socket
+ # unix-socket-enabled = false
+
+ # The path of the unix domain socket.
+ # bind-socket = "/var/run/influxdb.sock"
+
+ # The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit.
+ # max-body-size = 25000000
+
+
+###
+### [ifql]
+###
+### Configures the ifql RPC API.
+###
+
+[ifql]
+ # Determines whether the RPC service is enabled.
+ # enabled = true
+
+ # Determines whether additional logging is enabled.
+ # log-enabled = true
+
+ # The bind address used by the ifql RPC service.
+ # bind-address = ":8082"
+
+
+###
+### [subscriber]
+###
+### Controls the subscriptions, which can be used to fork a copy of all data
+### received by the InfluxDB host.
+###
+
+[subscriber]
+ # Determines whether the subscriber service is enabled.
+ # enabled = true
+
+ # The default timeout for HTTP writes to subscribers.
+ # http-timeout = "30s"
+
+ # Allows insecure HTTPS connections to subscribers. This is useful when testing with self-
+ # signed certificates.
+ # insecure-skip-verify = false
+
+ # The path to the PEM encoded CA certs file. If the empty string, the default system certs will be used
+ # ca-certs = ""
+
+ # The number of writer goroutines processing the write channel.
+ # write-concurrency = 40
+
+ # The number of in-flight writes buffered in the write channel.
+ # write-buffer-size = 1000
+
+
+###
+### [[graphite]]
+###
+### Controls one or many listeners for Graphite data.
+###
+
+[[graphite]]
+ # Determines whether the graphite endpoint is enabled.
+ # enabled = false
+ # database = "graphite"
+ # retention-policy = ""
+ # bind-address = ":2003"
+ # protocol = "tcp"
+ # consistency-level = "one"
+
+ # These next lines control how batching works. You should have this enabled
+ # otherwise you could get dropped metrics or poor performance. Batching
+ # will buffer points in memory if you have many coming in.
+
+ # Flush if this many points get buffered
+ # batch-size = 5000
+
+ # number of batches that may be pending in memory
+ # batch-pending = 10
+
+ # Flush at least this often even if we haven't hit buffer limit
+ # batch-timeout = "1s"
+
+ # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
+ # udp-read-buffer = 0
+
+ ### This string joins multiple matching 'measurement' values providing more control over the final measurement name.
+ # separator = "."
+
+ ### Default tags that will be added to all metrics. These can be overridden at the template level
+ ### or by tags extracted from metric
+ # tags = ["region=us-east", "zone=1c"]
+
+ ### Each template line requires a template pattern. It can have an optional
+ ### filter before the template and separated by spaces. It can also have optional extra
+ ### tags following the template. Multiple tags should be separated by commas and no spaces
+ ### similar to the line protocol format. There can be only one default template.
+ # templates = [
+ # "*.app env.service.resource.measurement",
+ # # Default template
+ # "server.*",
+ # ]
+
+###
+### [collectd]
+###
+### Controls one or many listeners for collectd data.
+###
+
+[[collectd]]
+ enabled = true
+ bind-address = ":25826" # the bind address
+ database = "collectd" # Name of the database that will be written to
+ retention-policy = ""
+ batch-size = 5000 # will flush if this many points get buffered
+ batch-pending = 10 # number of batches that may be pending in memory
+ batch-timeout = "10s"
+ read-buffer = 0 # UDP read buffer size, 0 means to use OS default
+ typesdb = "/opt/collectd/share/collectd/types.db"
+ security-level = "none" # "none", "sign", or "encrypt"
+
+ # enabled = false
+ # bind-address = ":25826"
+ # database = "collectd"
+ # retention-policy = ""
+ #
+ # The collectd service supports either scanning a directory for multiple types
+ # db files, or specifying a single db file.
+ # typesdb = "/usr/local/share/collectd"
+ #
+ # security-level = "none"
+ # auth-file = "/etc/collectd/auth_file"
+
+ # These next lines control how batching works. You should have this enabled
+ # otherwise you could get dropped metrics or poor performance. Batching
+ # will buffer points in memory if you have many coming in.
+
+ # Flush if this many points get buffered
+ # batch-size = 5000
+
+ # Number of batches that may be pending in memory
+ # batch-pending = 10
+
+ # Flush at least this often even if we haven't hit buffer limit
+ # batch-timeout = "10s"
+
+ # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
+ # read-buffer = 0
+
+ # Multi-value plugins can be handled two ways.
+ # "split" will parse and store the multi-value plugin data into separate measurements
+ # "join" will parse and store the multi-value plugin as a single multi-value measurement.
+ # "split" is the default behavior for backward compatability with previous versions of influxdb.
+ # parse-multivalue-plugin = "split"
+###
+### [opentsdb]
+###
+### Controls one or many listeners for OpenTSDB data.
+###
+
+[[opentsdb]]
+ # enabled = false
+ # bind-address = ":4242"
+ # database = "opentsdb"
+ # retention-policy = ""
+ # consistency-level = "one"
+ # tls-enabled = false
+ # certificate= "/etc/ssl/influxdb.pem"
+
+ # Log an error for every malformed point.
+ # log-point-errors = true
+
+ # These next lines control how batching works. You should have this enabled
+ # otherwise you could get dropped metrics or poor performance. Only points
+ # metrics received over the telnet protocol undergo batching.
+
+ # Flush if this many points get buffered
+ # batch-size = 1000
+
+ # Number of batches that may be pending in memory
+ # batch-pending = 5
+
+ # Flush at least this often even if we haven't hit buffer limit
+ # batch-timeout = "1s"
+
+###
+### [[udp]]
+###
+### Controls the listeners for InfluxDB line protocol data via UDP.
+###
+
+[[udp]]
+ # enabled = false
+ # bind-address = ":8089"
+ # database = "udp"
+ # retention-policy = ""
+
+ # These next lines control how batching works. You should have this enabled
+ # otherwise you could get dropped metrics or poor performance. Batching
+ # will buffer points in memory if you have many coming in.
+
+ # Flush if this many points get buffered
+ # batch-size = 5000
+
+ # Number of batches that may be pending in memory
+ # batch-pending = 10
+
+ # Will flush at least this often even if we haven't hit buffer limit
+ # batch-timeout = "1s"
+
+ # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
+ # read-buffer = 0
+
+###
+### [continuous_queries]
+###
+### Controls how continuous queries are run within InfluxDB.
+###
+
+[continuous_queries]
+ # Determines whether the continuous query service is enabled.
+ # enabled = true
+
+ # Controls whether queries are logged when executed by the CQ service.
+ # log-enabled = true
+
+ # Controls whether queries are logged to the self-monitoring data store.
+ # query-stats-enabled = false
+
+ # interval for how often continuous queries will be checked if they need to run
+ # run-interval = "1s"
+
+
diff --git a/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh b/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh
index 55639907..a99b1af5 100755
--- a/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh
+++ b/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
#!/bin/bash
rm -rf /home/networking
diff --git a/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service b/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service
index a6966d82..fe125ccf 100755
--- a/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service
+++ b/plugins/odl_cluster/roles/setup-odl/files/opendaylight.service
@@ -10,7 +10,7 @@ Type=simple
WorkingDirectory=/opt/opendaylight
PermissionsStartOnly=true
ExecStartPre=
-ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/boot/org.apache.karaf.diagnostic.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.jaas.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.main-4.0.9.jar:/opt/opendaylight/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main
+ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/boot/org.apache.karaf.diagnostic.boot-4.0.10.jar:/opt/opendaylight/lib/boot/org.apache.karaf.jaas.boot-4.0.10.jar:/opt/opendaylight/lib/boot/org.apache.karaf.main-4.0.10.jar:/opt/opendaylight/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main
Restart=on-failure
LimitNOFILE=65535
TimeoutStopSec=15
diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml
index 13b4c571..ecc67d29 100755
--- a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml
+++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml
@@ -33,6 +33,8 @@
- name: Stop the Open vSwitch service and clear existing OVSDB
shell: >
service {{ service_ovs_name }} stop ;
+ sleep 3;
rm -rf /var/log/openvswitch/* ;
rm -rf /etc/openvswitch/conf.db ;
+ sleep 3;
service {{ service_ovs_name }} start ;
diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml
index 39d0312f..5faa4a22 100755
--- a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml
+++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-2.yml
@@ -3,7 +3,7 @@
- name: configure odl l3 driver
shell: |
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins \
- odl-router,metering;
+ odl-router_v2,metering,trunk;
when: odl_l3_agent == "Enable"
- name: configure opendaylight -> ml2
diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/odl-pre.yml b/plugins/odl_cluster/roles/setup-odl/tasks/odl-pre.yml
index 64631663..21f0e86b 100755
--- a/plugins/odl_cluster/roles/setup-odl/tasks/odl-pre.yml
+++ b/plugins/odl_cluster/roles/setup-odl/tasks/odl-pre.yml
@@ -35,9 +35,8 @@
{% set _ = compu_l2_list.append(l2_mapping) %}
{% set _ = compu_l3_list.append(l3_mapping) %}
{% endfor %}
- {% set pub_l3_mapping = pub_l3_mapping[0].replace(pub_intf[0], compu_pub_intf) %}
{% set _ = compu_l2_list.append(pub_l2_mapping[0]) %}
- {% set _ = compu_l3_list.append(pub_l3_mapping) %}
+ {% set _ = compu_l3_list.append(pub_l3_mapping[0]) %}
public_bridge: "{{ pub_bridge[0] }}"
contr_public_intf: "{{ pub_intf[0] }}"
contr_l2_mappings: "{{ ','.join(contr_l2_list) }}"
diff --git a/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg b/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg
index 86b2baec..fa0e87f7 100755
--- a/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg
+++ b/plugins/odl_cluster/roles/setup-odl/templates/org.apache.karaf.features.cfg
@@ -37,9 +37,9 @@
# Comma separated list of features repositories to register by default
#
featuresRepositories = \
- mvn:org.opendaylight.integration/features-index/0.7.0/xml/features, \
- mvn:org.apache.karaf.features/framework/4.0.9/xml/features, \
- mvn:org.apache.karaf.features/standard/4.0.9/xml/features
+ mvn:org.opendaylight.integration/features-index/0.7.1/xml/features, \
+ mvn:org.apache.karaf.features/framework/4.0.10/xml/features, \
+ mvn:org.apache.karaf.features/standard/4.0.10/xml/features
#
# Comma separated list of features to install at startup
diff --git a/plugins/odl_cluster/roles/setup-odl/vars/main.yml b/plugins/odl_cluster/roles/setup-odl/vars/main.yml
index 45b6c5e1..c4723e9c 100755
--- a/plugins/odl_cluster/roles/setup-odl/vars/main.yml
+++ b/plugins/odl_cluster/roles/setup-odl/vars/main.yml
@@ -9,16 +9,18 @@
---
openstack_passwd_file: /etc/openstack_deploy/user_secrets.yml
-os_ver: 16.0.5
-os_name: pike
+# yamllint disable rule:line-length
+os_ver: "{{ lookup('yamlfile', '/opt/openstack-ansible/inventory/group_vars/all/all.yml key=openstack_release') }}"
+# yamllint enable rule:line-length
+os_name: queens
odl_username: admin
odl_password: admin
odl_api_port: 8181
-odl_pkg_url: karaf-0.7.0.tar.gz
-odl_pkg_name: karaf-0.7.0.tar.gz
+odl_pkg_url: karaf-0.7.1.tar.gz
+odl_pkg_name: karaf-0.7.1.tar.gz
odl_home: "/opt/opendaylight/"
odl_base_features:
- config
@@ -48,7 +50,7 @@ odl_extra_features:
odl_features: "{{ odl_base_features + odl_extra_features }}"
-sdn_package: http://artifacts.opnfv.org/compass4nfv/packages/master/sdn_package.tar.gz
+sdn_package: http://artifacts.opnfv.org/compass4nfv/package/master/sdn_package.tar.gz
jdk8_pkg_name: jdk-8u51-linux-x64.tar.gz
jdk8_script_name: install_jdk8.tar
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh b/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh
index d93da3fd..69f5cd63 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
#!/bin/bash
rm -rf /home/networking
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service b/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service
index a6966d82..fe125ccf 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/files/opendaylight.service
@@ -10,7 +10,7 @@ Type=simple
WorkingDirectory=/opt/opendaylight
PermissionsStartOnly=true
ExecStartPre=
-ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/boot/org.apache.karaf.diagnostic.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.jaas.boot-4.0.9.jar:/opt/opendaylight/lib/boot/org.apache.karaf.main-4.0.9.jar:/opt/opendaylight/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main
+ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/boot/org.apache.karaf.diagnostic.boot-4.0.10.jar:/opt/opendaylight/lib/boot/org.apache.karaf.jaas.boot-4.0.10.jar:/opt/opendaylight/lib/boot/org.apache.karaf.main-4.0.10.jar:/opt/opendaylight/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main
Restart=on-failure
LimitNOFILE=65535
TimeoutStopSec=15
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/files/sfc.conf b/plugins/odl_sfc/roles/setup-odl-sfc/files/sfc.conf
index acf2e2f4..6621a212 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/files/sfc.conf
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/files/sfc.conf
@@ -1,6 +1,6 @@
[DEFAULT]
-service_plugins = odl-router,metering,networking_sfc.services.sfc.plugin.SfcPlugin,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin
+service_plugins = odl-router_v2,metering,trunk,networking_sfc.services.sfc.plugin.SfcPlugin,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin
[sfc]
drivers = odl
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml
index 684f314c..13b4c571 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml
@@ -8,7 +8,7 @@
- name: install networking-odl
pip:
name: networking-odl
- virtualenv: /openstack/venvs/neutron-15.1.4
+ virtualenv: /openstack/venvs/neutron-{{ os_ver }}
- name: configure vsctl for dhcp agent
shell: |
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-2.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-2.yml
index 82a26005..39b501db 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-2.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-2.yml
@@ -70,7 +70,7 @@
- name: Set host OVS configurations
command: |
- /openstack/venvs/neutron-15.1.4/bin/neutron-odl-ovs-hostconfig \
+ /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-odl-ovs-hostconfig \
--datapath_type=system --bridge_mappings={{ contr_l2_mappings }}
when:
- inventory_hostname not in groups['nova_compute']
@@ -78,7 +78,7 @@
- name: Set host OVS configurations
command: |
- /openstack/venvs/neutron-15.1.4/bin/neutron-odl-ovs-hostconfig \
+ /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-odl-ovs-hostconfig \
--datapath_type=system --bridge_mappings={{ contr_l3_mappings }}
when:
- inventory_hostname not in groups['nova_compute']
@@ -86,14 +86,14 @@
- name: Set host OVS configurations
command: |
- /openstack/venvs/neutron-15.1.4/bin/neutron-odl-ovs-hostconfig --datapath_type=system
+ /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-odl-ovs-hostconfig --datapath_type=system
when:
- inventory_hostname in groups['nova_compute']
- odl_l3_agent == "Disable"
- name: Set host OVS configurations
command: |
- /openstack/venvs/neutron-15.1.4/bin/neutron-odl-ovs-hostconfig
+ /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-odl-ovs-hostconfig
--datapath_type=system --bridge_mappings={{ compu_l3_mappings }}
when:
- inventory_hostname in groups['nova_compute']
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml
index 7b699a35..0eacde6e 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml
@@ -1,7 +1,7 @@
---
- name: copy download script
- copy:
- src: odl_pkg.sh
+ template:
+ src: odl_pkg.sh.j2
dest: /opt/odl_pkg.sh
mode: 0777
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml
index 40149346..0269bb37 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml
@@ -8,12 +8,12 @@
- name: install networking-odl
pip:
name: networking-odl
- virtualenv: /openstack/venvs/neutron-15.1.4 # Todo: hardcode, need to modify
+ virtualenv: /openstack/venvs/neutron-{{ os_ver }}
- name: install networking-sfc
pip:
name: networking-sfc
- virtualenv: /openstack/venvs/neutron-15.1.4
+ virtualenv: /openstack/venvs/neutron-{{ os_ver }}
when: odl_sfc == "Enable"
- name: turn off neutron-server on control node
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml
index d8bcf154..be45567a 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml
@@ -3,7 +3,7 @@
- name: configure odl l3 driver
shell: |
crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins \
- odl-router,metering;
+ odl-router_v2,metering,trunk;
when: odl_l3_agent == "Enable"
- name: configure opendaylight -> ml2
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml
index 0c11e36f..1eb68871 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml
@@ -2,7 +2,7 @@
- name: Perform a Neutron DB online upgrade
command: |
- /openstack/venvs/neutron-15.1.4/bin/neutron-db-manage
+ /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-db-manage
--config-file /etc/neutron/neutron.conf
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini
upgrade --expand
@@ -11,7 +11,7 @@
- name: Perform a Neutron DB offline upgrade
command: |
- /openstack/venvs/neutron-15.1.4/bin/neutron-db-manage
+ /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-db-manage
--config-file /etc/neutron/neutron.conf
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini
upgrade --contract
@@ -20,9 +20,16 @@
- name: SFC DB upgrade
command: |
- /openstack/venvs/neutron-15.1.4/bin/neutron-db-manage
+ /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-db-manage
--subproject networking-sfc
upgrade head
become: "yes"
become_user: "neutron"
when: odl_sfc == "Enable"
+
+- name: fetch ml2_conf.ini to compass-tasks
+ fetch:
+ src: /etc/neutron/plugins/ml2/ml2_conf.ini
+ dest: /tmp/
+ flat: "yes"
+ when: odl_sfc == "Enable"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml
index c43b6dcc..f63edeaa 100644
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml
@@ -3,6 +3,11 @@
- name: upgrade networking-sfc
pip:
name: networking-sfc
- extra_args: -U
- virtualenv: /openstack/venvs/tacker-15.1.4
+ virtualenv: /openstack/venvs/tacker-{{ os_ver }}
when: odl_sfc == "Enable"
+
+- name: stop the other two tacker servers
+ service:
+ name: tacker-server
+ state: stopped
+ when: inventory_hostname != groups['tacker_all'][0]
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml
index 9f1cb79e..55b0e160 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml
@@ -32,3 +32,21 @@
- name: restart opendaylight
shell: sleep 60; service opendaylight restart; sleep 60;
when: inventory_hostname in groups['network_hosts']
+
+- name: creat ml2 directory on ODL hosts
+ file:
+ path: /etc/neutron/plugins/ml2/
+ state: directory
+ mode: 0755
+ when:
+ - inventory_hostname in groups['network_hosts']
+ - odl_sfc == "Enable"
+
+- name: copy ml2_conf.ini to ODL hosts
+ copy:
+ src: /tmp/ml2_conf.ini
+ dest: /etc/neutron/plugins/ml2/ml2_conf.ini
+ mode: 0755
+ when:
+ - inventory_hostname in groups['network_hosts']
+ - odl_sfc == "Enable"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/templates/odl_pkg.sh.j2 b/plugins/odl_sfc/roles/setup-odl-sfc/templates/odl_pkg.sh.j2
new file mode 100755
index 00000000..f8882b23
--- /dev/null
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/templates/odl_pkg.sh.j2
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+rm -rf /home/networking
+rm -rf /home/tmp
+
+mkdir -p /home/networking
+mkdir -p /home/tmp
+
+cd /home/networking
+
+git clone https://github.com/openstack/networking-odl.git -b stable/{{ os_name }}
+git clone https://github.com/openstack/networking-sfc.git -b stable/{{ os_name }}
+
+pip wheel /home/networking/networking-odl/ -w /home/tmp/
+pip wheel /home/networking/networking-sfc/ -w /home/tmp/
+
+cp /home/tmp/networking* /var/www/repo/os-releases/{{ os_ver }}/ubuntu-16.04-x86_64/
+
+sleep 30
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg b/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg
index afb7e6b5..05f7a7cd 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/templates/org.apache.karaf.features.cfg
@@ -37,9 +37,9 @@
# Comma separated list of features repositories to register by default
#
featuresRepositories = \
- mvn:org.opendaylight.integration/features-index/0.7.0/xml/features, \
- mvn:org.apache.karaf.features/framework/4.0.9/xml/features, \
- mvn:org.apache.karaf.features/standard/4.0.9/xml/features
+ mvn:org.opendaylight.integration/features-index/0.7.1/xml/features, \
+ mvn:org.apache.karaf.features/framework/4.0.10/xml/features, \
+ mvn:org.apache.karaf.features/standard/4.0.10/xml/features
#
# Comma separated list of features to install at startup
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml b/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml
index b3d71edb..bc870277 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/vars/main.yml
@@ -9,6 +9,11 @@
---
openstack_passwd_file: /etc/openstack_deploy/user_secrets.yml
+# yamllint disable rule:line-length
+os_ver: "{{ lookup('yamlfile', '/opt/openstack-ansible/inventory/group_vars/all/all.yml key=openstack_release') }}"
+# yamllint enable rule:line-length
+os_name: queens
+
odl_username: admin
odl_password: admin
odl_api_port: 8181
@@ -18,8 +23,8 @@ sfc_plugins:
src: sfc.conf
dst: /opt/sfc.conf
-odl_pkg_url: karaf-0.7.0.tar.gz
-odl_pkg_name: karaf-0.7.0.tar.gz
+odl_pkg_url: karaf-0.7.1.tar.gz
+odl_pkg_name: karaf-0.7.1.tar.gz
odl_home: "/opt/opendaylight/"
odl_base_features:
- config
@@ -49,19 +54,9 @@ odl_extra_features:
odl_features: "{{ odl_base_features + odl_extra_features }}"
-sdn_package: http://artifacts.opnfv.org/compass4nfv/packages/master/sdn_package.tar.gz
-
-# yamllint disable rule:line-length
-networking_odl_url: https://launchpad.net/networking-odl/4.0-ocata/4.0.0/+download/networking-odl-4.0.0.tar.gz
-# yamllint enable rule:line-length
+sdn_package: http://artifacts.opnfv.org/compass4nfv/package/master/sdn_package.tar.gz
jdk8_pkg_name: jdk-8u51-linux-x64.tar.gz
jdk8_script_name: install_jdk8.tar
common_packages_noarch: []
-
-odl_pip: networking-odl-3.2.0
-
-networking_odl_version: 4.0.0
-
-networking_odl_pkg_name: networking-odl-3.2.0.tar.gz
diff --git a/plugins/odl_sfc/roles/sfc-pre-2/files/odl_sfc.patch b/plugins/odl_sfc/roles/sfc-pre-2/files/odl_sfc.patch
new file mode 100644
index 00000000..9e25214a
--- /dev/null
+++ b/plugins/odl_sfc/roles/sfc-pre-2/files/odl_sfc.patch
@@ -0,0 +1,90 @@
+diff --git a/defaults/main.yml b/defaults/main.yml
+index fd6fc37..3ae4bce 100644
+--- a/defaults/main.yml
++++ b/defaults/main.yml
+@@ -381,3 +381,9 @@ dragonflow_ex_peer_patch_port: patch-int
+ dragonflow_int_peer_patch_port: patch-ex
+ dragonflow_external_network_bridge: br-ex
+ dragonflow_publisher_bind_address: "*"
++
++# Install Openvswitch without NSH support
++ovs_nsh_support: True
++#
++# # Set higher priority to mardim PPA when ovs_nsh_support is True
++ovs_nsh_apt_pinned_packages: [{ package: "*", release: "LP-PPA-mardim-mardim-ppa"}]
+diff --git a/meta/main.yml b/meta/main.yml
+index 418b4a9..7a6739a 100644
+--- a/meta/main.yml
++++ b/meta/main.yml
+@@ -39,7 +39,10 @@ galaxy_info:
+ - openstack
+ dependencies:
+ - pip_install
+- - apt_package_pinning
++ - role: apt_package_pinning
++ apt_pinned_packages: "{{ ovs_nsh_support | ternary(ovs_nsh_apt_pinned_packages, omit) }}"
++ when:
++ - ansible_pkg_mgr == 'apt'
+ - galera_client
+ - openstack_openrc
+ - role: etcd
+diff --git a/tasks/neutron_pre_install.yml b/tasks/neutron_pre_install.yml
+index 59fd87f..1162a2b 100644
+--- a/tasks/neutron_pre_install.yml
++++ b/tasks/neutron_pre_install.yml
+@@ -79,3 +79,12 @@
+ mode: "0440"
+ owner: "root"
+ group: "root"
++
++- name: add ovs-nsh repo
++ apt_repository:
++ repo: "ppa:mardim/mardim-ppa"
++ update_cache: True
++ state: present
++ when:
++ - ansible_pkg_mgr == 'apt'
++ - ovs_nsh_support | bool
+diff --git a/vars/main.yml b/vars/main.yml
+index dec0e36..afdff3f 100644
+--- a/vars/main.yml
++++ b/vars/main.yml
+@@ -27,8 +27,12 @@ neutron_package_list: |-
+ {% if (neutron_services['neutron-openvswitch-agent']['group'] in group_names and neutron_services['neutron-openvswitch-agent'].service_en | bool)
+ or (neutron_services['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool)
+ or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool) %}
++ {% if (ovs_nsh_support and ansible_pkg_mgr in ['apt', 'zypper']) %}
++ {% set _ = packages.extend(neutron_ovs_nsh_required_packages) %}
++ {% else %}
+ {% set _ = packages.extend(neutron_ovs_distro_packages) %}
+ {% endif %}
++ {% endif %}
+ {% if neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool %}
+ {% set _ = packages.extend(neutron_lxb_distro_packages) %}
+ {% endif %}
+@@ -50,6 +54,8 @@ calico_felix_bin: /usr/local/bin/calico-felix
+ ### Python code details
+ ###
+
++neutron_ovs_nsh_distro_packages: []
++
+ neutron_requires_pip_packages:
+ - virtualenv
+ - virtualenv-tools
+diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml
+index eb52ebf..a2c6275 100644
+--- a/vars/ubuntu-16.04.yml
++++ b/vars/ubuntu-16.04.yml
+@@ -25,6 +25,12 @@ neutron_vpnaas_service_provider: VPN:strongswan:neutron_vpnaas.services.vpn.serv
+ ## APT Cache options
+ cache_timeout: 600
+
++neutron_ovs_nsh_required_packages:
++ - openvswitch-datapath-dkms
++ - openvswitch-common
++ - openvswitch-switch
++ - python-openvswitch
++
+ neutron_distro_packages:
+ - conntrack
+ - dnsmasq-base
diff --git a/plugins/odl_sfc/roles/sfc-pre-2/tasks/setup_sfc.yml b/plugins/odl_sfc/roles/sfc-pre-2/tasks/setup_sfc.yml
index a80a81ef..039d5460 100644
--- a/plugins/odl_sfc/roles/sfc-pre-2/tasks/setup_sfc.yml
+++ b/plugins/odl_sfc/roles/sfc-pre-2/tasks/setup_sfc.yml
@@ -7,28 +7,14 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-- name: add ovs package in neutron
- lineinfile:
- dest: /etc/ansible/roles/os_neutron/vars/ubuntu-16.04.yml
- insertbefore: 'openvswitch-common'
- line: ' - openvswitch-datapath-dkms'
-- name: add ovs package in neutron
- lineinfile:
- dest: /etc/ansible/roles/os_neutron/vars/ubuntu-16.04.yml
- insertafter: 'openvswitch-switch'
- line: ' - python-openvswitch'
+- name: copy patch file
+ copy:
+ src: odl_sfc.patch
+ dest: /opt/odl_sfc.patch
-- name: modify ovs installation in neutron
- blockinfile:
- dest: /etc/ansible/roles/os_neutron/tasks/neutron_install.yml
- insertafter: '^# limitations'
- block: |
- - name: add ovs-nsh repo
- apt_repository:
- repo: "ppa:mardim/mardim-ppa"
- update_cache: True
- state: present
- when:
- - inventory_hostname in groups['neutron_openvswitch_agent']
- - inventory_hostname not in groups['nova_compute']
+- name: apply odl_sfc patch to os_neutron
+ shell: |
+ cd /etc/ansible/roles/os_neutron;
+ patch -p1 < /opt/odl_sfc.patch;
+ cd -
diff --git a/plugins/onap/roles/tasks/Ubuntu.yml b/plugins/onap/roles/tasks/Ubuntu.yml
new file mode 100644
index 00000000..a51e5f17
--- /dev/null
+++ b/plugins/onap/roles/tasks/Ubuntu.yml
@@ -0,0 +1,117 @@
+---
+- name: download helm
+ get_url:
+ url: "{{ helm_url }}"
+ dest: /tmp/helm.tar.gz
+ when: inventory_hostname == groups['kube_master'][0]
+ run_once: true
+
+- name: prepare helm
+ shell:
+ tar -zxf /tmp/helm.tar.gz -C /tmp;
+ mv /tmp/linux-amd64/helm /usr/local/bin/helm
+ when: inventory_hostname == groups['kube_master'][0]
+ run_once: true
+
+- name: install tiller
+ shell: >
+ kubectl create serviceaccount --namespace kube-system tiller;
+ kubectl create clusterrolebinding tiller-cluster-rule
+ --clusterrole=cluster-admin
+ --serviceaccount=kube-system:tiller;
+ helm init --service-account tiller
+ when: inventory_hostname == groups['kube_master'][0]
+ run_once: true
+
+- name: git clone oom
+ git:
+ repo: "{{ oom_repo }}"
+ dest: "{{ oom_dest }}"
+ version: "{{ oom_version }}"
+ when: inventory_hostname == groups['kube_master'][0]
+ run_once: true
+
+- name: prepare local repo
+ shell:
+ nohup /bin/sh -c "helm serve &"
+ while true; do curl -s 127.0.0.1:8879 > /dev/null; if [ $? -eq 0 ]; then break; fi; done
+ helm repo add local http://127.0.0.1:8879
+ when: inventory_hostname == groups['kube_master'][0]
+ run_once: true
+
+- name: add helm plugin
+ shell:
+ cp -rf "{{ oom_dest }}/kubernetes/helm/plugins" ~/.helm/
+ when: inventory_hostname == groups['kube_master'][0]
+ run_once: true
+
+- name: make
+ shell:
+ make all
+ args:
+ chdir: "{{ oom_dest }}/kubernetes"
+ when: inventory_hostname == groups['kube_master'][0]
+
+- name: install nfs master
+ apt:
+ pkg: "nfs-kernel-server"
+ state: "present"
+ update_cache: "yes"
+ when: inventory_hostname == groups['kube_master'][0]
+
+- name: create /dockerdata-nfs
+ file:
+ path: /dockerdata-nfs
+ owner: nobody
+ group: nogroup
+ state: directory
+ mode: 0777
+ when: inventory_hostname == groups['kube_master'][0]
+
+- name: install nfs slave
+ apt:
+ pkg: "nfs-common"
+ state: "present"
+ update_cache: "yes"
+ when: inventory_hostname != groups['kube_master'][0]
+
+- name: create /dockerdata-nfs
+ file:
+ path: /dockerdata-nfs
+ state: directory
+ when: inventory_hostname != groups['kube_master'][0]
+
+- name: render /etc/exports
+ template:
+ src: exports.j2
+ dest: /etc/exports
+ when: inventory_hostname == groups['kube_master'][0]
+
+- name: restart nfs service
+ shell:
+ exportfs -a;
+ systemctl restart nfs-kernel-server
+ when: inventory_hostname == groups['kube_master'][0]
+
+- name: register master hostname
+ debug:
+ msg: "{{ ip_settings[groups['kube_master'][0]]['external']['ip'] }}"
+ register: master_ip
+
+- name:
+ shell:
+ mount {{ master_ip.msg }}:/dockerdata-nfs /dockerdata-nfs/
+ when: inventory_hostname != groups['kube_master'][0]
+
+# yamllint disable rule:line-length
+- name: add mount info
+ lineinfile:
+ path: /etc/fstab
+ line: "{{ master_ip.msg }}:/dockerdata-nfs /dockerdata-nfs nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0"
+ when: inventory_hostname != groups['kube_master'][0]
+# yamllint enable rule:line-length
+
+- name: deploy onap
+ shell:
+ helm deploy dev local/onap --namespace onap
+ when: inventory_hostname == groups['kube_master'][0]
diff --git a/plugins/onap/roles/tasks/main.yml b/plugins/onap/roles/tasks/main.yml
new file mode 100644
index 00000000..c9e80427
--- /dev/null
+++ b/plugins/onap/roles/tasks/main.yml
@@ -0,0 +1,11 @@
+#############################################################################
+# Copyright (c) 2019 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+#############################################################################
+---
+- include: "{{ ansible_distribution }}.yml"
+ when: onap is defined and onap == "Enable"
diff --git a/plugins/onap/roles/templates/exports.j2 b/plugins/onap/roles/templates/exports.j2
new file mode 100644
index 00000000..8f5a3f65
--- /dev/null
+++ b/plugins/onap/roles/templates/exports.j2
@@ -0,0 +1 @@
+/dockerdata-nfs{% for host in groups.all %}{% if host != groups.kube_master[0] %} {{ ip_settings[host]['external']['ip'] }}(rw,sync,no_root_squash,no_subtree_check){% endif %}{% endfor %}
diff --git a/plugins/onap/roles/vars/main.yml b/plugins/onap/roles/vars/main.yml
new file mode 100644
index 00000000..83b591a5
--- /dev/null
+++ b/plugins/onap/roles/vars/main.yml
@@ -0,0 +1,13 @@
+#############################################################################
+# Copyright (c) 2019 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+helm_url: https://storage.googleapis.com/kubernetes-helm/helm-v2.9.1-linux-amd64.tar.gz
+oom_repo: https://gerrit.onap.org/r/oom
+oom_dest: /home/oom
+oom_version: casablanca
diff --git a/plugins/opencontrail/plugin.desc b/plugins/opencontrail/plugin.desc
new file mode 100644
index 00000000..82ccd5ee
--- /dev/null
+++ b/plugins/opencontrail/plugin.desc
@@ -0,0 +1,43 @@
+# Plugin for opencontrail service for Compass4nfv.
+# opencontrail provides a sdn network for k8s.
+#
+# More details can be found in the development document.
+# ##############################################################
+---
+plugin:
+ # plugin name,it is also as the switch to enable/disable plugin in scenario
+ # files
+ name: opencontrail
+
+ description: provide a sdn solution for k8s
+
+ maintainers:
+
+ # host os type: centos
+ os_version: centos
+
+ # true: this plugin is deployed separately on a new node
+ # false: this plugin is deployed on controller or compute node
+ independent_hosts: false
+
+ # artifact: package download url for this plugin
+ artifacts:
+ url:
+
+ # orchestration
+ # A plugin can have mutiple components, each component may need to be
+ # installed on different inventory or have its own configuration.
+ # due to Compass4nfv currently only supports ansible, so each component
+ # of the installation and configuration script need to be use ansible.
+ # cm : congfiguration management tool : only ansible support
+ # role: each component corresponds to ansible script that locates in the same
+ # directory as plugin.desc.
+ # phrase:
+ # inventory:
+ orchestration:
+ cm: ansible
+ roles:
+ - role: opencontrail
+ phrase: post_k8s
+ inventory:
+ - localhost
diff --git a/plugins/opencontrail/roles/install-k8s-opencontrail/files/bms-instances.yaml b/plugins/opencontrail/roles/install-k8s-opencontrail/files/bms-instances.yaml
new file mode 100644
index 00000000..7fb70374
--- /dev/null
+++ b/plugins/opencontrail/roles/install-k8s-opencontrail/files/bms-instances.yaml
@@ -0,0 +1,32 @@
+---
+provider_config:
+ bms:
+ ssh_pwd: root
+ ssh_user: root
+ ssh_public_key: /root/.ssh/id_rsa.pub
+ ssh_private_key: /root/.ssh/id_rsa
+ domainsuffix: local
+instances:
+ bms1:
+ provider: bms
+ roles:
+ config_database:
+ config:
+ control:
+ analytics_database:
+ analytics:
+ webui:
+ k8s_master:
+ kubemanager:
+ ip: 192.16.1.211
+ bms2:
+ provider: bms
+ roles:
+ k8s_node:
+ vrouter:
+ ip: 192.16.1.212
+
+contrail_configuration:
+ CONTAINER_REGISTRY: opencontrailnightly
+ CONTRAIL_VERSION: latest
+ KUBERNETES_CLUSTER_PROJECT: {}
diff --git a/plugins/opencontrail/roles/install-k8s-opencontrail/files/kvm-instances.yaml b/plugins/opencontrail/roles/install-k8s-opencontrail/files/kvm-instances.yaml
new file mode 100644
index 00000000..b2f9e6dd
--- /dev/null
+++ b/plugins/opencontrail/roles/install-k8s-opencontrail/files/kvm-instances.yaml
@@ -0,0 +1,32 @@
+---
+provider_config:
+ kvm:
+ ssh_pwd: root
+ ssh_user: root
+ ssh_public_key: /root/.ssh/id_rsa.pub
+ ssh_private_key: /root/.ssh/id_rsa
+ domainsuffix: local
+instances:
+ kvm1:
+ provider: kvm
+ roles:
+ config_database:
+ config:
+ control:
+ analytics_database:
+ analytics:
+ webui:
+ k8s_master:
+ kubemanager:
+ ip: 10.1.0.50
+ kvm2:
+ provider: kvm
+ roles:
+ k8s_node:
+ vrouter:
+ ip: 10.1.0.51
+
+contrail_configuration:
+ CONTAINER_REGISTRY: opencontrailnightly
+ CONTRAIL_VERSION: latest
+ KUBERNETES_CLUSTER_PROJECT: {}
diff --git a/plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors.repo b/plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors.repo
new file mode 100644
index 00000000..4900db69
--- /dev/null
+++ b/plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors.repo
@@ -0,0 +1,32 @@
+[base]
+name=CentOS-$releasever - Base
+mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
+#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+
+#released updates
+[updates]
+name=CentOS-$releasever - Updates
+mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
+#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+
+#additional packages that may be useful
+[extras]
+name=CentOS-$releasever - Extras
+mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
+#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+
+#additional packages that extend functionality of existing packages
+[centosplus]
+name=CentOS-$releasever - Plus
+mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
+#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
+gpgcheck=1
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+
diff --git a/plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors_aarch64.repo b/plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors_aarch64.repo
new file mode 100644
index 00000000..1d622d3c
--- /dev/null
+++ b/plugins/opencontrail/roles/install-k8s-opencontrail/files/mirrors_aarch64.repo
@@ -0,0 +1,22 @@
+[base]
+name=CentOS-$releasever - Base
+baseurl=http://mirror.centos.org/altarch/$releasever/os/$basearch/
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+ file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
+
+#released updates
+[updates]
+name=CentOS-$releasever - Updates
+baseurl=http://mirror.centos.org/altarch/$releasever/updates/$basearch/
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+ file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
+
+#additional packages that may be useful
+[extras]
+name=CentOS-$releasever - Extras
+baseurl=http://mirror.centos.org/altarch/$releasever/extras/$basearch/
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+ file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
diff --git a/plugins/opencontrail/roles/install-k8s-opencontrail/tasks/main.yml b/plugins/opencontrail/roles/install-k8s-opencontrail/tasks/main.yml
new file mode 100644
index 00000000..712ebfa7
--- /dev/null
+++ b/plugins/opencontrail/roles/install-k8s-opencontrail/tasks/main.yml
@@ -0,0 +1,92 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+- name: clean local repo conf
+ file:
+ path: /etc/yum.repos.d
+ state: absent
+ run_once: "True"
+ when: ansible_os_family == 'RedHat'
+
+- name: create local repo conf dir
+ file:
+ path: /etc/yum.repos.d
+ state: directory
+ run_once: "True"
+ when: ansible_os_family == 'RedHat'
+
+- name: configure local mirror repo
+ copy:
+ src: "{{ item }}"
+ dest: /etc/yum.repos.d/mirrors.repo
+ with_first_found:
+ - mirrors_{{ ansible_architecture }}.repo
+ - mirrors.repo
+ run_once: "True"
+ when: ansible_os_family == 'RedHat'
+
+- name: clean local pip conf to use official pip repo
+ file:
+ path: /root/.pip/pip.conf
+ state: absent
+ run_once: "True"
+
+- name: install dependency for ansible update
+ yum:
+ name: "{{ item }}"
+ state: latest
+ with_items:
+ - git
+ - libffi-devel
+ - openssl-devel
+ - python-devel
+ run_once: "True"
+ when: ansible_os_family == 'RedHat'
+
+- name: update python packages
+ pip:
+ name: "{{ item }}"
+ state: latest
+ with_items:
+ - netaddr
+ - jinja2
+
+- name: git clone contrail-ansible-deployer repo
+ shell: |
+ rm -rf /opt/contrail-ansible-deployer
+ git clone https://github.com/Juniper/contrail-ansible-deployer.git \
+ /opt/contrail-ansible-deployer
+
+- name: copy overrided variables
+ copy:
+ src: "{{ item }}"
+ dest: /opt/contrail-ansible-deployer/config/instances.yaml
+ with_first_found:
+ - kvm-instances.yaml
+
+- name: do not restart network
+ shell: |
+ cd /opt/contrail-ansible-deployer
+ sed -i '9, 13d' playbooks/roles/configure_instances/tasks/RedHat.yml
+
+- name: run config playbook
+ shell: |
+ cd /opt/contrail-ansible-deployer
+ ansible-playbook -i inventory/ playbooks/configure_instances.yml \
+ -b -v 2>&1 | tee config-contrail.log
+ tags:
+ - ansible
+
+- name: run install playbook
+ shell: |
+ cd /opt/contrail-ansible-deployer
+ ansible-playbook -e orchestrator=kubernetes -i inventory/ playbooks/install_contrail.yml \
+ -b -v 2>&1 | tee install-contrail.log
+ tags:
+ - ansible
diff --git a/plugins/stor4nfv/plugin.desc b/plugins/stor4nfv/plugin.desc
new file mode 100644
index 00000000..e0a1e690
--- /dev/null
+++ b/plugins/stor4nfv/plugin.desc
@@ -0,0 +1,49 @@
+# Plugin for Stor4nfv service for Compass4nfv.
+# Stor4NFV provides a storage solution based on Ceph and
+# OpenSDS, and focuses on the optimization for storage
+# intensive use cases of NFV, like I/O performance improvements.
+#
+# More details can be found in the development document.
+# ##############################################################
+---
+plugin:
+ # plugin name,it is also as the switch to enable/disable plugin in scenario
+ # files
+ name: stor4nfv
+
+ description: provide a storage solution based on Ceph and OpenSDS
+
+ maintainers:
+
+ # host os type: ubuntu/centos
+ os_version: ubuntu
+
+ # true: this plugin is deployed separately on a new node
+ # false: this plugin is deployed on controller or compute node
+ independent_hosts: false
+
+ # artifact: package download url for this plugin
+ artifacts:
+ url:
+
+ # orchestration
+ # A plugin can have mutiple components, each component may need to be
+ # installed on different inventory or have its own configuration.
+ # due to Compass4nfv currently only supports ansible, so each component
+ # of the installation and configuration script need to be use ansible.
+ # cm : congfiguration management tool : only ansible support
+ # role: each component corresponds to ansible script that locates in the same
+ # directory as plugin.desc.
+ # phrase:
+ # inventory:
+ orchestration:
+ cm: ansible
+ roles:
+ - role: stor4nfv
+ phrase: post_k8s
+ inventory:
+ - localhost
+ - role: os-stor4nfv
+ phrase: post_openstack
+ inventory:
+ - localhost
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh b/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh
new file mode 100644
index 00000000..d921d4e2
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+
+add-apt-repository ppa:ansible/ansible-2.4
+
+apt-get update
+apt-get install -y ansible
+sleep 5
+
+ansible --version
+
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
new file mode 100644
index 00000000..a081c0bd
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+
+cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible
+
+sed -i '/- osdsdock/s/^/#/g' site.yml
+
+sed -i '/- dashboard-installer/s/^/#/g' site.yml
+
+sed -i '/- nbp-installer/s/^/#/g' site.yml
+
+sed -i '/check_ansible_version/a \ ignore_errors: yes\' roles/common/tasks/main.yml
+
+# auth
+sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/auth.yml
+
+# opensds_endpoint
+sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml
+
+# etcd_host
+sed -i 's/^etcd_host.*/etcd_host: '"$2"'/g' group_vars/osdsdb.yml
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml
new file mode 100644
index 00000000..dbaa8d6b
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml
@@ -0,0 +1,13 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: stor4nfv.yml
+ when:
+ - ansible_distribution == 'Ubuntu'
+ - stor4nfv is defined and stor4nfv == "Enable"
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
new file mode 100644
index 00000000..fd9756a4
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
@@ -0,0 +1,72 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- name: install prerequisites package
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - git
+ - gawk
+ - curl
+ - wget
+ - software-properties-common
+
+- name: copy install_ansible script
+ remote_user: root
+ copy:
+ src: install_ansible.sh
+ dest: /opt/install_ansible.sh
+ mode: 0777
+
+- name: install ansible
+ command: su -s /bin/sh -c "/opt/install_ansible.sh"
+ ignore_errors: "true"
+
+- name: disable cinder
+ remote_user: root
+ shell: |
+ lxc-stop -n $(lxc-ls --line | grep cinder_api)
+ lxc-stop -n $(lxc-ls --line | grep cinder_scheduler)
+ ignore_errors: "true"
+
+- name: modify haproxy.cfg and restart haproxy
+ remote_user: root
+ shell: |
+ sed -i \
+ '/frontend cinder_api-front/,/host1_cinder_api_container/ s/^/#/' /etc/haproxy/haproxy.cfg
+ systemctl restart haproxy
+ ignore_errors: "true"
+
+- name: fetch stor4nfv source code
+ remote_user: root
+ shell: |
+ mkdir -p $HOME/gopath/src/github.com/os-stor4nfv && cd $HOME/gopath/src/github.com/os-stor4nfv;
+ rm -rf stor4nfv;
+ git clone https://gerrit.opnfv.org/gerrit/stor4nfv.git
+
+- name: copy os_configure_vars script
+ remote_user: root
+ copy:
+ src: os_configure_vars.sh
+ dest: /opt/os_configure_vars.sh
+ mode: 0777
+
+- name: configure variables for opensds
+ remote_user: root
+ shell: |
+ cd /opt;
+ ./os_configure_vars.sh {{ public_vip.ip }} {{ internal_vip.ip }}
+
+- name: run playbook
+ remote_user: root
+ shell: |
+ cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible;
+ ansible-playbook site.yml -i local.hosts | tee /var/log/os-stor4nfv.log
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
new file mode 100644
index 00000000..d441f420
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
@@ -0,0 +1,143 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- name: ensure opensds.conf exists
+ stat:
+ path: /etc/opensds/opensds.conf
+ register: opensds_exists
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: configure ceph.yaml, opensds.conf
+ remote_user: root
+ shell: |
+ cd /root/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible
+ cp group_vars/ceph/ceph.yaml /etc/opensds/driver/
+ sed -i 's/^ enabled_backends.*/ enabled_backends: ceph/g' /etc/opensds/opensds.conf
+ sudo cat >> /etc/opensds/opensds.conf << OPENSDS_GLOABL_CONFIG_DOC
+
+ [ceph]
+ name = ceph
+ description = Ceph Test
+ driver_name = ceph
+ config_path = /etc/opensds/driver/ceph.yaml
+ OPENSDS_GLOABL_CONFIG_DOC
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: modify osdsdock endpoint
+ remote_user: root
+ shell:
+ _raw_params: |
+ function _modify_osdsdock_endpoint {
+ local ip_addr=$((lxc-info -n $(lxc-ls --line | grep ceph-mon) -iH)|grep "10.1")
+ if [ ! -z "${ip_addr}" ]; then
+ sed -i 's/api_endpoint = localhost:50050/api_endpoint = '"$ip_addr"':50050/g' \
+ /etc/opensds/opensds.conf
+ fi
+ }
+ _modify_osdsdock_endpoint
+ args:
+ executable: /bin/bash
+ become: true
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy ceph.conf from ceph-mon container
+ remote_user: root
+ shell: |
+ mkdir -p /etc/ceph;
+ cp /proc/$(lxc-info -n $(lxc-ls --line | grep ceph-mon) -p -H)/root/etc/ceph/ceph.conf \
+ /etc/ceph/ceph.conf
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy osdsdock executable to ceph-mon container
+ remote_user: root
+ shell: |
+ cd /opt;
+ tar -C opensds-hotpot-linux-amd64 -c . | lxc-attach -n \
+ $(lxc-ls --line | grep ceph-mon) -- /bin/sh -c "tar -C /opt/ -vx; chmod 1777 /opt;"
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy opensds conf files to ceph-mon container
+ remote_user: root
+ shell: |
+ cd /etc;
+ tar -C opensds -c . | lxc-attach -n \
+ $(lxc-ls --line | grep ceph-mon) -- /bin/sh -c "tar -C /tmp/ -vx; chmod 1777 /tmp;"
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: ensure opensds driver exists
+ stat:
+ path: /tmp/driver
+ register: opensds_driver_exists
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: copy opensds conf
+ remote_user: root
+ shell: |
+ mkdir -p /etc/opensds;
+ cp /tmp/opensds.conf /etc/opensds;
+ cp /tmp/policy.json /etc/opensds;
+ cp -r /tmp/driver /etc/opensds;
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: create ceph pool
+ remote_user: root
+ shell: |
+ ceph osd pool create rbd 24 && ceph osd pool set rbd size 1
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: ensure osdsdock exists
+ stat:
+ path: /opt/bin/osdsdock
+ register: opensds_exists
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: start osdsdock daemon
+ remote_user: root
+ shell: |
+ cd /opt && ./bin/osdsdock -daemon
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: ensure osdsctl exists
+ stat:
+ path: /opt/opensds-hotpot-linux-amd64/bin/osdsctl
+ register: osdsctl_exists
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: run cinder-compatible-api, create opensds default profile
+ remote_user: root
+ shell: |
+ cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible;
+ export OPENSDS_ENDPOINT=http://{{ public_vip.ip }}:50040;
+ export CINDER_ENDPOINT=http://{{ internal_vip.ip }}:8776/v3;
+ chmod +x ../bin/cindercompatibleapi;
+ ( ( nohup ../bin/cindercompatibleapi > /var/log/cindercompatibleapi.log 2>&1 ) & );
+ cp /opt/opensds-hotpot-linux-amd64/bin/osdsctl /usr/local/bin;
+ export OPENSDS_AUTH_STRATEGY=noauth;
+ osdsctl profile create '{"name": "default", "description": "default policy"}'
+ when:
+ - inventory_hostname in groups['ceph_adm']
+ ignore_errors: "true"
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
new file mode 100644
index 00000000..05ada67a
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
@@ -0,0 +1,14 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: opensds.yml
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- include: post-install.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
new file mode 100644
index 00000000..89432135
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+
+cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible
+
+sed -i 's/^container_enabled.*/container_enabled: false/g' group_vars/common.yml
+
+sed -i 's/^nbp_plugin_type.*/nbp_plugin_type: csi/g' group_vars/common.yml
+
+sed -i 's/^workplace.*/workplace: \/root/g' group_vars/common.yml
+
+sed -i 's/^enabled_backend.*/enabled_backend: ceph/g' group_vars/osdsdock.yml
+
+sed -i 's/^ceph_origin.*/ceph_origin: repository/g' group_vars/ceph/all.yml
+
+sed -i 's/^ceph_repository.*/ceph_repository: community/g' group_vars/ceph/all.yml
+
+sed -i 's/^ceph_stable_release.*/ceph_stable_release: luminous/g' group_vars/ceph/all.yml
+
+sed -i 's|^public_network.*|public_network: '"$1"'|g' group_vars/ceph/all.yml
+
+sed -i 's|^cluster_network.*|cluster_network: '"$2"'|g' group_vars/ceph/all.yml
+
+sed -i 's/^monitor_interface.*/monitor_interface: eth0/g' group_vars/ceph/all.yml
+
+sed -i 's/^devices:.*/devices: [\/dev\/loop0, \/dev\/loop1, \/dev\/loop2]/g' group_vars/ceph/all.yml
+
+sed -i '/dev\/sda/s/^/#/g' group_vars/ceph/all.yml
+
+sed -i 's/^osd_scenario.*/osd_scenario: collocated/g' group_vars/ceph/osds.yml
+
+sed -i 's/^db_endpoint.*/db_endpoint: localhost:62379,localhost:62380/g' group_vars/osdsdb.yml
+
+sed -i 's/^etcd_host.*/etcd_host: 127.0.0.1/g' group_vars/osdsdb.yml
+
+sed -i 's/^etcd_port.*/etcd_port: 62379/g' group_vars/osdsdb.yml
+
+sed -i 's/^etcd_peer_port.*/etcd_peer_port: 62380/g' group_vars/osdsdb.yml
+
+sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/auth.yml
+
+sed -i '/check_ansible_version/a \ ignore_errors: yes\' roles/common/tasks/main.yml
+
+sed -i '/- dashboard-installer/s/^/#/g' site.yml
+
+# comment csi create pods in Stor4nfv
+sed -i '/kubectl create/s/^/#/g' roles/nbp-installer/scenarios/csi.yml
+
+sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml
+
+sed -i '/and service_ceph_osd_status.rc == 0/s/^/#/g' roles/osdsdock/scenarios/ceph.yml
+sed -i '/and service_ceph_osd_status.rc == 0/a \ when: service_ceph_mon_status.rc == 0\' \
+ roles/osdsdock/scenarios/ceph.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh b/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
new file mode 100644
index 00000000..d921d4e2
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+
+add-apt-repository ppa:ansible/ansible-2.4
+
+apt-get update
+apt-get install -y ansible
+sleep 5
+
+ansible --version
+
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
new file mode 100644
index 00000000..dbaa8d6b
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
@@ -0,0 +1,13 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: stor4nfv.yml
+ when:
+ - ansible_distribution == 'Ubuntu'
+ - stor4nfv is defined and stor4nfv == "Enable"
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
new file mode 100644
index 00000000..e84ce0aa
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
@@ -0,0 +1,72 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- name: install prerequisites package
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - make
+ - gcc
+ - gawk
+
+- name: copy install_ansible script
+ remote_user: root
+ copy:
+ src: install_ansible.sh
+ dest: /opt/install_ansible.sh
+ mode: 0777
+
+- name: install ansible
+ command: su -s /bin/sh -c "/opt/install_ansible.sh"
+
+- name: fetch stor4nfv source code
+ remote_user: root
+ shell: |
+ mkdir -p $HOME/gopath/src/github.com/stor4nfv && cd $HOME/gopath/src/github.com/stor4nfv;
+ git clone https://gerrit.opnfv.org/gerrit/stor4nfv.git
+
+- name: copy configure_vars script
+ remote_user: root
+ copy:
+ src: configure_vars.sh
+ dest: /opt/configure_vars.sh
+ mode: 0777
+
+- name: configure variables for ceph, opensds
+ remote_user: root
+ shell: |
+ cd /opt;
+ ./configure_vars.sh {{ mgmt_cidr }} {{ external_cidr }}
+
+- name: render ceph inventory
+ remote_user: root
+ template:
+ src: ceph.hosts.j2
+ dest: $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible/group_vars/ceph/ceph.hosts
+
+- name: render opensds, nbp inventory
+ remote_user: root
+ template:
+ src: opensds-nbp.hosts.j2
+ dest: $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible/local.hosts
+
+- name: force to run the second etcd cluster
+ remote_user: root
+ lineinfile:
+ dest: $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible/roles/osdsdb/scenarios/etcd.yml
+ state: absent
+ regexp: 'when: service_etcd_status.rc != 0'
+
+- name: run playbook
+ remote_user: root
+ shell: |
+ cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible;
+ ansible-playbook site.yml -i local.hosts | tee /var/log/stor4nfv.log
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
new file mode 100644
index 00000000..501d3baa
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
@@ -0,0 +1,69 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- name: define image architecture
+ set_fact:
+ imgarch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}"
+
+- name: ensure ceph-ansible dir exists
+ stat:
+ path: /opt/ceph-ansible
+ ignore_errors: "true"
+ register: ceph_ansible_exists
+
+- name: copy post-install.yml to /opt/ceph-ansible
+ remote_user: root
+ template:
+ src: post-install.yml.j2
+ dest: /opt/ceph-ansible/post-install.yml
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: run post-install playbook
+ shell: ansible-playbook post-install.yml -i ceph.hosts
+ become: true
+ args:
+ chdir: /opt/ceph-ansible
+ ignore_errors: "true"
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: remove post-install.yml
+ file:
+ path: /opt/ceph-ansible/post-install.yml
+ state: absent
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: ensure osdsctl exists
+ stat:
+ path: /opt/opensds-hotpot-linux-{{ imgarch }}/bin/osdsctl
+ ignore_errors: "true"
+ register: osdsctl_exists
+
+- name: ensure opensds csi directory exists
+ stat:
+ path: /opt/opensds-sushi-linux-{{ imgarch }}
+ ignore_errors: "true"
+ register: csi_dir_exists
+
+- name: create opensds default profile, create csi pods
+ remote_user: root
+ shell: |
+ cp /opt/opensds-hotpot-linux-{{ imgarch }}/bin/osdsctl /usr/local/bin;
+ export OPENSDS_ENDPOINT=http://{{ public_vip.ip }}:50040;
+ export OPENSDS_AUTH_STRATEGY=noauth;
+ osdsctl profile create '{"name": "default", "description": "default policy"}';
+ cd /opt/opensds-sushi-linux-{{ imgarch }};
+ kubectl create -f csi/deploy/kubernetes
+ ignore_errors: "true"
+ when:
+ - osdsctl_exists.stat.exists is defined and osdsctl_exists.stat.exists
+ - csi_dir_exists.stat.exists is defined and csi_dir_exists.stat.exists
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml
new file mode 100644
index 00000000..57bae793
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml
@@ -0,0 +1,12 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: opensds.yml
+
+- include: post-install.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/templates/ceph.hosts.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/ceph.hosts.j2
new file mode 100644
index 00000000..fda313d4
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/templates/ceph.hosts.j2
@@ -0,0 +1,14 @@
+[mons]
+{% for controller in hostvars[inventory_hostname]['groups']['kube_master'] %}
+{{ controller }} ansible_ssh_host={{ hostvars[controller]['ansible_ssh_host'] }}
+{% endfor %}
+
+[osds]
+{% for controller in hostvars[inventory_hostname]['groups']['storage_node'] %}
+{{ controller }} ansible_ssh_host={{ hostvars[controller]['ansible_ssh_host'] }}
+{% endfor %}
+
+[mgrs]
+{% for controller in hostvars[inventory_hostname]['groups']['kube_master'] %}
+{{ controller }} ansible_ssh_host={{ hostvars[controller]['ansible_ssh_host'] }}
+{% endfor %}
diff --git a/plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j2
new file mode 100644
index 00000000..c93f2b77
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j2
@@ -0,0 +1,14 @@
+[controllers]
+{% for controller in hostvars[inventory_hostname]['groups']['storage_master'] %}
+{{ controller }} ansible_ssh_host={{ hostvars[controller]['ansible_ssh_host'] }}
+{% endfor %}
+
+[docks]
+{% for dock in hostvars[inventory_hostname]['groups']['storage_master'] %}
+{{ dock }} ansible_ssh_host={{ hostvars[dock]['ansible_ssh_host'] }}
+{% endfor %}
+
+[worker-nodes]
+{% for worker in hostvars[inventory_hostname]['groups']['storage_master'] %}
+{{ worker }} ansible_ssh_host={{ hostvars[worker]['ansible_ssh_host'] }}
+{% endfor %}
diff --git a/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2
new file mode 100644
index 00000000..662abc34
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2
@@ -0,0 +1,20 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- hosts:
+ - mons
+ - osds
+ - mgrs
+
+ tasks:
+ - name: run modprobe rbd
+ remote_user: root
+ command: modprobe rbd
+ ignore_errors: "true"