Browse Source

Import the project

This is really a merge with squash from another repository.  See the
previous history at:
<https://github.com/SmartInfrastructures/fuel-plugin-calamari/tree/pre-gerrit>

Change-Id: Ib989d46ce24398a652cb0218e8db9890cf3590e6
changes/56/241556/1
Daniele Pizzolli 3 years ago
parent
commit
6802915d89
56 changed files with 3129 additions and 0 deletions
  1. 6
    0
      .gitignore
  2. 202
    0
      LICENSE
  3. 120
    0
      README.md
  4. 1
    0
      deployment_scripts/puppet/manifests/calamari-agent.pp
  5. 3
    0
      deployment_scripts/puppet/manifests/calamari-salt.pp
  6. 3
    0
      deployment_scripts/puppet/manifests/calamari-server.pp
  7. 5
    0
      deployment_scripts/puppet/manifests/complete-centos.pp
  8. 3
    0
      deployment_scripts/puppet/manifests/restart-salt.pp
  9. 11
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/Modulefile
  10. 16
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/README
  11. 91
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/files/salt_wrapper.py
  12. 34
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/agent/init.pp
  13. 38
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/agent/params.pp
  14. 26
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/complete_centos.pp
  15. 31
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/init.pp
  16. 19
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/params.pp
  17. 29
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/restart.pp
  18. 37
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/init.pp
  19. 116
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/server/init.pp
  20. 45
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/server/params.pp
  21. 17
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/spec/spec_helper.rb
  22. 12
    0
      deployment_scripts/puppet/modules/fuel_plugin_calamari/tests/init.pp
  23. 192
    0
      doc/Makefile
  24. BIN
      doc/source/_static/calamari-ip.png
  25. BIN
      doc/source/_static/calamari-name.png
  26. BIN
      doc/source/_static/settings-calamari.png
  27. BIN
      doc/source/_static/settings-calamari_fuel70.png
  28. 291
    0
      doc/source/conf.py
  29. 26
    0
      doc/source/index.rst
  30. 61
    0
      doc/source/installation-guide.rst
  31. 50
    0
      doc/source/user-guide.rst
  32. 28
    0
      environment_config.yaml
  33. 39
    0
      metadata.yaml
  34. 5
    0
      pre_build_hook
  35. 0
    0
      repositories/centos/.gitkeep
  36. BIN
      repositories/centos/calamari-clients-1.2.2-32_g931ee58.el6.x86_64.rpm
  37. BIN
      repositories/centos/calamari-clients-1.3-rc_12_g7d36e29.el6.x86_64.rpm
  38. BIN
      repositories/centos/calamari-server-1.3-rc_45_g6013ebc.el6.x86_64.rpm
  39. BIN
      repositories/centos/calamari-server-1.3.0.1-11_g9fb65ae.el6.x86_64.rpm
  40. BIN
      repositories/centos/diamond-3.4.67-0.noarch.rpm
  41. BIN
      repositories/centos/diamond-3.4.67-1.noarch.rpm
  42. BIN
      repositories/centos/epel-release-6-8.noarch.rpm
  43. BIN
      repositories/centos/libcairo-1.14.2-alt1.x86_64.rpm
  44. BIN
      repositories/centos/pycairo-1.8.6-2.1.el6.x86_64.rpm
  45. BIN
      repositories/centos/supervisor-3.0.el6.x86_64.rpm
  46. 0
    0
      repositories/ubuntu/.gitkeep
  47. BIN
      repositories/ubuntu/calamari-clients_1.2.2-32-g931ee58_all.deb
  48. BIN
      repositories/ubuntu/calamari-server_1.0.0-1_amd64.deb
  49. BIN
      repositories/ubuntu/diamond_3.1.0_all.deb
  50. BIN
      repositories/ubuntu/python-msgpack-python_1.0_all.deb
  51. 246
    0
      specs/calamari.rst
  52. 54
    0
      tasks.yaml
  53. 570
    0
      test/settings_default_redhat.yaml
  54. 591
    0
      test/settings_default_ubuntu.yaml
  55. 81
    0
      test/simple-install
  56. 30
    0
      wip/python-msgpack-python

+ 6
- 0
.gitignore View File

@@ -0,0 +1,6 @@
1
+.tox
2
+.build
3
+*.pyc
4
+/doc/build/
5
+/fuel-plugin-calamari-*.noarch*.rpm
6
+/fuel-plugin-calamari-*.pdf

+ 202
- 0
LICENSE View File

@@ -0,0 +1,202 @@
1
+Apache License
2
+                           Version 2.0, January 2004
3
+                        http://www.apache.org/licenses/
4
+
5
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+   1. Definitions.
8
+
9
+      "License" shall mean the terms and conditions for use, reproduction,
10
+      and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+      "Licensor" shall mean the copyright owner or entity authorized by
13
+      the copyright owner that is granting the License.
14
+
15
+      "Legal Entity" shall mean the union of the acting entity and all
16
+      other entities that control, are controlled by, or are under common
17
+      control with that entity. For the purposes of this definition,
18
+      "control" means (i) the power, direct or indirect, to cause the
19
+      direction or management of such entity, whether by contract or
20
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+      outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+      "You" (or "Your") shall mean an individual or Legal Entity
24
+      exercising permissions granted by this License.
25
+
26
+      "Source" form shall mean the preferred form for making modifications,
27
+      including but not limited to software source code, documentation
28
+      source, and configuration files.
29
+
30
+      "Object" form shall mean any form resulting from mechanical
31
+      transformation or translation of a Source form, including but
32
+      not limited to compiled object code, generated documentation,
33
+      and conversions to other media types.
34
+
35
+      "Work" shall mean the work of authorship, whether in Source or
36
+      Object form, made available under the License, as indicated by a
37
+      copyright notice that is included in or attached to the work
38
+      (an example is provided in the Appendix below).
39
+
40
+      "Derivative Works" shall mean any work, whether in Source or Object
41
+      form, that is based on (or derived from) the Work and for which the
42
+      editorial revisions, annotations, elaborations, or other modifications
43
+      represent, as a whole, an original work of authorship. For the purposes
44
+      of this License, Derivative Works shall not include works that remain
45
+      separable from, or merely link (or bind by name) to the interfaces of,
46
+      the Work and Derivative Works thereof.
47
+
48
+      "Contribution" shall mean any work of authorship, including
49
+      the original version of the Work and any modifications or additions
50
+      to that Work or Derivative Works thereof, that is intentionally
51
+      submitted to Licensor for inclusion in the Work by the copyright owner
52
+      or by an individual or Legal Entity authorized to submit on behalf of
53
+      the copyright owner. For the purposes of this definition, "submitted"
54
+      means any form of electronic, verbal, or written communication sent
55
+      to the Licensor or its representatives, including but not limited to
56
+      communication on electronic mailing lists, source code control systems,
57
+      and issue tracking systems that are managed by, or on behalf of, the
58
+      Licensor for the purpose of discussing and improving the Work, but
59
+      excluding communication that is conspicuously marked or otherwise
60
+      designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+      "Contributor" shall mean Licensor and any individual or Legal Entity
63
+      on behalf of whom a Contribution has been received by Licensor and
64
+      subsequently incorporated within the Work.
65
+
66
+   2. Grant of Copyright License. Subject to the terms and conditions of
67
+      this License, each Contributor hereby grants to You a perpetual,
68
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+      copyright license to reproduce, prepare Derivative Works of,
70
+      publicly display, publicly perform, sublicense, and distribute the
71
+      Work and such Derivative Works in Source or Object form.
72
+
73
+   3. Grant of Patent License. Subject to the terms and conditions of
74
+      this License, each Contributor hereby grants to You a perpetual,
75
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+      (except as stated in this section) patent license to make, have made,
77
+      use, offer to sell, sell, import, and otherwise transfer the Work,
78
+      where such license applies only to those patent claims licensable
79
+      by such Contributor that are necessarily infringed by their
80
+      Contribution(s) alone or by combination of their Contribution(s)
81
+      with the Work to which such Contribution(s) was submitted. If You
82
+      institute patent litigation against any entity (including a
83
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+      or a Contribution incorporated within the Work constitutes direct
85
+      or contributory patent infringement, then any patent licenses
86
+      granted to You under this License for that Work shall terminate
87
+      as of the date such litigation is filed.
88
+
89
+   4. Redistribution. You may reproduce and distribute copies of the
90
+      Work or Derivative Works thereof in any medium, with or without
91
+      modifications, and in Source or Object form, provided that You
92
+      meet the following conditions:
93
+
94
+      (a) You must give any other recipients of the Work or
95
+          Derivative Works a copy of this License; and
96
+
97
+      (b) You must cause any modified files to carry prominent notices
98
+          stating that You changed the files; and
99
+
100
+      (c) You must retain, in the Source form of any Derivative Works
101
+          that You distribute, all copyright, patent, trademark, and
102
+          attribution notices from the Source form of the Work,
103
+          excluding those notices that do not pertain to any part of
104
+          the Derivative Works; and
105
+
106
+      (d) If the Work includes a "NOTICE" text file as part of its
107
+          distribution, then any Derivative Works that You distribute must
108
+          include a readable copy of the attribution notices contained
109
+          within such NOTICE file, excluding those notices that do not
110
+          pertain to any part of the Derivative Works, in at least one
111
+          of the following places: within a NOTICE text file distributed
112
+          as part of the Derivative Works; within the Source form or
113
+          documentation, if provided along with the Derivative Works; or,
114
+          within a display generated by the Derivative Works, if and
115
+          wherever such third-party notices normally appear. The contents
116
+          of the NOTICE file are for informational purposes only and
117
+          do not modify the License. You may add Your own attribution
118
+          notices within Derivative Works that You distribute, alongside
119
+          or as an addendum to the NOTICE text from the Work, provided
120
+          that such additional attribution notices cannot be construed
121
+          as modifying the License.
122
+
123
+      You may add Your own copyright statement to Your modifications and
124
+      may provide additional or different license terms and conditions
125
+      for use, reproduction, or distribution of Your modifications, or
126
+      for any such Derivative Works as a whole, provided Your use,
127
+      reproduction, and distribution of the Work otherwise complies with
128
+      the conditions stated in this License.
129
+
130
+   5. Submission of Contributions. Unless You explicitly state otherwise,
131
+      any Contribution intentionally submitted for inclusion in the Work
132
+      by You to the Licensor shall be under the terms and conditions of
133
+      this License, without any additional terms or conditions.
134
+      Notwithstanding the above, nothing herein shall supersede or modify
135
+      the terms of any separate license agreement you may have executed
136
+      with Licensor regarding such Contributions.
137
+
138
+   6. Trademarks. This License does not grant permission to use the trade
139
+      names, trademarks, service marks, or product names of the Licensor,
140
+      except as required for reasonable and customary use in describing the
141
+      origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+   7. Disclaimer of Warranty. Unless required by applicable law or
144
+      agreed to in writing, Licensor provides the Work (and each
145
+      Contributor provides its Contributions) on an "AS IS" BASIS,
146
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+      implied, including, without limitation, any warranties or conditions
148
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+      PARTICULAR PURPOSE. You are solely responsible for determining the
150
+      appropriateness of using or redistributing the Work and assume any
151
+      risks associated with Your exercise of permissions under this License.
152
+
153
+   8. Limitation of Liability. In no event and under no legal theory,
154
+      whether in tort (including negligence), contract, or otherwise,
155
+      unless required by applicable law (such as deliberate and grossly
156
+      negligent acts) or agreed to in writing, shall any Contributor be
157
+      liable to You for damages, including any direct, indirect, special,
158
+      incidental, or consequential damages of any character arising as a
159
+      result of this License or out of the use or inability to use the
160
+      Work (including but not limited to damages for loss of goodwill,
161
+      work stoppage, computer failure or malfunction, or any and all
162
+      other commercial damages or losses), even if such Contributor
163
+      has been advised of the possibility of such damages.
164
+
165
+   9. Accepting Warranty or Additional Liability. While redistributing
166
+      the Work or Derivative Works thereof, You may choose to offer,
167
+      and charge a fee for, acceptance of support, warranty, indemnity,
168
+      or other liability obligations and/or rights consistent with this
169
+      License. However, in accepting such obligations, You may act only
170
+      on Your own behalf and on Your sole responsibility, not on behalf
171
+      of any other Contributor, and only if You agree to indemnify,
172
+      defend, and hold each Contributor harmless for any liability
173
+      incurred by, or claims asserted against, such Contributor by reason
174
+      of your accepting any such warranty or additional liability.
175
+
176
+   END OF TERMS AND CONDITIONS
177
+
178
+   APPENDIX: How to apply the Apache License to your work.
179
+
180
+      To apply the Apache License to your work, attach the following
181
+      boilerplate notice, with the fields enclosed by brackets "{}"
182
+      replaced with your own identifying information. (Don't include
183
+      the brackets!)  The text should be enclosed in the appropriate
184
+      comment syntax for the file format. We also recommend that a
185
+      file or class name and description of purpose be included on the
186
+      same "printed page" as the copyright notice for easier
187
+      identification within third-party archives.
188
+
189
+   Copyright {yyyy} {name of copyright owner}
190
+
191
+   Licensed under the Apache License, Version 2.0 (the "License");
192
+   you may not use this file except in compliance with the License.
193
+   You may obtain a copy of the License at
194
+
195
+       http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+   Unless required by applicable law or agreed to in writing, software
198
+   distributed under the License is distributed on an "AS IS" BASIS,
199
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+   See the License for the specific language governing permissions and
201
+   limitations under the License.
202
+

+ 120
- 0
README.md View File

@@ -0,0 +1,120 @@
1
+fuel-plugin-calamari
2
+====================
3
+
4
+Intro
5
+-----
6
+
7
+This is an working implementation for a plugin that will install
8
+[calamari console for ceph](https://ceph.com/category/calamari/) on a
9
+os-base node with fuel.
10
+
11
+Usage
12
+-----
13
+
14
+Please look at the [install guide](doc/source/installation-guide.rst)
15
+and [user guide](doc/source/user-guide.rst).
16
+
17
+Version installed
18
+-----------------
19
+
20
+The =fuel-camari-plugin= installs the following packages:
21
+
22
+- For Ubuntu:
23
+
24
+  - calamari-clients 1.2.2-32-g931ee58
25
+  - calamari-server 1.0.0-1
26
+  - diamond 3.1.0
27
+  - python-msgpack-python 1.0
28
+
29
+- For CentOS:
30
+
31
+  - calamari-clients 1.3-rc_12_g7d36e29.el6
32
+  - calamari-server 1.3.0.1-11_g9fb65ae.el6
33
+  - diamond 3.4.67-1.noarch.rpm
34
+  - libcairo 1.14.2-alt1
35
+  - pycairo 1.8.6-2.1.el6
36
+  - supervisor 3.0.el6
37
+
38
+Testing
39
+-------
40
+
41
+A simple install script tested with the default values of the
42
+[virtualbox
43
+script](https://github.com/stackforge/fuel-main/blob/master/virtualbox/README.md)
44
+is available once the plugin is installed.  It requires a clean
45
+environment with at least 4 unallocated nodes.
46
+
47
+Run with the following:
48
+
49
+```
50
+cd /var/www/nailgun/plugins/fuel-plugin-calamari-1.0/test/
51
+./simple-install
52
+```
53
+
54
+Debugging
55
+---------
56
+
57
+The following commands may be helpful:
58
+
59
+```
60
+# On the controllers and ceph-osd nodes
61
+
62
+puppet apply --debug \
63
+  --modulepath=/etc/fuel/plugins/fuel-plugin-calamari-1.0/puppet/modules:/etc/puppet/modules \
64
+  /etc/fuel/plugins/fuel-plugin-calamari-1.0/puppet/manifests/calamari-agent.pp
65
+
66
+# On the calamari node
67
+
68
+puppet apply /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp
69
+
70
+puppet apply --debug \
71
+  --modulepath=/etc/fuel/plugins/fuel-plugin-calamari-1.0/puppet/modules:/etc/puppet/modules \
72
+  /etc/fuel/plugins/fuel-plugin-calamari-1.0/puppet/manifests/calamari-server.pp
73
+```
74
+
75
+TODO list
76
+---------
77
+
78
+- Salt change the ceph configuration:
79
+
80
+  Here is the diff in /etc:
81
+
82
+      diff --git a/ceph/ceph.conf b/ceph/ceph.conf
83
+      index 17c676a..cf2f502 100644
84
+      --- a/ceph/ceph.conf
85
+      +++ b/ceph/ceph.conf
86
+      @@ -1,4 +1,5 @@
87
+       [global]
88
+      +osd crush location hook = /usr/bin/calamari-crush-location
89
+       fsid = 783fcc91-e95d-4ce3-b9c2-0a414a4751d3
90
+       mon_initial_members = node-1
91
+       mon_host = 192.168.0.3
92
+      diff --git a/default/diamond b/default/diamond
93
+      index deda518..c936044 100644
94
+      --- a/default/diamond
95
+      +++ b/default/diamond
96
+      @@ -9,4 +9,4 @@
97
+       # Additional options that are passed to the Daemon.
98
+       ENABLE_DIAMOND="yes"
99
+       DIAMOND_PID="/var/run/diamond.pid"
100
+      -DIAMOND_USER="diamond"
101
+      +DIAMOND_USER="root"
102
+
103
+- Do the conf changes will step over puppet?  How can we manage salt
104
+  and puppet to not step on each other?
105
+
106
+- Figure out how to do proper testing and CI (we do not have hardware
107
+  resources for this)
108
+
109
+- Reproducible build of the packages included in the plugin.
110
+
111
+- UI: Does make sense to enable the plugin only if there is some ceph
112
+  depoyed?
113
+
114
+- What happens in case of node ceph node addition?
115
+  What happens in case of node ceph node removal?
116
+
117
+  The puppet code is executed in the new node.  But not on the
118
+  calamari server.  This blueprint addressed the problem:
119
+
120
+  https://blueprints.launchpad.net/fuel/+spec/fuel-task-notify-other-nodes

+ 1
- 0
deployment_scripts/puppet/manifests/calamari-agent.pp View File

@@ -0,0 +1 @@
1
+include fuel_plugin_calamari::agent::init

+ 3
- 0
deployment_scripts/puppet/manifests/calamari-salt.pp View File

@@ -0,0 +1,3 @@
1
+if($::osfamily == 'Redhat') {
2
+  include fuel_plugin_calamari::centos_salt::init
3
+}

+ 3
- 0
deployment_scripts/puppet/manifests/calamari-server.pp View File

@@ -0,0 +1,3 @@
1
+if 'calamari' == hiera('user_node_name') {
2
+  include fuel_plugin_calamari::server::init
3
+}

+ 5
- 0
deployment_scripts/puppet/manifests/complete-centos.pp View File

@@ -0,0 +1,5 @@
1
+if 'calamari' == hiera('user_node_name') {
2
+    if($::osfamily == 'Redhat') {
3
+      include fuel_plugin_calamari::centos_salt::complete_centos
4
+    }
5
+}

+ 3
- 0
deployment_scripts/puppet/manifests/restart-salt.pp View File

@@ -0,0 +1,3 @@
1
+if($::osfamily == 'Redhat') {
2
+    include fuel_plugin_calamari::centos_salt::restart
3
+}

+ 11
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/Modulefile View File

@@ -0,0 +1,11 @@
1
+name    'fuel_plugin_calamari'
2
+version '0.1.0'
3
+source 'UNKNOWN'
4
+author 'fuel'
5
+license 'Apache License, Version 2.0'
6
+summary 'UNKNOWN'
7
+description 'UNKNOWN'
8
+project_page 'UNKNOWN'
9
+
10
+## Add dependencies, if any:
11
+# dependency 'username/name', '>= 1.2.0'

+ 16
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/README View File

@@ -0,0 +1,16 @@
1
+fuel_plugin_calamari
2
+
3
+This is the fuel_plugin_calamari module.
4
+
5
+License
6
+-------
7
+
8
+
9
+Contact
10
+-------
11
+
12
+
13
+Support
14
+-------
15
+
16
+Please log tickets and issues at our [Projects site](https://github.com/stackforge/fuel-plugin-calamari)

+ 91
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/files/salt_wrapper.py View File

@@ -0,0 +1,91 @@
1
+
2
+"""
3
+Wrap all our salt imports into one module.  We do this
4
+to make it clear which parts of the salt API (or internals)
5
+we are touching, and to make it easy to globally handle a
6
+salt ImportError e.g. for building docs in lightweight
7
+environment.
8
+"""
9
+
10
+
11
+import gevent
12
+import logging
13
+
14
+
15
+try:
16
+    try:
17
+        from salt.client import condition_kwarg
18
+    except ImportError:
19
+        # Salt moved this in 382dd5e
20
+        from salt.utils.args import condition_input as condition_kwarg
21
+
22
+    from salt.client import LocalClient  # noqa
23
+    from salt.utils.event import MasterEvent  # noqa
24
+    from salt.key import Key  # noqa
25
+    from salt.config import master_config  # noqa
26
+    from salt.utils.master import MasterPillarUtil  # noqa
27
+    from salt.config import client_config  # noqa
28
+    try:
29
+        from salt.loader import _create_loader
30
+    except ImportError:
31
+        # Salt removed this in b0e1425
32
+        from salt.loader import static_loader as _create_loader
33
+except ImportError:
34
+    condition_kwarg = None
35
+    LocalClient = None
36
+    MasterEvent = None
37
+    Key = None
38
+    master_config = None
39
+    MasterPillarUtil = None
40
+    client_config = lambda x: None
41
+    _create_loader = None
42
+
43
+
44
+class SaltEventSource(object):
45
+    """
46
+    A wrapper around salt's MasterEvent class that closes and re-opens
47
+    the connection if it goes quiet for too long, to ward off mysterious
48
+    silent-death of communications (#8144)
49
+    """
50
+
51
+    # Not a logical timeout, just how long we stick inside a get_event call
52
+    POLL_TIMEOUT = 5
53
+
54
+    # After this long without messages, close and reopen out connection to
55
+    # salt-master.  Don't want to do this gratuitously because it can drop
56
+    # messages during the cutover (lossiness is functionally OK but user
57
+    # might notice).
58
+    SILENCE_TIMEOUT = 20
59
+
60
+    def __init__(self, logger, config):
61
+        """
62
+        :param config: a salt client_config instance
63
+        """
64
+        # getChild isn't in 2.6
65
+        self._log = logging.getLogger('.'.join((logger.name, 'salt')))
66
+        self._silence_counter = 0
67
+        self._config = config
68
+        self._master_event = MasterEvent(self._config['sock_dir'])
69
+
70
+    def _destroy_conn(self, old_ev):
71
+        old_ev.destroy()
72
+
73
+    def get_event(self, *args, **kwargs):
74
+        """
75
+        Wrap MasterEvent.get_event
76
+        """
77
+        ev = self._master_event.get_event(self.POLL_TIMEOUT, *args, **kwargs)
78
+        if ev is None:
79
+            self._silence_counter += self.POLL_TIMEOUT
80
+            if self._silence_counter > self.SILENCE_TIMEOUT:
81
+                self._log.warning("Re-opening connection to salt-master")
82
+
83
+                self._silence_counter = 0
84
+                # Re-open the connection as a precaution against this lack of
85
+                # messages being a symptom of a connection that has gone bad.
86
+                old_ev = self._master_event
87
+                gevent.spawn(lambda: self._destroy_conn(old_ev))
88
+                self._master_event = MasterEvent(self._config['sock_dir'])
89
+        else:
90
+            self._silence_counter = 0
91
+            return ev

+ 34
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/agent/init.pp View File

@@ -0,0 +1,34 @@
1
+# Copyright 2015 CREATE-NET
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you
4
+# may not use this file except in compliance with the License. You may
5
+# obtain a copy of the License at
6
+#
7
+# http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied. See the License for the specific language governing
13
+# permissions and limitations under the License.
14
+
15
+class fuel_plugin_calamari::agent::init {
16
+
17
+  notice('Starting calamari-agent manifest')
18
+
19
+  include fuel_plugin_calamari::agent::params
20
+
21
+  package { $fuel_plugin_calamari::agent::params::packages:
22
+    ensure => present,
23
+    }->
24
+      file { $fuel_plugin_calamari::agent::params::salt_file:
25
+        ensure  => file,
26
+        content => "master: ${fuel_plugin_calamari::agent::params::calamari_ip}"
27
+        }~>
28
+        service{ $fuel_plugin_calamari::agent::params::services:
29
+          enable => true,
30
+        }
31
+
32
+        notice('End of calamari-agent manifest')
33
+
34
+}

+ 38
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/agent/params.pp View File

@@ -0,0 +1,38 @@
1
+# == Class: fuel_plugin_calamari::agent::params
2
+#
3
+# A basic class for calamari plugin params
4
+#
5
+
6
+class fuel_plugin_calamari::agent::params {
7
+
8
+  if($::osfamily == 'Redhat') {
9
+
10
+    $salt_file = '/etc/salt/minion'
11
+
12
+    $packages = ['diamond', 'salt-minion']
13
+    $services = ['salt-minion']
14
+
15
+    } elsif($::osfamily == 'Debian') {
16
+
17
+    $salt_file = '/etc/salt/minion.d/calamari.conf'
18
+
19
+    $packages = ['diamond', 'salt-minion']
20
+    $services = ['salt-minion']
21
+
22
+    } else {
23
+
24
+    fail("Unsupported osfamily ${::osfamily}")
25
+
26
+    }
27
+
28
+    # Search for the calamari ip address from user_node_name and use the
29
+    # first one
30
+    $calamari_nodes = filter_nodes(hiera('nodes'), 'user_node_name', 'calamari')
31
+
32
+    if size($calamari_nodes) < 1 {
33
+      fail('Could not find node "calamari" in the environment')
34
+    }
35
+
36
+    # TODO: figure out if this ip is in the correct network
37
+    $calamari_ip = $calamari_nodes[0]['internal_address']
38
+}

+ 26
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/complete_centos.pp View File

@@ -0,0 +1,26 @@
1
+# Copyright 2015 CREATE-NET
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you
4
+# may not use this file except in compliance with the License. You may
5
+# obtain a copy of the License at
6
+#
7
+# http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied. See the License for the specific language governing
13
+# permissions and limitations under the License.
14
+
15
+class fuel_plugin_calamari::centos_salt::complete_centos {
16
+
17
+    exec { 'salt accept keys':
18
+      command => 'salt-key --yes --accept-all',
19
+      path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/',
20
+      }
21
+
22
+    exec { 'restart cthulhu':
23
+      command => 'supervisorctl restart cthulhu',
24
+      path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/',
25
+        }
26
+}

+ 31
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/init.pp View File

@@ -0,0 +1,31 @@
1
+# Copyright 2015 CREATE-NET
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you
4
+# may not use this file except in compliance with the License. You may
5
+# obtain a copy of the License at
6
+#
7
+# http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied. See the License for the specific language governing
13
+# permissions and limitations under the License.
14
+
15
+class fuel_plugin_calamari::centos_salt::init {
16
+
17
+  notice('Starting centos_salt manifest')
18
+
19
+  include fuel_plugin_calamari::centos_salt::params
20
+
21
+  package { $fuel_plugin_calamari::centos_salt::params::packages:
22
+    ensure => present,
23
+    }->
24
+    service{ $fuel_plugin_calamari::centos_salt::params::services:
25
+      enable => true,
26
+      }->
27
+      exec { 'add_epel_key':
28
+        command => '/bin/rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6'
29
+      }
30
+      notice('End of centos_salt manifest')
31
+}

+ 19
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/params.pp View File

@@ -0,0 +1,19 @@
1
+# == Class: fuel_plugin_calamari::centos_salt::params
2
+#
3
+# A basic class for calamari plugin params
4
+#
5
+
6
+class fuel_plugin_calamari::centos_salt::params {
7
+
8
+  if($::osfamily == 'Redhat') {
9
+
10
+    $packages = ['epel-release-6-8']
11
+    $services = []
12
+
13
+    } else {
14
+
15
+    fail("Unsupported osfamily ${::osfamily}")
16
+
17
+    }
18
+
19
+}

+ 29
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/centos_salt/restart.pp View File

@@ -0,0 +1,29 @@
1
+# Copyright 2015 CREATE-NET
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you
4
+# may not use this file except in compliance with the License. You may
5
+# obtain a copy of the License at
6
+#
7
+# http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied. See the License for the specific language governing
13
+# permissions and limitations under the License.
14
+
15
+class fuel_plugin_calamari::centos_salt::restart {
16
+
17
+    notice('Starting salt-minion restart')
18
+
19
+#For unknow reason it is needed that salt-minion is restarted after some time
20
+  exec { 'sleep':
21
+    command => 'sleep 60',
22
+    path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/'
23
+    }->
24
+
25
+    exec { 'restart salt-minion':
26
+      command => 'service salt-minion restart',
27
+      path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/'
28
+    }
29
+}

+ 37
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/init.pp View File

@@ -0,0 +1,37 @@
1
+# == Class: fuel_plugin_calamari
2
+#
3
+# Full description of class plugin-calamari here.
4
+#
5
+# === Parameters
6
+#
7
+# Document parameters here.
8
+#
9
+# [*sample_parameter*]
10
+#   Explanation of what this parameter affects and what it defaults to.
11
+#   e.g. "Specify one or more upstream ntp servers as an array."
12
+#
13
+# === Variables
14
+#
15
+# Here you should define a list of variables that this module would require.
16
+#
17
+# [*sample_variable*]
18
+#   Explanation of how this variable affects the funtion of this class and if
19
+#   it has a default. e.g. "The parameter enc_ntp_servers must be set by the
20
+#   External Node Classifier as a comma separated list of hostnames." (Note,
21
+#   global variables should be avoided in favor of class parameters as
22
+#   of Puppet 2.6.)
23
+#
24
+# === Examples
25
+#
26
+#  class { fuel_plugin_calamari:
27
+#    servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
28
+#  }
29
+#
30
+# === Authors
31
+#
32
+# Daniele Pizzolli <daniele.pizzolli@create-net.org>
33
+#
34
+# === Copyright
35
+#
36
+# Copyright 2015 CREATE-NET
37
+#

+ 116
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/server/init.pp View File

@@ -0,0 +1,116 @@
1
+# Copyright 2015 CREATE-NET
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you
4
+# may not use this file except in compliance with the License. You may
5
+# obtain a copy of the License at
6
+#
7
+# http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied. See the License for the specific language governing
13
+# permissions and limitations under the License.
14
+class redhat_init{
15
+  if($::osfamily == 'Redhat') {
16
+
17
+    notice('Starting redhat_init')
18
+
19
+    #Needed for calamari server config
20
+    file { '/etc/init.d/postgresql':
21
+      ensure => link,
22
+      target => '/etc/init.d/postgresql-9.3'
23
+      }->
24
+
25
+      exec { 'init postgres db':
26
+        command => 'service postgresql-9.3 initdb',
27
+        path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/'
28
+        }->
29
+
30
+        exec { 'start postgres':
31
+          command => 'service postgresql-9.3 start',
32
+          path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/'
33
+          }->
34
+
35
+          exec { 'start httpd':
36
+            command => 'service httpd start',
37
+            path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/'
38
+            }->
39
+
40
+            file { 'wrapper_salt':
41
+              source => 'puppet:///modules/fuel_plugin_calamari/salt_wrapper.py',
42
+              path => '/opt/calamari/venv/lib/python2.6/site-packages/calamari_common-0.1-py2.6.egg/calamari_common/salt_wrapper.py',
43
+              recurse => true,
44
+              mode => '0777'
45
+              }->
46
+
47
+              file { '/var/lib/pgsql/data':
48
+                ensure => 'directory',
49
+                owner => 'postgres',
50
+                group => 'postgres'
51
+                }->
52
+
53
+                file { '/var/lib/pgsql/data/pg_hba.conf':
54
+                  ensure => 'link',
55
+                  target => '/var/lib/pgsql/9.3/data/pg_hba.conf',
56
+                  owner => 'postgres',
57
+                  group => 'postgres'
58
+                  }->
59
+
60
+                  exec { 'postgres trust':
61
+                    command => 'sed -ir "s/ident/trust/" /var/lib/pgsql/data/pg_hba.conf && sed -ir "s/peer/trust/" /var/lib/pgsql/data/pg_hba.conf && sed -ir "s/ident/trust/" /var/lib/pgsql/9.3/data/pg_hba.conf && sed -ir "s/peer/trust/" /var/lib/pgsql/9.3/data/pg_hba.conf',
62
+          path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/'
63
+        }->
64
+
65
+        exec {'restart postgres' :
66
+          command => '/etc/init.d/postgresql-9.3 restart',
67
+          path =>'/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/'
68
+        }
69
+
70
+        notice('Finish redhat_init')
71
+    }
72
+}
73
+
74
+class fuel_plugin_calamari::server::init {
75
+
76
+  notice('Starting calamari-server manifest')
77
+
78
+  include fuel_plugin_calamari::server::params
79
+
80
+  package { $fuel_plugin_calamari::server::params::packages:
81
+    ensure => present,
82
+    }->
83
+    # TODO: wait for minion deploy!  How?  Does the order in tasks.yaml suffice?
84
+    exec { 'salt accept keys':
85
+      command => 'salt-key --yes --accept-all',
86
+      path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/',
87
+      # Config of calamari
88
+      }->
89
+      class {'redhat_init':}
90
+
91
+      # service { 'db before':
92
+      #       name =>  'postgresql-9.3',
93
+      #       enable => true,
94
+      #     }->
95
+
96
+      # service { 'http before':
97
+      #       name =>  'httpd',
98
+      #       enable => true,
99
+      #     }->
100
+
101
+      #    notice('Starting redhat_init')
102
+
103
+        exec { 'calamari server config':
104
+          command => "calamari-ctl initialize --admin-username='${fuel_plugin_calamari::server::params::username}' --admin-password='${fuel_plugin_calamari::server::params::password}' --admin-email='${fuel_plugin_calamari::server::params::email}'",
105
+          path    => '/usr/local/sbin/:/usr/bin:/usr/sbin:/bin/:/sbin/',
106
+          }->
107
+
108
+          # Restart apache2 to load the correct config (if not we have some
109
+          # errors in the gui)
110
+        service { $fuel_plugin_calamari::server::params::services:
111
+          enable => true,
112
+        }
113
+
114
+        notice('End of calamari-server manifest')
115
+
116
+}

+ 45
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/manifests/server/params.pp View File

@@ -0,0 +1,45 @@
1
+# Copyright 2015 CREATE-NET
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you
4
+# may not use this file except in compliance with the License. You may
5
+# obtain a copy of the License at
6
+#
7
+# http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied. See the License for the specific language governing
13
+# permissions and limitations under the License.
14
+
15
+
16
+# == Class: fuel_plugin_calamari::server::params
17
+#
18
+# A basic class for calamari plugin params
19
+#
20
+
21
+class fuel_plugin_calamari::server::params {
22
+
23
+  if($::osfamily == 'Redhat') {
24
+
25
+    $packages = ['calamari-server', 'calamari-clients']
26
+    $services = ['httpd', 'postgresql-9.3']
27
+
28
+    } elsif($::osfamily == 'Debian') {
29
+
30
+    $packages = ['calamari-server', 'calamari-clients']
31
+    $services = ['apache2']
32
+
33
+    } else {
34
+
35
+    fail("Unsupported osfamily ${::osfamily}")
36
+
37
+    }
38
+
39
+    # General configuration
40
+    $settings = hiera('fuel-plugin-calamari')
41
+
42
+    $username = $settings['fuel-plugin-calamari_username']
43
+    $password = $settings['fuel-plugin-calamari_password']
44
+    $email    = $settings['fuel-plugin-calamari_email']
45
+}

+ 17
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/spec/spec_helper.rb View File

@@ -0,0 +1,17 @@
1
+dir = File.expand_path(File.dirname(__FILE__))
2
+$LOAD_PATH.unshift File.join(dir, 'lib')
3
+
4
+require 'mocha'
5
+require 'puppet'
6
+require 'rspec'
7
+require 'spec/autorun'
8
+
9
+Spec::Runner.configure do |config|
10
+    config.mock_with :mocha
11
+end
12
+
13
+# We need this because the RAL uses 'should' as a method.  This
14
+# allows us the same behaviour but with a different method name.
15
+class Object
16
+    alias :must :should
17
+end

+ 12
- 0
deployment_scripts/puppet/modules/fuel_plugin_calamari/tests/init.pp View File

@@ -0,0 +1,12 @@
1
+# The baseline for module testing used by Puppet Labs is that each manifest
2
+# should have a corresponding test manifest that declares that class or defined
3
+# type.
4
+#
5
+# Tests are then run by using puppet apply --noop (to check for compilation
6
+# errors and view a log of events) or by fully applying the test in a virtual
7
+# environment (to compare the resulting system state to the desired state).
8
+#
9
+# Learn more about module testing here:
10
+# http://docs.puppetlabs.com/guides/tests_smoke.html
11
+#
12
+include fuel_plugin_calamari

+ 192
- 0
doc/Makefile View File

@@ -0,0 +1,192 @@
1
+# Makefile for Sphinx documentation
2
+#
3
+
4
+# You can set these variables from the command line.
5
+SPHINXOPTS    =
6
+SPHINXBUILD   = sphinx-build
7
+PAPER         =
8
+BUILDDIR      = build
9
+
10
+# User-friendly check for sphinx-build
11
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13
+endif
14
+
15
+# Internal variables.
16
+PAPEROPT_a4     = -D latex_paper_size=a4
17
+PAPEROPT_letter = -D latex_paper_size=letter
18
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
19
+# the i18n builder cannot share the environment and doctrees with the others
20
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
21
+
22
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
23
+
24
+help:
25
+	@echo "Please use \`make <target>' where <target> is one of"
26
+	@echo "  html       to make standalone HTML files"
27
+	@echo "  dirhtml    to make HTML files named index.html in directories"
28
+	@echo "  singlehtml to make a single large HTML file"
29
+	@echo "  pickle     to make pickle files"
30
+	@echo "  json       to make JSON files"
31
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
32
+	@echo "  qthelp     to make HTML files and a qthelp project"
33
+	@echo "  applehelp  to make an Apple Help Book"
34
+	@echo "  devhelp    to make HTML files and a Devhelp project"
35
+	@echo "  epub       to make an epub"
36
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
37
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
38
+	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
39
+	@echo "  text       to make text files"
40
+	@echo "  man        to make manual pages"
41
+	@echo "  texinfo    to make Texinfo files"
42
+	@echo "  info       to make Texinfo files and run them through makeinfo"
43
+	@echo "  gettext    to make PO message catalogs"
44
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
45
+	@echo "  xml        to make Docutils-native XML files"
46
+	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
47
+	@echo "  linkcheck  to check all external links for integrity"
48
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
49
+	@echo "  coverage   to run coverage check of the documentation (if enabled)"
50
+
51
+clean:
52
+	rm -rf $(BUILDDIR)/*
53
+
54
+html:
55
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
56
+	@echo
57
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
58
+
59
+dirhtml:
60
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
61
+	@echo
62
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
63
+
64
+singlehtml:
65
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
66
+	@echo
67
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
68
+
69
+pickle:
70
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
71
+	@echo
72
+	@echo "Build finished; now you can process the pickle files."
73
+
74
+json:
75
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
76
+	@echo
77
+	@echo "Build finished; now you can process the JSON files."
78
+
79
+htmlhelp:
80
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
81
+	@echo
82
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
83
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
84
+
85
+qthelp:
86
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
87
+	@echo
88
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
89
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
90
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/fuel-plugin-calamari.qhcp"
91
+	@echo "To view the help file:"
92
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/fuel-plugin-calamari.qhc"
93
+
94
+applehelp:
95
+	$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
96
+	@echo
97
+	@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
98
+	@echo "N.B. You won't be able to view it unless you put it in" \
99
+	      "~/Library/Documentation/Help or install it in your application" \
100
+	      "bundle."
101
+
102
+devhelp:
103
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
104
+	@echo
105
+	@echo "Build finished."
106
+	@echo "To view the help file:"
107
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/fuel-plugin-calamari"
108
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/fuel-plugin-calamari"
109
+	@echo "# devhelp"
110
+
111
+epub:
112
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
113
+	@echo
114
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
115
+
116
+latex:
117
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
118
+	@echo
119
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
120
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
121
+	      "(use \`make latexpdf' here to do that automatically)."
122
+
123
+latexpdf:
124
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
125
+	@echo "Running LaTeX files through pdflatex..."
126
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
127
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
128
+
129
+latexpdfja:
130
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
131
+	@echo "Running LaTeX files through platex and dvipdfmx..."
132
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
133
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
134
+
135
+text:
136
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
137
+	@echo
138
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
139
+
140
+man:
141
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
142
+	@echo
143
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
144
+
145
+texinfo:
146
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
147
+	@echo
148
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
149
+	@echo "Run \`make' in that directory to run these through makeinfo" \
150
+	      "(use \`make info' here to do that automatically)."
151
+
152
+info:
153
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
154
+	@echo "Running Texinfo files through makeinfo..."
155
+	make -C $(BUILDDIR)/texinfo info
156
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
157
+
158
+gettext:
159
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
160
+	@echo
161
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
162
+
163
+changes:
164
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
165
+	@echo
166
+	@echo "The overview file is in $(BUILDDIR)/changes."
167
+
168
+linkcheck:
169
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
170
+	@echo
171
+	@echo "Link check complete; look for any errors in the above output " \
172
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
173
+
174
+doctest:
175
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
176
+	@echo "Testing of doctests in the sources finished, look at the " \
177
+	      "results in $(BUILDDIR)/doctest/output.txt."
178
+
179
+coverage:
180
+	$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
181
+	@echo "Testing of coverage in the sources finished, look at the " \
182
+	      "results in $(BUILDDIR)/coverage/python.txt."
183
+
184
+xml:
185
+	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
186
+	@echo
187
+	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
188
+
189
+pseudoxml:
190
+	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
191
+	@echo
192
+	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

BIN
doc/source/_static/calamari-ip.png View File


BIN
doc/source/_static/calamari-name.png View File


BIN
doc/source/_static/settings-calamari.png View File


BIN
doc/source/_static/settings-calamari_fuel70.png View File


+ 291
- 0
doc/source/conf.py View File

@@ -0,0 +1,291 @@
1
+# -*- coding: utf-8 -*-
2
+#
3
+# fuel-plugin-calamari documentation build configuration file, created by
4
+# sphinx-quickstart on Tue Jul 14 11:04:14 2015.
5
+#
6
+# This file is execfile()d with the current directory set to its
7
+# containing dir.
8
+#
9
+# Note that not all possible configuration values are present in this
10
+# autogenerated file.
11
+#
12
+# All configuration values have a default; values that are commented out
13
+# serve to show the default.
14
+
15
+import sys
16
+import os
17
+import shlex
18
+
19
+# If extensions (or modules to document with autodoc) are in another directory,
20
+# add these directories to sys.path here. If the directory is relative to the
21
+# documentation root, use os.path.abspath to make it absolute, like shown here.
22
+#sys.path.insert(0, os.path.abspath('.'))
23
+
24
+# -- General configuration ------------------------------------------------
25
+
26
+# If your documentation needs a minimal Sphinx version, state it here.
27
+#needs_sphinx = '1.0'
28
+
29
+# Add any Sphinx extension module names here, as strings. They can be
30
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31
+# ones.
32
+extensions = [
33
+    'sphinx.ext.intersphinx',
34
+    'sphinx.ext.todo',
35
+]
36
+
37
+# Add any paths that contain templates here, relative to this directory.
38
+templates_path = ['_templates']
39
+
40
+# The suffix(es) of source filenames.
41
+# You can specify multiple suffix as a list of string:
42
+# source_suffix = ['.rst', '.md']
43
+source_suffix = '.rst'
44
+
45
+# The encoding of source files.
46
+#source_encoding = 'utf-8-sig'
47
+
48
+# The master toctree document.
49
+master_doc = 'index'
50
+
51
+# General information about the project.
52
+project = u'fuel-plugin-calamari'
53
+copyright = u'2015, Daniele Pizzolli'
54
+author = u'Daniele Pizzolli'
55
+
56
+# The version info for the project you're documenting, acts as replacement for
57
+# |version| and |release|, also used in various other places throughout the
58
+# built documents.
59
+#
60
+# The short X.Y version.
61
+version = '1.1.0'
62
+# The full version, including alpha/beta/rc tags.
63
+release = '1.1.0'
64
+
65
+# The language for content autogenerated by Sphinx. Refer to documentation
66
+# for a list of supported languages.
67
+#
68
+# This is also used if you do content translation via gettext catalogs.
69
+# Usually you set "language" from the command line for these cases.
70
+language = None
71
+
72
+# There are two options for replacing |today|: either, you set today to some
73
+# non-false value, then it is used:
74
+#today = ''
75
+# Else, today_fmt is used as the format for a strftime call.
76
+#today_fmt = '%B %d, %Y'
77
+
78
+# List of patterns, relative to source directory, that match files and
79
+# directories to ignore when looking for source files.
80
+exclude_patterns = []
81
+
82
+# The reST default role (used for this markup: `text`) to use for all
83
+# documents.
84
+#default_role = None
85
+
86
+# If true, '()' will be appended to :func: etc. cross-reference text.
87
+#add_function_parentheses = True
88
+
89
+# If true, the current module name will be prepended to all description
90
+# unit titles (such as .. function::).
91
+#add_module_names = True
92
+
93
+# If true, sectionauthor and moduleauthor directives will be shown in the
94
+# output. They are ignored by default.
95
+#show_authors = False
96
+
97
+# The name of the Pygments (syntax highlighting) style to use.
98
+pygments_style = 'sphinx'
99
+
100
+# A list of ignored prefixes for module index sorting.
101
+#modindex_common_prefix = []
102
+
103
+# If true, keep warnings as "system message" paragraphs in the built documents.
104
+#keep_warnings = False
105
+
106
+# If true, `todo` and `todoList` produce output, else they produce nothing.
107
+todo_include_todos = True
108
+
109
+
110
+# -- Options for HTML output ----------------------------------------------
111
+
112
+# The theme to use for HTML and HTML Help pages.  See the documentation for
113
+# a list of builtin themes.
114
+html_theme = 'alabaster'
115
+
116
+# Theme options are theme-specific and customize the look and feel of a theme
117
+# further.  For a list of options available for each theme, see the
118
+# documentation.
119
+#html_theme_options = {}
120
+
121
+# Add any paths that contain custom themes here, relative to this directory.
122
+#html_theme_path = []
123
+
124
+# The name for this set of Sphinx documents.  If None, it defaults to
125
+# "<project> v<release> documentation".
126
+#html_title = None
127
+
128
+# A shorter title for the navigation bar.  Default is the same as html_title.
129
+#html_short_title = None
130
+
131
+# The name of an image file (relative to this directory) to place at the top
132
+# of the sidebar.
133
+#html_logo = None
134
+
135
+# The name of an image file (within the static path) to use as favicon of the
136
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
137
+# pixels large.
138
+#html_favicon = None
139
+
140
+# Add any paths that contain custom static files (such as style sheets) here,
141
+# relative to this directory. They are copied after the builtin static files,
142
+# so a file named "default.css" will overwrite the builtin "default.css".
143
+html_static_path = ['_static']
144
+
145
+# Add any extra paths that contain custom files (such as robots.txt or
146
+# .htaccess) here, relative to this directory. These files are copied
147
+# directly to the root of the documentation.
148
+#html_extra_path = []
149
+
150
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
151
+# using the given strftime format.
152
+#html_last_updated_fmt = '%b %d, %Y'
153
+
154
+# If true, SmartyPants will be used to convert quotes and dashes to
155
+# typographically correct entities.
156
+#html_use_smartypants = True
157
+
158
+# Custom sidebar templates, maps document names to template names.
159
+#html_sidebars = {}
160
+
161
+# Additional templates that should be rendered to pages, maps page names to
162
+# template names.
163
+#html_additional_pages = {}
164
+
165
+# If false, no module index is generated.
166
+#html_domain_indices = True
167
+
168
+# If false, no index is generated.
169
+#html_use_index = True
170
+
171
+# If true, the index is split into individual pages for each letter.
172
+#html_split_index = False
173
+
174
+# If true, links to the reST sources are added to the pages.
175
+#html_show_sourcelink = True
176
+
177
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
178
+#html_show_sphinx = True
179
+
180
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
181
+#html_show_copyright = True
182
+
183
+# If true, an OpenSearch description file will be output, and all pages will
184
+# contain a <link> tag referring to it.  The value of this option must be the
185
+# base URL from which the finished HTML is served.
186
+#html_use_opensearch = ''
187
+
188
+# This is the file name suffix for HTML files (e.g. ".xhtml").
189
+#html_file_suffix = None
190
+
191
+# Language to be used for generating the HTML full-text search index.
192
+# Sphinx supports the following languages:
193
+#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
194
+#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
195
+#html_search_language = 'en'
196
+
197
+# A dictionary with options for the search language support, empty by default.
198
+# Now only 'ja' uses this config value
199
+#html_search_options = {'type': 'default'}
200
+
201
+# The name of a javascript file (relative to the configuration directory) that
202
+# implements a search results scorer. If empty, the default will be used.
203
+#html_search_scorer = 'scorer.js'
204
+
205
+# Output file base name for HTML help builder.
206
+htmlhelp_basename = 'fuel-plugin-calamaridoc'
207
+
208
+# -- Options for LaTeX output ---------------------------------------------
209
+
210
+latex_elements = {
211
+# The paper size ('letterpaper' or 'a4paper').
212
+#'papersize': 'letterpaper',
213
+
214
+# The font size ('10pt', '11pt' or '12pt').
215
+#'pointsize': '10pt',
216
+
217
+# Additional stuff for the LaTeX preamble.
218
+#'preamble': '',
219
+
220
+# Latex figure (float) alignment
221
+#'figure_align': 'htbp',
222
+}
223
+
224
+# Grouping the document tree into LaTeX files. List of tuples
225
+# (source start file, target name, title,
226
+#  author, documentclass [howto, manual, or own class]).
227
+latex_documents = [
228
+  (master_doc, ''.join(('fuel-plugin-calamari-', version, '.tex')), u'fuel-plugin-calamari Documentation',
229
+   u'Daniele Pizzolli', 'manual'),
230
+]
231
+
232
+# The name of an image file (relative to this directory) to place at the top of
233
+# the title page.
234
+#latex_logo = None
235
+
236
+# For "manual" documents, if this is true, then toplevel headings are parts,
237
+# not chapters.
238
+#latex_use_parts = False
239
+
240
+# If true, show page references after internal links.
241
+#latex_show_pagerefs = False
242
+
243
+# If true, show URL addresses after external links.
244
+#latex_show_urls = False
245
+
246
+# Documents to append as an appendix to all manuals.
247
+#latex_appendices = []
248
+
249
+# If false, no module index is generated.
250
+#latex_domain_indices = True
251
+
252
+
253
+# -- Options for manual page output ---------------------------------------
254
+
255
+# One entry per manual page. List of tuples
256
+# (source start file, name, description, authors, manual section).
257
+man_pages = [
258
+    (master_doc, 'fuel-plugin-calamari', u'fuel-plugin-calamari Documentation',
259
+     [author], 1)
260
+]
261
+
262
+# If true, show URL addresses after external links.
263
+#man_show_urls = False
264
+
265
+
266
+# -- Options for Texinfo output -------------------------------------------
267
+
268
+# Grouping the document tree into Texinfo files. List of tuples
269
+# (source start file, target name, title, author,
270
+#  dir menu entry, description, category)
271
+texinfo_documents = [
272
+  (master_doc, 'fuel-plugin-calamari', u'fuel-plugin-calamari Documentation',
273
+   author, 'fuel-plugin-calamari', 'One line description of project.',
274
+   'Miscellaneous'),
275
+]
276
+
277
+# Documents to append as an appendix to all manuals.
278
+#texinfo_appendices = []
279
+
280
+# If false, no module index is generated.
281
+#texinfo_domain_indices = True
282
+
283
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
284
+#texinfo_show_urls = 'footnote'
285
+
286
+# If true, do not generate a @detailmenu in the "Top" node's menu.
287
+#texinfo_no_detailmenu = False
288
+
289
+
290
+# Example configuration for intersphinx: refer to the Python standard library.
291
+intersphinx_mapping = {'https://docs.python.org/': None}

+ 26
- 0
doc/source/index.rst View File

@@ -0,0 +1,26 @@
1
+.. fuel-plugin-calamari documentation master file, created by
2
+   sphinx-quickstart on Tue Jul 14 11:04:14 2015.
3
+   You can adapt this file completely to your liking, but it should at least
4
+   contain the root `toctree` directive.
5
+
6
+Welcome to fuel-plugin-calamari's documentation!
7
+================================================
8
+
9
+Contents:
10
+
11
+.. toctree::
12
+   :maxdepth: 2
13
+
14
+   installation-guide
15
+   user-guide
16
+
17
+	     
18
+
19
+
20
+Indices and tables
21
+==================
22
+
23
+* :ref:`genindex`
24
+* :ref:`modindex`
25
+* :ref:`search`
26
+

+ 61
- 0
doc/source/installation-guide.rst View File

@@ -0,0 +1,61 @@
1
+Installation Guide
2
+==================
3
+
4
+Prerequisites
5
++++++++++++++
6
+
7
++----------------------------------+-----------------+
8
+| Requirement                      | Version/Comment |
9
++==================================+=================+
10
+| Mirantis OpenStack compatility   | 6.1 or higher   |
11
++----------------------------------+-----------------+
12
+| Distribution Supported           | Ubuntu          |
13
++----------------------------------+-----------------+
14
+
15
+Where to download the plugin
16
+++++++++++++++++++++++++++++
17
+
18
+The plugin in not yet distribuited as package.  You have to build it
19
+yourself.
20
+
21
+The code is hosted by `SmartInfrastructures
22
+<https://github.com/SmartInfrastructures/fuel-plugin-calamari>`_ But
23
+it will be moved on `stackforge
24
+<https://github.com/stackforge/fuel-plugin-calamari>`_ soon.
25
+
26
+How to build the plugin
27
++++++++++++++++++++++++
28
+
29
+Please refer to the `Fuel Plugins wiki
30
+<https://wiki.openstack.org/wiki/Fuel/Plugins>`_ to build the plugin
31
+by yourself, version 2.0.0 (or higher) of the Fuel Plugin Builder is
32
+required.
33
+
34
+.. code:: bash
35
+
36
+    git clone https://github.com/SmartInfrastructures/fuel-plugin-calamari.git
37
+    cd fuel-plugin-calamari
38
+    fuel-plugin-builder --build .
39
+
40
+How to install the plugin
41
++++++++++++++++++++++++++
42
+
43
+Copy the plugin file to the Fuel Master node.
44
+
45
+.. code:: bash
46
+
47
+    scp fuel-plugin-calamari*rpm root@<Fuel Master node IP address>:
48
+
49
+Install the plugin using the fuel command line:
50
+
51
+.. code:: bash
52
+
53
+    ssh root@<Fuel Master node IP address>
54
+    fuel plugins --install fuel-plugin-calamari*.rpm
55
+
56
+Verify that the plugin is installed correctly:
57
+
58
+.. code:: bash
59
+
60
+    fuel plugins --list
61
+

+ 50
- 0
doc/source/user-guide.rst View File

@@ -0,0 +1,50 @@
1
+User Guide
2
+==========
3
+
4
+Intro
5
++++++
6
+
7
+- Create a new environment with the Fuel UI wizard.  At the moment
8
+  only the Ubuntu distribution is supported.
9
+
10
+- Click on the Settings tab of the Fuel web UI.
11
+
12
+  For fuel version 7.0: select the “Calamari Installer” tab, enable
13
+  the plugin by clicking on the “Calamari Installer” checkbox and
14
+  fill-in the required fiels:
15
+
16
+  .. image:: _static/settings-calamari_fuel70.png
17
+     :alt: A screen-shot of the Calamari Settings UI
18
+     :scale: 90%
19
+
20
+- For fuel version 6.1: scroll down the page, select the calamari
21
+  plugin check-box and fill-in the required fields.  The interface
22
+  looks like the following:
23
+
24
+  .. image:: _static/settings-calamari.png
25
+     :alt: A screen-shot of the Calamari Settings UI
26
+     :scale: 90%
27
+
28
+- Go to the nodes page.
29
+
30
+- Add a base-os node and rename the base-os host as “calamari”:
31
+
32
+  .. image:: _static/calamari-name.png
33
+     :alt: A screen-shot of the Calamari host name
34
+     :scale: 90%
35
+
36
+- Some minutes after the deploy is ready (currently the Fuel UI
37
+  display "Ready" on the nodes, even some plugin has not yet finished)
38
+  you can browse the calamari interface on the calamari server.  You
39
+  have to figure out the address of the server from the network info
40
+  pop-up:
41
+
42
+  .. image:: _static/calamari-ip.png
43
+     :alt: A screen-shot of the Calamari host IP
44
+     :scale: 90%
45
+
46
+How to use the plugin
47
++++++++++++++++++++++
48
+
49
+Have a look to the still rough `calamari documentation
50
+<https://ceph.com/category/calamari/>`_.

+ 28
- 0
environment_config.yaml View File

@@ -0,0 +1,28 @@
1
+attributes:
2
+  fuel-plugin-calamari_username:
3
+    value: "admin"
4
+    label: "Admin Username"
5
+    description: "Calamari Admin Username"
6
+    weight: 25
7
+    type: "text"
8
+    regex:
9
+      source: '^[\S]{4,}$'
10
+      error: "You must provide an username with at least 4 characters"
11
+  fuel-plugin-calamari_password:
12
+    value: "admin"
13
+    label: "Admin Password"
14
+    description: "Calamari Admin Password"
15
+    weight: 25
16
+    type: "password"
17
+    regex:
18
+      source: '^[\S]{4,}$'
19
+      error: "You must provide a password with at least 4 characters"
20
+  fuel-plugin-calamari_email:
21
+    value: "admin@localhost.invalid"
22
+    label: "Admin Email"
23
+    description: "Calamari Admin Email"
24
+    weight: 40
25
+    type: "text"
26
+    regex:
27
+      source: '^\S+@\S+$'
28
+      error: "Invalid email"

+ 39
- 0
metadata.yaml View File

@@ -0,0 +1,39 @@
1
+# Plugin name
2
+name: fuel-plugin-calamari
3
+# Human-readable name for your plugin
4
+title: Calamari Installer
5
+# Plugin version
6
+version: '1.1.0'
7
+# Description
8
+description: "An installer for Calamari: a management and monitoring system for Ceph storage cluster"
9
+# Required fuel version
10
+fuel_version: ['6.1', '7.0']
11
+# Specify license of your plugin
12
+licenses: ['Apache License Version 2.0']
13
+# Specify author or company name
14
+authors: ['CREATE-NET']
15
+# A link to the plugin's page
16
+homepage: 'https://github.com/stackforge/fuel-plugin-calamari'
17
+# Specify a group which your plugin implements, possible options:
18
+# network, storage, storage::cinder, storage::glance, hypervisor
19
+groups: ['storage']
20
+
21
+# The plugin is compatible with releases in the list
22
+releases:
23
+  - os: ubuntu
24
+    version: 2014.2-6.1
25
+    mode: ['ha', 'multinode']
26
+    deployment_scripts_path: deployment_scripts/
27
+    repository_path: repositories/ubuntu
28
+  - os: centos
29
+    version: 2014.2-6.1
30
+    mode: ['ha', 'multinode']
31
+    deployment_scripts_path: deployment_scripts/
32
+    repository_path: repositories/centos
33
+  - os: ubuntu
34
+    version: 2015.1.0-7.0
35
+    mode: ['ha', 'multinode']
36
+    deployment_scripts_path: deployment_scripts/
37
+    repository_path: repositories/ubuntu
38
+# Version of plugin package
39
+package_version: '2.0.0'

+ 5
- 0
pre_build_hook View File

@@ -0,0 +1,5 @@
1
+#!/bin/bash
2
+
3
+# Add here any the actions which are required before plugin build
4
+# like packages building, packages downloading from mirrors and so on.
5
+# The script should return 0 if there were no errors.

+ 0
- 0
repositories/centos/.gitkeep View File


BIN
repositories/centos/calamari-clients-1.2.2-32_g931ee58.el6.x86_64.rpm View File


BIN
repositories/centos/calamari-clients-1.3-rc_12_g7d36e29.el6.x86_64.rpm View File


BIN
repositories/centos/calamari-server-1.3-rc_45_g6013ebc.el6.x86_64.rpm View File


BIN
repositories/centos/calamari-server-1.3.0.1-11_g9fb65ae.el6.x86_64.rpm View File


BIN
repositories/centos/diamond-3.4.67-0.noarch.rpm View File


BIN
repositories/centos/diamond-3.4.67-1.noarch.rpm View File


BIN
repositories/centos/epel-release-6-8.noarch.rpm View File


BIN
repositories/centos/libcairo-1.14.2-alt1.x86_64.rpm View File


BIN
repositories/centos/pycairo-1.8.6-2.1.el6.x86_64.rpm View File


BIN
repositories/centos/supervisor-3.0.el6.x86_64.rpm View File


+ 0
- 0
repositories/ubuntu/.gitkeep View File


BIN
repositories/ubuntu/calamari-clients_1.2.2-32-g931ee58_all.deb View File


BIN
repositories/ubuntu/calamari-server_1.0.0-1_amd64.deb View File


BIN
repositories/ubuntu/diamond_3.1.0_all.deb View File


BIN
repositories/ubuntu/python-msgpack-python_1.0_all.deb View File


+ 246
- 0
specs/calamari.rst View File

@@ -0,0 +1,246 @@
1
+.. -*- coding: utf-8 -*-
2
+
3
+..
4
+ This work is licensed under a Creative Commons Attribution 3.0 Unported
5
+ License.
6
+
7
+ http://creativecommons.org/licenses/by/3.0/legalcode
8
+
9
+===================
10
+Calamari: a Ceph UI
11
+===================
12
+
13
+Include the URL of your launchpad blueprint:
14
+
15
+https://blueprints.launchpad.net/fuel/+spec/fuel-plugin-calamari
16
+
17
+We would like to develop a plugin to install Calamari in the next release of
18
+Fuel (7.0).  Calamari is a management and monitoring service for Ceph.
19
+Calamari is composed by monitoring agents, a server-side and a client-side
20
+components.
21
+
22
+In more depth Calamari consists of three major components:
23
+
24
+- Data collection agents running on each Ceph Storage Cluster host.
25
+- The REST API running on one host (also called calamari server).
26
+- The Calamari web application running on one host (also called calamari
27
+  client).
28
+
29
+
30
+Problem description
31
+===================
32
+
33
+In this section we describe the main steps that a user should perform for
34
+installing Calamari. We suppose that:
35
+
36
+- Ceph OSD is selected by User.
37
+- Calamari agent will be installed on the Ceph OSD nodes.
38
+- Calamari server and Calamari web application (GUI) will be installed on a
39
+  new base-os node.
40
+
41
+
42
+Calamari installation
43
+---------------------
44
+
45
+- Actor: User
46
+- Pre-Conditions: the User has already created a new environment and he has
47
+  configured a Ceph cluster.
48
+- Post-Conditions: Calamari is correctly working.
49
+
50
+Flow:
51
+
52
+- The User assigns base-os role to an unallocated node.
53
+- The User renames this node as Calamari
54
+- The User configures in Settings tab the Ceph section.
55
+- The User configures in Settings tab the Calamari section.
56
+- The User deploys the environment.
57
+
58
+
59
+Proposed change
60
+===============
61
+
62
+We would like develop a new Fuel plugin in order to install Calamari [1]_.
63
+Our proposal considers the following aspects:
64
+
65
+- Install Calamari server (REST API) and client (web application) on a new node
66
+  with the base-os role.
67
+
68
+- The plugin installs also the required agents on each Ceph OSD node.  The
69
+  collected information will be pushed to Calamari server.
70
+
71
+- The communication among agents and server will use the OpenStack management
72
+  network.
73
+
74
+- There will be a configuration switch to make the REST API and web application
75
+  of Calamari available on the public interface (if the base-os support this
76
+  already).
77
+
78
+- No load balance for HA in the first implementation.  This topic will be
79
+  explored in the future.
80
+
81
+
82
+Planned improvements
83
+--------------------
84
+
85
+- Possibility to install Calamari on a controller node.
86
+
87
+- Configure Calamari to use Keystone as the authentication backend.
88
+
89
+- User session sharing between Calamari and the OpenStack dashboard.
90
+
91
+
92
+Alternatives
93
+------------
94
+
95
+None.  The aim is to provide monitoring and management for Ceph.  There are
96
+more general monitoring solution like Zabbix [2]_, LMA collector [3]_ and
97
+Elasticsearch-Kibana [4]_ plugins.
98
+
99
+
100
+Data model impact
101
+-----------------
102
+
103
+None
104
+
105
+
106
+REST API impact
107
+---------------
108
+
109
+None
110
+
111
+
112
+Upgrade impact
113
+--------------
114
+
115
+None.
116
+
117
+
118
+Security impact
119
+---------------
120
+
121
+The default admin user name and password for the web interface will be
122
+configured in the setting tab of the Fuel UI.
123
+
124
+In the Fuel UI will be possible to allow the deploy of the REST API and web
125
+application on the public network.
126
+
127
+
128
+Notifications impact
129
+--------------------
130
+
131
+There will be a deployment successful message displaying the text pointing to
132
+the URL of the web application.
133
+
134
+We can also add some info to the `Post Deployment Dashboard
135
+<https://review.openstack.org/#/c/180181/>`_ once it is implemented.
136
+
137
+
138
+Other end user impact
139
+---------------------
140
+
141
+None
142
+
143
+Performance Impact
144
+------------------
145
+
146
+None
147
+
148
+
149
+Other deployer impact
150
+---------------------
151
+
152
+In the source tree of calamari there are Vagrantfile and scripts to build the
153
+packages for Ubuntu 14.04, Centos and RHEL.
154
+
155
+There is a `guide on building packages
156
+<http://calamari.readthedocs.org/en/latest/development/building_packages.html>`_.
157
+
158
+
159
+
160
+Developer impact
161
+----------------
162
+
163
+None
164
+
165
+
166
+Infrastructure impact
167
+---------------------
168
+
169
+The agent impact on Ceph servers and on the network should be negligible.
170
+
171
+
172
+Implementation
173
+==============
174
+
175
+
176
+Assignee(s)
177
+-----------
178
+
179
+Primary assignee:
180
+  Alessandro Martellone <amartellone@create-net.org>
181
+
182
+Other contributors:
183
+  Daniele Pizzolli <dpizzolli@create-net.org>
184
+
185
+
186
+Work Items
187
+----------
188
+
189
+Task name: Calamari installation recipe
190
+  Task description: write a puppet module in order to install Calamari server
191
+  and configure properly all nodes to monitor.
192
+
193
+  Assignees: Alessandro Martellone, Daniele Pizzolli.
194
+
195
+Task name: include the latest version of Calamari package
196
+  Task description: include in the plugin repositories the required packages.
197
+
198
+  Assignees: Dmytro Iurchenko, Alessandro Martellone,
199
+  Daniele Pizzolli.
200
+
201
+
202
+Dependencies
203
+============
204
+
205
+- Fuel 6.1 or higher.
206
+- Base-os node role.
207
+
208
+Nice to have, but not essential:
209
+
210
+- `Post Deployment Dashboard <https://review.openstack.org/#/c/180181/>`_
211
+- `Role as a plugin <https://review.openstack.org/#/c/143690/>`_
212
+
213
+
214
+Testing
215
+=======
216
+
217
+Acceptance criteria:
218
+
219
+  - Diamond [5]_ and salt-minion services are installed and running on
220
+    all OSD and Controller nodes.
221
+  - Salt-master is installed and running on the node named 'calamari' and
222
+    salt-keys command lists all OSD and Controller node hosts in
223
+    'Accepted Keys' section.
224
+  - Calamari REST API is available on the node named 'calamari' [6]_.
225
+  - User can authenticate via REST API [7]_.
226
+  - The cluster description provided by Calamari REST API [8]_ is correct.
227
+  - Calamari UI is available on 'calamari' node on HTTP default port.
228
+
229
+
230
+Documentation Impact
231
+====================
232
+
233
+None.  It will be a Fuel plugin with its own documentation.
234
+
235
+
236
+References
237
+==========
238
+
239
+.. [1] http://calamari.readthedocs.org/en/latest/operations/server_install.html
240
+.. [2] https://docs.mirantis.com/fuel-dev/develop/addition_examples.html
241
+.. [3] https://github.com/stackforge/fuel-plugin-lma-collector
242
+.. [4] https://github.com/stackforge/fuel-plugin-elasticsearch-kibana
243
+.. [5] https://github.com/ceph/Diamond
244
+.. [6] http://ceph.com/calamari/docs/calamari_rest/index.html
245
+.. [7] http://ceph.com/calamari/docs/calamari_rest/authentication.html
246
+.. [8] http://ceph.com/calamari/docs/calamari_rest/resources/resources.html#clusterviewset

+ 54
- 0
tasks.yaml View File

@@ -0,0 +1,54 @@
1
+- role: ['controller', 'primary-controller', 'ceph-osd']
2
+  stage: post_deployment/6000
3
+  type: puppet
4
+  parameters:
5
+    puppet_manifest: puppet/manifests/calamari-salt.pp
6
+    puppet_modules: "puppet/modules/:/etc/puppet/modules/"
7
+    timeout: 600
8
+
9
+- role: ['controller', 'primary-controller', 'ceph-osd']
10
+  stage: post_deployment/6001
11
+  type: puppet
12
+  parameters:
13
+    puppet_manifest: puppet/manifests/calamari-agent.pp
14
+    puppet_modules: "puppet/modules/:/etc/puppet/modules/"
15
+    timeout: 600
16
+
17
+- role: ['base-os']
18
+  stage: post_deployment/6002
19
+  type: shell
20
+  parameters:
21
+    cmd: if hiera user_node_name | egrep '^calamari$'; then puppet apply /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp; fi
22
+    timeout: 720
23
+
24
+- role: ['base-os']
25
+  stage: post_deployment/6003
26
+  type: puppet
27
+  parameters:
28
+    puppet_manifest: puppet/manifests/calamari-salt.pp
29
+    puppet_modules: "puppet/modules/:/etc/puppet/modules/"
30
+    timeout: 720
31
+
32
+- role: ['base-os']
33
+  stage: post_deployment/6004
34
+  type: puppet
35
+  parameters:
36
+    puppet_manifest: puppet/manifests/calamari-server.pp
37
+    puppet_modules: "puppet/modules/:/etc/puppet/modules/"
38
+    timeout: 720
39
+
40
+- role: ['controller', 'primary-controller', 'ceph-osd']
41
+  stage: post_deployment/6005
42
+  type: puppet
43
+  parameters:
44
+    puppet_manifest: puppet/manifests/restart-salt.pp
45
+    puppet_modules: "puppet/modules/:/etc/puppet/modules/"
46
+    timeout: 720
47
+
48
+- role: ['base-os']
49
+  stage: post_deployment/6006
50
+  type: puppet
51
+  parameters:
52
+    puppet_manifest: puppet/manifests/complete-centos.pp
53
+    puppet_modules: "puppet/modules/:/etc/puppet/modules/"
54
+    timeout: 720

+ 570
- 0
test/settings_default_redhat.yaml View File

@@ -0,0 +1,570 @@
1
+editable:
2
+  access:
3
+    email:
4
+      description: Email address for Administrator
5
+      label: Email
6
+      regex:
7
+        error: Invalid email
8
+        source: ^\S+@\S+$
9
+      type: text
10
+      value: admin@localhost
11
+      weight: 40
12
+    metadata:
13
+      label: Access
14
+      weight: 10
15
+    password:
16
+      description: Password for Administrator
17
+      label: Password
18
+      regex:
19
+        error: Empty password
20
+        source: \S
21
+      type: password
22
+      value: admin
23
+      weight: 20
24
+    tenant:
25
+      description: Tenant (project) name for Administrator
26
+      label: Tenant
27
+      regex:
28
+        error: Invalid tenant name
29
+        source: ^(?!services$)(?!nova$)(?!glance$)(?!keystone$)(?!neutron$)(?!cinder$)(?!swift$)(?!ceph$)(?![Gg]uest$)(?!.*
30
+          +.*$).+
31
+      type: text
32
+      value: admin
33
+      weight: 30
34
+    user:
35
+      description: Username for Administrator
36
+      label: Username
37
+      regex:
38
+        error: Invalid username
39
+        source: ^(?!services$)(?!nova$)(?!glance$)(?!keystone$)(?!neutron$)(?!cinder$)(?!swift$)(?!ceph$)(?![Gg]uest$)(?!.*
40
+          +.*$).+
41
+      type: text
42
+      value: admin
43
+      weight: 10
44
+  additional_components:
45
+    ceilometer:
46
+      description: If selected, Ceilometer component will be installed
47
+      label: Install Ceilometer
48
+      type: checkbox
49
+      value: false
50
+      weight: 40
51
+    heat:
52
+      description: ''
53
+      label: ''
54
+      type: hidden
55
+      value: true
56
+      weight: 30
57
+    metadata:
58
+      label: Additional Components
59
+      weight: 20
60
+    mongo:
61
+      description: If selected, You can use external Mongo DB as ceilometer backend
62
+      label: Use external Mongo DB
63
+      restrictions:
64
+      - settings:additional_components.ceilometer.value == false
65
+      type: checkbox
66
+      value: false
67
+      weight: 40
68
+    murano:
69
+      description: If selected, Murano component will be installed
70
+      label: Install Murano
71
+      restrictions:
72
+      - cluster:net_provider != 'neutron'
73
+      type: checkbox
74
+      value: false
75
+      weight: 20
76
+    sahara:
77
+      description: If selected, Sahara component will be installed
78
+      label: Install Sahara
79
+      type: checkbox
80
+      value: false
81
+      weight: 10
82
+  common:
83
+    auth_key:
84
+      description: Public key(s) to include in authorized_keys on deployed nodes
85
+      label: Public Key
86
+      type: textarea
87
+      value: ''
88
+      weight: 70
89
+    auto_assign_floating_ip:
90
+      description: If selected, OpenStack will automatically assign a floating IP
91
+        to a new instance
92
+      label: Auto assign floating IP
93
+      restrictions:
94
+      - action: hide
95
+        condition: cluster:net_provider == 'neutron'
96
+      type: checkbox
97
+      value: false
98
+      weight: 40
99
+    debug:
100
+      description: Debug logging mode provides more information, but requires more
101
+        disk space.
102
+      label: OpenStack debug logging
103
+      type: checkbox
104
+      value: false
105
+      weight: 20
106
+    libvirt_type:
107
+      label: Hypervisor type
108
+      type: radio
109
+      value: qemu
110
+      values:
111
+      - data: kvm
112
+        description: Choose this type of hypervisor if you run OpenStack on hardware
113
+        label: KVM
114
+      - data: qemu
115
+        description: Choose this type of hypervisor if you run OpenStack on virtual
116
+          hosts.
117
+        label: QEMU
118
+      weight: 30
119
+    metadata:
120
+      label: Common
121
+      weight: 30
122
+    nova_quota:
123
+      description: Quotas are used to limit CPU and memory usage for tenants. Enabling
124
+        quotas will increase load on the Nova database.
125
+      label: Nova quotas
126
+      type: checkbox
127
+      value: false
128
+      weight: 25
129
+    puppet_debug:
130
+      description: Debug puppet logging mode provides more information, but requires
131
+        more disk space.
132
+      label: Puppet debug logging
133
+      type: checkbox
134
+      value: true
135
+      weight: 20
136
+    resume_guests_state_on_host_boot:
137
+      description: Whether to resume previous guests state when the host reboots.
138
+        If enabled, this option causes guests assigned to the host to resume their
139
+        previous state. If the guest was running a restart will be attempted when
140
+        nova-compute starts. If the guest was not running previously, a restart will
141
+        not be attempted.
142
+      label: Resume guests state on host boot
143
+      type: checkbox
144
+      value: true
145
+      weight: 60
146
+    use_cow_images:
147
+      description: For most cases you will want qcow format. If it's disabled, raw
148
+        image format will be used to run VMs. OpenStack with raw format currently
149
+        does not support snapshotting.
150
+      label: Use qcow format for images
151
+      type: checkbox
152
+      value: true
153
+      weight: 50
154
+    use_vcenter:
155
+      type: hidden
156
+      value: false
157
+      weight: 30
158
+  corosync:
159
+    group:
160
+      description: ''
161
+      label: Group
162
+      type: text
163
+      value: 226.94.1.1
164
+      weight: 10
165
+    metadata:
166
+      label: Corosync
167
+      restrictions:
168
+      - action: hide
169
+        condition: 'true'
170
+      weight: 50
171
+    port:
172
+      description: ''
173
+      label: Port
174
+      type: text
175
+      value: '12000'
176
+      weight: 20
177
+    verified:
178
+      description: Set True only if multicast is configured correctly on router.
179
+      label: Need to pass network verification.
180
+      type: checkbox
181
+      value: false
182
+      weight: 10
183
+  external_dns:
184
+    dns_list:
185
+      description: List of upstream DNS servers, separated by comma
186
+      label: DNS list
187
+      regex:
188
+        error: Invalid IP address list
189
+        source: ^\*$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\s*,\s*(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3})*$
190
+      type: text
191
+      value: 8.8.8.8
192
+      weight: 10
193
+    metadata:
194
+      label: Host OS DNS Servers
195
+      weight: 90
196
+  external_mongo:
197
+    hosts_ip:
198
+      description: IP Addresses of MongoDB. Use comma to split IPs
199
+      label: MongoDB hosts IP
200
+      regex:
201
+        error: Invalid hosts ip sequence
202
+        source: ^(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?),)*((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
203
+      type: text
204
+      value: ''
205
+      weight: 30
206
+    metadata:
207
+      label: External MongoDB
208
+      restrictions:
209
+      - action: hide
210
+        condition: settings:additional_components.mongo.value == false
211
+      weight: 20
212
+    mongo_db_name:
213
+      description: Mongo database name
214
+      label: Database name
215
+      regex:
216
+        error: Invalid database name
217
+        source: ^\w+$
218
+      type: text
219
+      value: ceilometer
220
+      weight: 30
221
+    mongo_password:
222
+      description: Mongo database password
223
+      label: Password
224
+      regex:
225
+        error: Password contains spaces
226
+        source: ^\S*$
227
+      type: password
228
+      value: ceilometer
229
+      weight: 30
230
+    mongo_replset:
231
+      description: Name for Mongo replication set
232
+      label: Replset
233
+      type: text
234
+      value: ''
235
+      weight: 30
236
+    mongo_user:
237
+      description: Mongo database username
238
+      label: Username
239
+      regex:
240
+        error: Empty username
241
+        source: ^\w+$
242
+      type: text
243
+      value: ceilometer
244
+      weight: 30
245
+  external_ntp:
246
+    metadata:
247
+      label: Host OS NTP Servers
248
+      weight: 100
249
+    ntp_list:
250
+      description: List of upstream NTP servers, separated by comma
251
+      label: NTP server list
252
+      regex:
253
+        error: Invalid NTP server list
254
+        source: ^\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(?:\.\d{1,3}){3})\s*(?:,\s*(?:(?:\w+(?:-+\w+)*\.)+[a-z]+|\d{1,3}(\.\d{1,3}){3})\s*)*$
255
+      type: text
256
+      value: 0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org
257
+      weight: 10
258
+  fuel-plugin-calamari:
259
+    fuel-plugin-calamari_email:
260
+      description: Calamari Admin Email
261
+      label: Admin Email
262
+      regex:
263
+        error: Invalid email
264
+        source: ^\S+@\S+$
265
+      type: text
266
+      value: admin@localhost.invalid
267
+      weight: 40
268
+    fuel-plugin-calamari_password:
269
+      description: Calamari Admin Password
270
+      label: Admin Password
271
+      regex:
272
+        error: You must provide a password with at least 4 characters
273
+        source: ^[\S]{4,}$
274
+      type: password
275
+      value: admin
276
+      weight: 25
277
+    fuel-plugin-calamari_username:
278
+      description: Calamari Admin Username
279
+      label: Admin Username
280
+      regex:
281
+        error: You must provide an username with at least 4 characters
282
+        source: ^[\S]{4,}$
283
+      type: text
284
+      value: admin
285
+      weight: 25
286
+    metadata:
287
+      enabled: true
288
+      label: Calamari Installer
289
+      plugin_id: 4
290
+      toggleable: true
291
+      weight: 70
292
+  kernel_params:
293
+    kernel:
294
+      description: Default kernel parameters
295
+      label: Initial parameters
296
+      type: text
297
+      value: console=ttyS0,9600 console=tty0 biosdevname=0 crashkernel=none rootdelay=90
298
+        nomodeset
299
+      weight: 45
300
+    metadata:
301
+      label: Kernel parameters
302
+      weight: 40
303
+  murano_settings:
304
+    metadata:
305
+      label: Murano Settings
306
+      restrictions:
307
+      - action: hide
308
+        condition: settings:additional_components.murano.value == false
309
+      weight: 20
310
+    murano_repo_url:
311
+      description: ''
312
+      label: Murano Repository URL
313
+      type: text
314
+      value: http://storage.apps.openstack.org/
315
+      weight: 10
316
+  neutron_mellanox:
317
+    metadata:
318
+      enabled: true
319
+      label: Mellanox Neutron components
320
+      restrictions:
321
+      - action: hide
322
+        condition: not ('experimental' in version:feature_groups)
323
+      toggleable: false
324
+      weight: 50
325
+    plugin:
326
+      label: Mellanox drivers and SR-IOV plugin
327
+      type: radio
328
+      value: disabled
329
+      values:
330
+      - data: disabled
331
+        description: If selected, Mellanox drivers, Neutron and Cinder plugin will
332
+          not be installed.
333
+        label: Mellanox drivers and plugins disabled
334
+        restrictions:
335
+        - settings:storage.iser.value == true
336
+      - data: drivers_only
337
+        description: If selected, Mellanox Ethernet drivers will be installed to support
338
+          networking over Mellanox NIC. Mellanox Neutron plugin will not be installed.
339
+        label: Install only Mellanox drivers
340
+        restrictions:
341
+        - settings:common.libvirt_type.value != 'kvm'
342
+      - data: ethernet
343
+        description: If selected, both Mellanox Ethernet drivers and Mellanox network
344
+          acceleration (Neutron) plugin will be installed.
345
+        label: Install Mellanox drivers and SR-IOV plugin
346
+        restrictions:
347
+        - settings:common.libvirt_type.value != 'kvm' or not (cluster:net_provider
348
+          == 'neutron' and networking_parameters:segmentation_type == 'vlan')
349
+      weight: 60
350
+    vf_num:
351
+      description: Note that one virtual function will be reserved to the storage
352
+        network, in case of choosing iSER.
353
+      label: Number of virtual NICs
354
+      restrictions:
355
+      - settings:neutron_mellanox.plugin.value != 'ethernet'
356
+      type: text
357
+      value: '16'
358
+      weight: 70
359
+  provision:
360
+    metadata:
361
+      label: Provision
362
+      weight: 80
363
+    method:
364
+      description: Which provision method to use for this cluster.
365
+      label: Provision method
366
+      type: radio
367
+      value: image
368
+      values:
369
+      - data: image
370
+        description: Copying pre-built images on a disk.
371
+        label: Image
372
+      - data: cobbler
373
+        description: Install from scratch using anaconda or debian-installer.
374
+        label: (DEPRECATED) Classic (use anaconda or debian-installer)
375
+  public_network_assignment:
376
+    assign_to_all_nodes:
377
+      description: When disabled, public network will be assigned to controllers only
378
+      label: Assign public network to all nodes
379
+      type: checkbox
380
+      value: false
381
+      weight: 10
382
+    metadata:
383
+      label: Public network assignment
384
+      restrictions:
385
+      - action: hide
386
+        condition: cluster:net_provider != 'neutron'
387
+      weight: 50
388
+  repo_setup:
389
+    metadata:
390
+      always_editable: true
391
+      label: Repositories
392
+      weight: 50
393
+    repos:
394
+      description: 'To create a local repository mirror on the Fuel master node, please
395
+        follow the instructions provided by running "fuel-package-updates --help"
396
+        on the Fuel master node.
397
+
398
+        Please make sure your Fuel master node has Internet access to the repository
399
+        before attempting to create a mirror.
400
+
401
+        For more details, please refer to the documentation (https://docs.mirantis.com/openstack/fuel/fuel-6.1/reference-architecture.html#fuel-rep-mirror).
402
+
403
+        '
404
+      extra_priority: null
405
+      type: custom_repo_configuration
406
+      value:
407
+      - name: mos
408
+        priority: null
409
+        type: rpm
410
+        uri: http://10.20.0.2:8080/2014.2.2-6.1/centos/x86_64
411
+      - name: mos-updates
412
+        priority: null
413
+        type: rpm
414
+        uri: http://mirror.fuel-infra.org/mos/centos-6/mos6.1/updates
415
+      - name: Auxiliary
416
+        priority: 15
417
+        type: rpm
418
+        uri: http://10.20.0.2:8080/2014.2.2-6.1/centos/auxiliary
419
+  storage:
420
+    ephemeral_ceph:
421
+      description: Configures Nova to store ephemeral volumes in RBD. This works best
422
+        if Ceph is enabled for volumes and images, too. Enables live migration of
423
+        all types of Ceph backed VMs (without this option, live migration will only
424
+        work with VMs launched from Cinder volumes).
425
+      label: Ceph RBD for ephemeral volumes (Nova)
426
+      type: checkbox
427
+      value: true
428
+      weight: 75
429
+    images_ceph:
430
+      description: Configures Glance to use the Ceph RBD backend to store images.
431
+        If enabled, this option will prevent Swift from installing.
432
+      label: Ceph RBD for images (Glance)
433
+      restrictions:
434
+      - settings:storage.images_vcenter.value == true: Only one Glance backend could
435
+          be selected.
436
+      type: checkbox
437
+      value: true
438
+      weight: 30
439
+    images_vcenter:
440
+      description: Configures Glance to use the vCenter/ESXi backend to store images.
441
+        If enabled, this option will prevent Swift from installing.
442
+      label: VMWare vCenter/ESXi datastore for images (Glance)
443
+      restrictions:
444
+      - action: hide
445
+        condition: settings:common.use_vcenter.value != true
446
+      - condition: settings:storage.images_ceph.value == true
447
+        message: Only one Glance backend could be selected.
448
+      type: checkbox
449
+      value: false
450
+      weight: 35
451
+    iser:
452
+      description: 'High performance block storage: Cinder volumes over iSER protocol
453
+        (iSCSI over RDMA). This feature requires SR-IOV capabilities in the NIC, and
454
+        will use a dedicated virtual function for the storage network.'
455
+      label: iSER protocol for volumes (Cinder)
456
+      restrictions:
457
+      - settings:storage.volumes_lvm.value != true or settings:common.libvirt_type.value
458
+        != 'kvm'
459
+      - action: hide
460
+        condition: not ('experimental' in version:feature_groups)
461
+      type: checkbox
462
+      value: false
463
+      weight: 11
464
+    metadata:
465
+      label: Storage
466
+      weight: 60
467
+    objects_ceph:
468
+      description: Configures RadosGW front end for Ceph RBD. This exposes S3 and
469
+        Swift API Interfaces. If enabled, this option will prevent Swift from installing.
470
+      label: Ceph RadosGW for objects (Swift API)
471
+      restrictions:
472
+      - settings:storage.images_ceph.value == false
473
+      type: checkbox
474
+      value: false
475
+      weight: 80
476
+    osd_pool_size:
477
+      description: Configures the default number of object replicas in Ceph. This
478
+        number must be equal to or lower than the number of deployed 'Storage - Ceph
479
+        OSD' nodes.
480
+      label: Ceph object replication factor
481
+      regex:
482
+        error: Invalid number
483
+        source: ^[1-9]\d*$
484
+      type: text
485
+      value: '2'
486
+      weight: 85
487
+    volumes_ceph:
488
+      description: Configures Cinder to store volumes in Ceph RBD images.
489
+      label: Ceph RBD for volumes (Cinder)
490
+      restrictions:
491
+      - settings:storage.volumes_lvm.value == true
492
+      type: checkbox
493
+      value: true
494
+      weight: 20
495
+    volumes_lvm:
496
+      description: It is recommended to have at least one Storage - Cinder LVM node.
497
+      label: Cinder LVM over iSCSI for volumes
498
+      restrictions:
499
+      - settings:storage.volumes_ceph.value == true
500
+      type: checkbox
501
+      value: false
502
+      weight: 10
503
+  syslog:
504
+    metadata:
505
+      label: Syslog
506
+      weight: 50
507
+    syslog_port:
508
+      description: Remote syslog port
509
+      label: Port
510
+      regex:
511
+        error: Invalid Syslog port
512
+        source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
513
+      type: text
514
+      value: '514'
515
+      weight: 20
516
+    syslog_server:
517
+      description: Remote syslog hostname
518
+      label: Hostname
519
+      type: text
520
+      value: ''
521
+      weight: 10
522
+    syslog_transport:
523
+      label: Syslog transport protocol
524
+      type: radio
525
+      value: tcp
526
+      values:
527
+      - data: udp
528
+        description: ''
529
+        label: UDP
530
+      - data: tcp
531
+        description: ''
532
+        label: TCP
533
+      weight: 30
534
+  use_fedora_lt:
535
+    kernel:
536
+      label: Select kernel
537
+      type: radio
538
+      value: default_kernel
539
+      values:
540
+      - data: default_kernel
541
+        description: Install default 2.6.32 kernel.
542
+        label: CentOS default kernel
543
+      - data: fedora_lt_kernel
544
+        description: 'EXPERIMENTAL: Install the Fedora 3.10 longterm kernel instead
545
+          of the default 2.6.32 kernel. This kernel may not work with all hardware
546
+          platforms, use with caution.'
547
+        label: Fedora LT kernel
548
+      weight: 55
549
+    metadata:
550
+      label: Use Fedora longterm kernel
551
+      weight: 50
552
+  workloads_collector:
553
+    enabled:
554
+      type: hidden
555
+      value: true
556
+    metadata:
557
+      label: Workloads Collector User
558
+      restrictions:
559
+      - action: hide
560
+        condition: 'true'
561
+      weight: 10
562
+    password:
563
+      type: password
564
+      value: nTpksPyC
565
+    tenant:
566
+      type: text
567
+      value: services
568
+    user:
569
+      type: text
570
+      value: fuel_stats_user

+ 591
- 0
test/settings_default_ubuntu.yaml View File

@@ -0,0 +1,591 @@
1
+editable:
2
+  access:
3
+    email:
4
+      description: Email address for Administrator
5
+      label: Email
6
+      regex:
7
+        error: Invalid email
8
+        source: ^\S+@\S+$
9
+      type: text
10
+      value: admin@localhost
11
+      weight: 40
12
+    metadata:
13
+      label: Access
14
+      weight: 10
15
+    password:
16
+      description: Password for Administrator
17
+      label: Password
18
+      regex:
19
+        error: Empty password
20
+        source: \S
21
+      type: password
22
+      value: admin
23
+      weight: 20
24
+    tenant:
25
+      description: Tenant (project) name for Administrator
26
+      label: Tenant
27
+