aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qtip/ansible_library/plugins/action/aggregate.py36
-rw-r--r--qtip/ansible_library/plugins/action/calculate.py4
-rw-r--r--resources/template/qpi-report.j23
-rw-r--r--tests/integration/fixtures/case.json14
-rw-r--r--tests/integration/fixtures/pod.json6
-rw-r--r--tests/integration/fixtures/project.json4
-rw-r--r--tests/integration/group_vars/all1
-rw-r--r--tests/integration/host_vars/localhost7
-rw-r--r--tests/integration/run.yaml30
-rw-r--r--tests/integration/setup.yaml22
-rw-r--r--tests/unit/ansible_library/plugins/action/calculate_test.py2
11 files changed, 126 insertions, 3 deletions
diff --git a/qtip/ansible_library/plugins/action/aggregate.py b/qtip/ansible_library/plugins/action/aggregate.py
new file mode 100644
index 00000000..6e280419
--- /dev/null
+++ b/qtip/ansible_library/plugins/action/aggregate.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+###############################################################
+# Copyright (c) 2017 ZTE Corporation
+#
+# 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
+##############################################################################
+
+from numpy import mean
+
+from ansible.plugins.action import ActionBase
+
+
+class ActionModule(ActionBase):
+ def run(self, tmp=None, task_vars=None):
+
+ if task_vars is None:
+ task_vars = dict()
+
+ result = super(ActionModule, self).run(tmp, task_vars)
+
+ if result.get('skipped', False):
+ return result
+
+ return aggregate(self._task.args.get('group'), task_vars)
+
+
+# aggregate QPI results
+def aggregate(group, task_vars):
+ qpi_results = [task_vars['hostvars'][host]['qpi_result'] for host in task_vars['groups'][group]]
+ return {
+ 'score': int(mean([r['score'] for r in qpi_results]))
+ }
diff --git a/qtip/ansible_library/plugins/action/calculate.py b/qtip/ansible_library/plugins/action/calculate.py
index ac7f10f2..fade367f 100644
--- a/qtip/ansible_library/plugins/action/calculate.py
+++ b/qtip/ansible_library/plugins/action/calculate.py
@@ -45,8 +45,10 @@ def calc_qpi(qpi_spec, metrics):
section_results = [{'name': s['name'], 'result': calc_section(s, metrics)}
for s in qpi_spec['sections']]
+
# TODO(yujunz): use formula in spec
- qpi_score = mean([r['result']['score'] for r in section_results])
+ standard_score = 2048
+ qpi_score = int(mean([r['result']['score'] for r in section_results]) * standard_score)
return {
'spec': qpi_spec,
'score': qpi_score,
diff --git a/resources/template/qpi-report.j2 b/resources/template/qpi-report.j2
index afe9bfb8..6ca73634 100644
--- a/resources/template/qpi-report.j2
+++ b/resources/template/qpi-report.j2
@@ -1,4 +1,7 @@
Sample QPI Report
+
+Pod: {{ pod_result.score }}
+
{% for host in groups['compute'] %}
{% set qpi_result = hostvars[host].qpi_result %}
diff --git a/tests/integration/fixtures/case.json b/tests/integration/fixtures/case.json
new file mode 100644
index 00000000..22abc40f
--- /dev/null
+++ b/tests/integration/fixtures/case.json
@@ -0,0 +1,14 @@
+{
+ "run": "",
+ "name": "compute",
+ "ci_loop": "",
+ "tags": "",
+ "url": "",
+ "domains": "",
+ "dependencies": "",
+ "version": "",
+ "criteria": "",
+ "tier": "",
+ "blocking": "",
+ "description": ""
+} \ No newline at end of file
diff --git a/tests/integration/fixtures/pod.json b/tests/integration/fixtures/pod.json
new file mode 100644
index 00000000..8c2863ba
--- /dev/null
+++ b/tests/integration/fixtures/pod.json
@@ -0,0 +1,6 @@
+{
+ "details": "",
+ "role": "",
+ "name": "internal",
+ "mode": ""
+} \ No newline at end of file
diff --git a/tests/integration/fixtures/project.json b/tests/integration/fixtures/project.json
new file mode 100644
index 00000000..ecd03e83
--- /dev/null
+++ b/tests/integration/fixtures/project.json
@@ -0,0 +1,4 @@
+{
+ "name": "qtip",
+ "description": "Platform Performance Benchmarking"
+} \ No newline at end of file
diff --git a/tests/integration/group_vars/all b/tests/integration/group_vars/all
index 7c56f570..16a93f46 100644
--- a/tests/integration/group_vars/all
+++ b/tests/integration/group_vars/all
@@ -1,2 +1,3 @@
qtip_resources: ../../resources
qtip_reports: ./reports
+qtip_fixtures: ./fixtures
diff --git a/tests/integration/host_vars/localhost b/tests/integration/host_vars/localhost
new file mode 100644
index 00000000..18d764cc
--- /dev/null
+++ b/tests/integration/host_vars/localhost
@@ -0,0 +1,7 @@
+testapi_url: http://localhost:8000/api/v1
+project_name: qtip
+case_name: compute
+pod_name: internal
+installer: fuel
+version: master
+scenario: demo
diff --git a/tests/integration/run.yaml b/tests/integration/run.yaml
index 86b36284..7545a65e 100644
--- a/tests/integration/run.yaml
+++ b/tests/integration/run.yaml
@@ -33,7 +33,15 @@
delegate_to: localhost
tags: [calculate]
+- hosts: local
+ tasks:
+ - name: aggregate QPI results from all tested nodes
+ aggregate:
+ group: compute
+ register: pod_result
+
# Generate and publish report
+
- hosts: local
tasks:
- name: create report folder
@@ -49,4 +57,24 @@
src: "{{ qtip_resources }}/template/qpi-report.j2"
dest: "{{ qtip_reports }}/qpi-report"
tags: [report]
- # TODO(yujunz) push test result to testapi
+ - name: push result to testapi
+ uri:
+ url: "{{ testapi_url }}/results"
+ body: "{{ item|to_json }}"
+ method: POST
+ body_format: json
+ status_code: 200
+ with_items:
+ -
+ project_name: "{{ project_name }}"
+ case_name: "{{ case_name }}"
+ pod_name: "{{ pod_name }}"
+ installer: "{{ installer }}"
+ version: "{{ version }}"
+ scenario: "{{ scenario }}"
+ start_date: "{{ ansible_date_time.date }}"
+ stop_date: "{{ ansible_date_time.date }}"
+ criteria: ""
+ details: " {{ pod_result }}"
+
+ tags: [testapi]
diff --git a/tests/integration/setup.yaml b/tests/integration/setup.yaml
index 4af9a129..8d055c23 100644
--- a/tests/integration/setup.yaml
+++ b/tests/integration/setup.yaml
@@ -19,3 +19,25 @@
- name: update ssh.cfg file
template: src={{ qtip_resources }}/template/ssh.cfg.j2 dest=./ssh.cfg
delegate_to: localhost
+
+# Initialize testapi database
+- hosts: localhost
+ tasks:
+ - name: create project and pod
+ uri:
+ url: "{{ testapi_url }}/{{item}}s"
+ method: POST
+ body: "{{ lookup('file', '{}/{}.json'.format(qtip_fixtures, item)) }}"
+ status_code: [200, 403]
+ body_format: json
+ with_items:
+ - project
+ - pod
+ - name: create cases
+ uri:
+ url: "{{ testapi_url }}/projects/qtip/cases"
+ method: POST
+ body: "{{ lookup('file', '{}/case.json'.format(qtip_fixtures)) }}"
+ status_code: [200, 403]
+ body_format: json
+ tags: [testapi]
diff --git a/tests/unit/ansible_library/plugins/action/calculate_test.py b/tests/unit/ansible_library/plugins/action/calculate_test.py
index ae163102..3b34d9f5 100644
--- a/tests/unit/ansible_library/plugins/action/calculate_test.py
+++ b/tests/unit/ansible_library/plugins/action/calculate_test.py
@@ -67,7 +67,7 @@ def section_result(metric_result):
@pytest.fixture()
def qpi_result(qpi_spec, section_result, metrics):
- return {'score': 1.0,
+ return {'score': 2048,
'spec': qpi_spec,
'metrics': metrics,
'section_results': [{'name': 'ssl', 'result': section_result}]}
e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# vim: set ts=2 et:
openstack-phase1:
  series: trusty
  services:
    nodes-api:
      charm: "cs:trusty/ubuntu"
      num_units: 3
      constraints: tags=control
    nodes-compute:
      charm: "cs:trusty/ubuntu"
      num_units: 2
      constraints: tags=compute
    ntp:
      charm: "cs:trusty/ntp"
  relations:
    - - "ntp:juju-info"
      - "nodes-api:juju-info"
    - - "ntp:juju-info"
      - "nodes-compute:juju-info"
openstack-phase2:
  inherits: openstack-phase1
  services:
    percona-cluster:
      branch: "lp:~openstack-charmers/charms/trusty/percona-cluster/next"
      num_units: 3
      options:
        dataset-size: 2G
        lp1366997-workaround: true
        max-connections: 10000
        root-password: 293rhc395m
        sst-password: 127rc14t51
        vip: 10.4.1.15
      to:
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=2"
    hacluster-keystone:
      branch: "lp:~openstack-charmers/charms/trusty/hacluster/next"
      options:
        corosync_key: |
          'QisjNpoKHLkvyc3PEdDHP5VZjgD0kOk9t0ABPWmCELlu5AgWgnW6bJd34BVXO7VhW+3ZwNQM3W+bZ3pl28ftY4ki4N/S0KLFNia5egFgiA3AH2QXLnokS7OYXuu6GMJJ1S5mDe6P5zU+tfJe/Mebq24u7CgR0gAvohSPRdDTwdY='
#    hacluster-heat:
#      branch: "lp:~openstack-charmers/charms/trusty/hacluster/next"
#      options:
#        corosync_key: |
#          'Q29yb3N5bmMgQ2x1c3RlciBFbmdpbmUgQXV0aGVudGljYXRpb24ga2V5IGdlbmVyYXRvci4KR2F0aGVyaW5nIDEwMjQgYml0cyBmb3Iga2V5IGZyb20gL2Rldi9yYW5kb20uClByZXNzIGtleXMgb24geW91ciBrZXlib2FyZCB0byBnZW5lcmF0ZSBlbnRyb3B5LgpQcmVzcyBrZXlzIG9uIHlvdXIga2V5Ym9hcmQgdG8gZ2VuZXJhdGUgZW50cm9weSAoYml0cyA9IDkxMikuClByZXNzIGtleXMgb24geW91ciBrZXlib2FyZCB0byBnZW5lcmF0ZSBlbnRyb3B5IChiaXRzID0gOTYwKS4KUHJlc3Mga2V5cyBvbiB5b3VyIGtleWJvYXJkIHRvIGdlbmVyYX'
    hacluster-horizon:
      branch: "lp:~openstack-charmers/charms/trusty/hacluster/next"
      options:
        corosync_key: |
          'aCVPHw6XYne+Hxv0WPiM3+yEfeIxs0Ly0EMKB494Rdzjf5rE52GcXqqxuvIa/nXJ4GCR+UdKk9FEwcASfYkeu3HDWUld9uTE6pOc+ibWYnybNH7VBfEHW8h9YmQKs3HD2T3wlTcS2irU4CUW7/IKNok4etYdM3iFn1K2ReSGXEI='
    hacluster-nova:
      branch: "lp:~openstack-charmers/charms/trusty/hacluster/next"
      options:
        corosync_key: |
          'gel86qmEze8dYKYbfqIgRpqapJpKtdYL2hxC1y5nWYBPq7EMf6V8mF01IjeUkSRs14CUDrsPpT4PWeom7EOY2fleuLx/aIuqQUfEDkhf/gvaz7BaU4hrmTCoDBK7/HvEwY+/wu4qkEeckzSRPsm9MYzqnLRshh8yjZJ70xU/mmk='
    hacluster-neutron:
      branch: "lp:~openstack-charmers/charms/trusty/hacluster/next"
      options:
        corosync_key: |
          'KNhb4++3jlllbnscS5D3qdzOJDsQPEeZ7zOLZJHbkKrRjX9gRCijVVOiv2JCvq03HqQ7LIufQzWGl9Za8qh0f6QmQ3XhFh/Cb/3WaYFj+tEf0zArWv+8miswmM1z4eyTSrTWBq0dTgx1z96wjBxP5HV0+1LWW+3Ei4oZWyRGeR0='
    hacluster-glance:
      branch: "lp:~openstack-charmers/charms/trusty/hacluster/next"
      options:
        corosync_key: |
          'el1dd8107J5mwQDPS7tEJPZrr0XFfL95+Tku/QG90W5Q5f5SP4W8TRfKvddGmZWZl2lVd1neG5WqaHa1mq/aScJpoflzVAJCvshN7Gd2AjHhLNNugeI8S90j/7wrKUhqiCAlkKaeri2xs5bB5PZ7Z9AHuNZL7SW1al8lxrKhUFI='
    hacluster-ceilometer:
      branch: "lp:~openstack-charmers/charms/trusty/hacluster/next"
      options:
        corosync_key: |
          'cHkgKGJpdHMgPSA5NjApLgpQcmVzcyBrZXlzIG9uIHlvdXIga2V5Ym9hcmQgdG8gZ2VuZXJhdGUgZW50cm9weSAoYml0cyA9IDEwMDgpLgpXcml0aW5nIGNvcm9zeW5jIGtleSB0byAvZXRjL2Nvcm9zeW5jL2F1dGhrZXkuCg=='
    ceilometer:
      branch: "lp:~openstack-charmers/charms/trusty/ceilometer/next"
      num_units: 3
      options:
        vip: 10.4.1.14
        #os-public-hostname: api.public-fqdn
      to:
        - "lxc:nodes-api=2"
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=1"
    ceilometer-agent:
      branch: "lp:~openstack-charmers/charms/trusty/ceilometer-agent/next"
    mongodb:
      charm: "cs:trusty/mongodb"
      num_units: 1
      to:
        - "lxc:nodes-api=0"
    heat:
      branch: "lp:~openstack-charmers/charms/trusty/heat/next"
      num_units: 3
      options:
        #vip: 10.4.1.18
        #os-public-hostname: api.public-fqdn
      to:
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=2"
    ceph:
      branch: lp:~openstack-charmers/charms/trusty/ceph/next
      num_units: 3
      options:
        fsid: 5a791d94-980b-11e4-b6f6-3c970e8b1cf7
        monitor-secret: AQAi5a9UeJXUExAA+By9u+GPhl8/XiUQ4nwI3A==
        osd-devices: ""
        monitor-count: 3
#        osd-reformat: 'false'
#        ceph-cluster-network: 192.168.0.0/24
#        ceph-public-network: 192.168.0.0/24
      to:
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=2"
    ceph-osd:
      branch: lp:~openstack-charmers/charms/trusty/ceph-osd/next
      num_units: 2
      options:
        osd-devices: /srv
        osd-reformat: 'yes'
      to:
        - "nodes-compute=0"
        - "nodes-compute=1"
#        - "nodes-api=0"
    ceph-radosgw:
      branch: lp:~openstack-charmers/charms/trusty/ceph-radosgw/next
      num_units: 1
      options:
        use-embedded-webserver: true
        operator-roles: "Member,admin"
      to:
        - "lxc:nodes-api=0"
    cinder:
      branch: lp:~openstack-charmers/charms/trusty/cinder/next
      num_units: 3
      options:
        block-device: None
        glance-api-version: 2
        #os-public-hostname: api.public-fqdn
#        ha-mcastport: 5401
      to:
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=2"
    cinder-ceph:
      branch: lp:~openstack-charmers/charms/trusty/cinder-ceph/next
    rabbitmq-server:
      branch: lp:~openstack-charmers/charms/trusty/rabbitmq-server/next
      num_units: 3
      to:
        - "lxc:nodes-api=2"
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=1"
    keystone:
      branch: lp:~openstack-charmers/charms/trusty/keystone/next
      num_units: 3
      options:
#        ha-mcastport: 5402
        admin-password: openstack
        admin-token: admin
        vip: 10.4.1.13
        #os-public-hostname: api.public-fqdn
      to:
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=2"
    openstack-dashboard:
      branch: lp:~openstack-charmers/charms/trusty/openstack-dashboard/next
      num_units: 3
      options:
        secret: admin
        vip: 10.4.1.11
        webroot: /
      to:
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=2"
    nova-compute:
      branch: lp:~openstack-charmers/charms/trusty/nova-compute/next
      num_units: 2
      options:
        enable-live-migration: true
        enable-resize: true
        manage-neutron-plugin-legacy-mode: false
        migration-auth-type: ssh
      to:
        - "nodes-compute=0"
        - "nodes-compute=1"
#        - "nodes-api=0"
#        - "nodes-api=1"
#        - "nodes-api=2"
    nova-cloud-controller:
      branch: lp:~openstack-charmers/charms/trusty/nova-cloud-controller/next
      num_units: 3
      options:
        console-access-protocol: novnc
        network-manager: Neutron
        service-guard: true
        neutron-external-network: ext_net
        vip: 10.4.1.16
        #os-public-hostname: api.public-fqdn
      to:
        - "lxc:nodes-api=2"
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=1"
    neutron-api:
      branch: lp:~openstack-charmers/charms/trusty/neutron-api/next
      num_units: 3
      options:
        neutron-security-groups: True
        manage-neutron-plugin-legacy-mode: False
        vip: 10.4.1.17
        #os-public-hostname: api.public-fqdn
      to:
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=2"
    neutron-gateway:
      branch: lp:~openstack-charmers/charms/trusty/neutron-gateway/next
      options:
        #ext-port: "eth1"
        plugin: ovs-odl
        instance-mtu: 1400
      to:
        - "nodes-api=0"
    odl-controller:
      branch: lp:~openstack-charmers/charms/trusty/odl-controller/next
      options:
        install-url: "https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.4.1-Beryllium-SR1/distribution-karaf-0.4.1-Beryllium-SR1.tar.gz"
        profile: "openvswitch-odl-beryllium"
        http-proxy: "http://squid.internal:3128"
        https-proxy: "http://squid.internal:3128"
      to:
        - "lxc:nodes-api=1"
    glance:
      branch: lp:~openstack-charmers/charms/trusty/glance/next
      num_units: 3
      options:
        vip: 10.4.1.12
        #os-public-hostname: api.public-fqdn
#        ha-mcastport: 5402
      to:
        - "lxc:nodes-api=1"
        - "lxc:nodes-api=0"
        - "lxc:nodes-api=2"
    opnfv-promise:
      branch: lp:~narindergupta/charms/trusty/promise/trunk
      num_units: 1
      to:
        - "lxc:nodes-api=2"
    neutron-api-odl:
      branch: lp:~openstack-charmers/charms/trusty/neutron-api-odl/next
      options:
        overlay-network-type: 'vxlan gre'
        security-groups: True
    openvswitch-odl:
      branch: lp:~openstack-charmers/charms/trusty/openvswitch-odl/trunk
#    haproxy:
#      charm: cs:trusty/haproxy
#      options:
#        services: |
#          - service_name: nova
#            service_host: "0.0.0.0"
#            service_port: 8774
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[nova, 10.4.1.16, 8774, check ]]
#          - service_name: swift
#            service_host: "0.0.0.0"
#            service_port: 80
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[swift, 10.4.1.100, 80, check ]]
#          - service_name: glance
#            service_host: "0.0.0.0"
#            service_port: 9292
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[glance, 10.4.1.12, 9292, check ]]
#          - service_name: cinderv2
#            service_host: "0.0.0.0"
#            service_port: 8776
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[cinderv2, 10.4.1.100, 8776, check ]]
#          - service_name: ceilometer
#            service_host: "0.0.0.0"
#            service_port: 8777
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[ceilometer, 10.4.1.14, 8777, check ]]
#          - service_name: keystone
#            service_host: "0.0.0.0"
#            service_port: 5000
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[keystone, 10.4.1.13, 5000, check ]]
#          - service_name: heat
#            service_host: "0.0.0.0"
#            service_port: 8004
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[heat, 10.4.1.18, 8004, check ]]
#          - service_name: neutron
#            service_host: "0.0.0.0"
#            service_port: 9696
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[neutron, 10.4.1.17, 9696, check ]]
#          - service_name: heat-cfn
#            service_host: "0.0.0.0"
#            service_port: 8000
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[heat-cfn, 192.168.2.162, 8000, check ]]
#          - service_name: cinder
#            service_host: "0.0.0.0"
#            service_port: 8776
#            service_options: [balance leastconn, cookie SRVNAME insert]
#            server_options: maxconn 100 cookie S{i} check
#            servers: [[cinder, 192.168.2.161, 8776, check ]]
#      to:
#        - "lxc:nodes-api=0"
  relations:
    - - "glance:ha"
      - "hacluster-glance:ha"
    - - "keystone:ha"
      - "hacluster-keystone:ha"
    - - "neutron-api:ha"
      - "hacluster-neutron:ha"
    - - "nova-cloud-controller:ha"
      - "hacluster-nova:ha"
    - - "openstack-dashboard:ha"
      - "hacluster-horizon:ha"
    - - "ceilometer:ha"
      - "hacluster-ceilometer:ha"
#    - - "heat:ha"
#      - "hacluster-heat:ha"
    - - "neutron-api:neutron-plugin-api-subordinate"
      - "neutron-api-odl:neutron-plugin-api-subordinate"
    - - "nova-compute:neutron-plugin"
      - "openvswitch-odl:neutron-plugin"
    - - "neutron-gateway"
      - "openvswitch-odl"
    - - "openvswitch-odl:ovsdb-manager"
      - "odl-controller:ovsdb-manager"
    - - "neutron-api-odl:odl-controller"
      - "odl-controller:controller-api"
    - - "keystone:shared-db"
      - "percona-cluster:shared-db"
    - - "nova-cloud-controller:shared-db"
      - "percona-cluster:shared-db"
    - - "nova-cloud-controller:amqp"
      - "rabbitmq-server:amqp"
    - - "nova-cloud-controller:image-service"
      - "glance:image-service"
    - - "nova-cloud-controller:identity-service"
      - "keystone:identity-service"
    - - "nova-cloud-controller:cloud-compute"
      - "nova-compute:cloud-compute"
    - - "nova-compute:amqp"
      - "rabbitmq-server:amqp"
    - - "nova-compute:image-service"
      - "glance:image-service"
    - - "glance:shared-db"
      - "percona-cluster:shared-db"
    - - "glance:identity-service"
      - "keystone:identity-service"
    - - "glance:amqp"
      - "rabbitmq-server:amqp"
    - - "openstack-dashboard:identity-service"
      - "keystone:identity-service"
    - - "neutron-api:shared-db"
      - "percona-cluster:shared-db"
    - - "neutron-api:amqp"
      - "rabbitmq-server:amqp"
    - - "nova-cloud-controller:neutron-api"
      - "neutron-api:neutron-api"
    - - "neutron-api:identity-service"
      - "keystone:identity-service"
    - - "neutron-gateway:amqp"
      - "rabbitmq-server:amqp"
    - - "neutron-gateway:neutron-plugin-api"
      - "neutron-api:neutron-plugin-api"
    - - "nova-cloud-controller:quantum-network-service"
      - "neutron-gateway:quantum-network-service"
    - - "ceilometer:amqp"
      - "rabbitmq-server:amqp"
    - - "ceilometer-agent:ceilometer-service"
      - "ceilometer:ceilometer-service"
    - - "ceilometer:identity-service"
      - "keystone:identity-service"
    - - "ceilometer:identity-notifications"
      - "keystone:identity-notifications"
    - - "ceilometer-agent:nova-ceilometer"
      - "nova-compute:nova-ceilometer"
    - - "ceilometer:shared-db"
      - "mongodb:database"
    - - "heat:shared-db"
      - "percona-cluster:shared-db"
    - - "heat:identity-service"
      - "keystone:identity-service"
    - - "heat:amqp"
      - "rabbitmq-server:amqp"
    - - "cinder:image-service"
      - "glance:image-service"
    - - "cinder:amqp"
      - "rabbitmq-server:amqp"
    - - "cinder:identity-service"
      - "keystone:identity-service"
    - - "cinder:cinder-volume-service"
      - "nova-cloud-controller:cinder-volume-service"
    - - "cinder-ceph:storage-backend"
      - "cinder:storage-backend"
    - - "ceph:client"
      - "nova-compute:ceph"
    - - "cinder:shared-db"
      - "percona-cluster:shared-db"
    - - "ceph:client"
      - "cinder-ceph:ceph"
    - - "ceph:client"
      - "glance:ceph"
    - - "ceph-osd:mon"
      - "ceph:osd"
    - - "ceph-radosgw:mon"
      - "ceph:radosgw"
    - - "ceph-radosgw:identity-service"
      - "keystone:identity-service"

trusty-liberty-nodes:
  inherits: openstack-phase1
  overrides:
    series: trusty

trusty-liberty:
  inherits: openstack-phase2
  overrides:
#    cluster_count: 3
    #os-data-network: 10.4.8.0/21
    #ceph-cluster-network: 10.4.0.0/21
    #prefer-ipv6: true
    #enable-dvr: true
    #l2-population: true
    #ext-port: "eth1"
    region: Canonical
    source: "cloud:trusty-liberty"
    openstack-origin: "cloud:trusty-liberty"
    series: trusty
    ceph-osd-replication-count: 2
    admin-role: admin
    keystone-admin-role: admin

trusty-kilo-nodes:
  inherits: openstack-phase1
  overrides:
    series: trusty

trusty-kilo:
  inherits: openstack-phase2
  overrides:
#    cluster_count: 3
    #os-data-network: 10.4.8.0/21
    #ceph-cluster-network: 10.4.0.0/21
    #prefer-ipv6: true
    #enable-dvr: true
    #l2-population: true
    #ext-port: "eth1"
    region: Canonical
    source: "cloud:trusty-kilo"
    openstack-origin: "cloud:trusty-kilo"
    series: trusty
    ceph-osd-replication-count: 2
    admin-role: admin
    keystone-admin-role: admin

trusty-juno-nodes:
  inherits: openstack-phase1
  overrides:
    series: trusty

trusty-juno:
  inherits: openstack-phase2
  overrides:
#    cluster_count: 3
    #os-data-network: 10.4.8.0/21
    #ceph-cluster-network: 10.4.0.0/21
    #prefer-ipv6: true
    #enable-dvr: true
    #l2-population: true
    #ext-port: "eth1"
    region: Canonical
    source: "cloud:trusty-juno"
    openstack-origin: "cloud:trusty-juno"
    series: trusty
    ceph-osd-replication-count: 2
    admin-role: admin
    keystone-admin-role: admin