Browse Source

Add plugin stub

changes/20/355520/1
Igor Zinovik 2 years ago
parent
commit
19755eb391
14 changed files with 199 additions and 1 deletions
  1. 4
    0
      .gitignore
  2. 2
    1
      LICENSE
  3. 4
    0
      README.md
  4. 12
    0
      components.yaml
  5. 4
    0
      deployment_scripts/deploy.sh
  6. 62
    0
      deployment_tasks.yaml
  7. 11
    0
      environment_config.yaml
  8. 34
    0
      metadata.yaml
  9. 15
    0
      network_roles.yaml
  10. 13
    0
      node_roles.yaml
  11. 5
    0
      pre_build_hook
  12. 0
    0
      repositories/ubuntu/.gitkeep
  13. 26
    0
      tasks.yaml
  14. 7
    0
      volumes.yaml

+ 4
- 0
.gitignore View File

@@ -0,0 +1,4 @@
1
+.tox
2
+.build
3
+_build
4
+*.pyc

+ 2
- 1
LICENSE View File

@@ -1,4 +1,4 @@
1
-                                 Apache License
1
+Apache License
2 2
                            Version 2.0, January 2004
3 3
                         http://www.apache.org/licenses/
4 4
 
@@ -199,3 +199,4 @@
199 199
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 200
    See the License for the specific language governing permissions and
201 201
    limitations under the License.
202
+

+ 4
- 0
README.md View File

@@ -0,0 +1,4 @@
1
+nsx
2
+============
3
+
4
+Plugin description

+ 12
- 0
components.yaml View File

@@ -0,0 +1,12 @@
1
+# This file contains wizard components descriptions that are pretty similar to
2
+# the `environment_config.yaml`.
3
+# Please, take a look at following link for the details:
4
+# - https://blueprints.launchpad.net/fuel/+spec/component-registry
5
+# - https://specs.openstack.org/openstack/fuel-specs/specs/8.0/component-registry.html
6
+
7
+- name: additional_service:nsx
8
+  compatible: []
9
+  requires: []
10
+  incompatible: []
11
+  label: "Plugin label, that will be shown on UI"
12
+  description: "Component description (optional)"

+ 4
- 0
deployment_scripts/deploy.sh View File

@@ -0,0 +1,4 @@
1
+#!/bin/bash
2
+
3
+# It's a script which deploys your plugin
4
+echo nsx > /tmp/nsx

+ 62
- 0
deployment_tasks.yaml View File

@@ -0,0 +1,62 @@
1
+# These tasks will be merged into deployment graph. Here you
2
+# can specify new tasks for any roles, even built-in ones.
3
+
4
+- id: nsx_role
5
+  type: group
6
+  role: [nsx_role]
7
+  parameters:
8
+    strategy:
9
+      type: parallel
10
+
11
+- id: nsx-deployment-puppet
12
+  type: puppet
13
+  role: [nsx_role]
14
+
15
+# If you do not want to use task-based deployment that is introduced as experimental
16
+# in fuel v8.0 comment code section below this comment, uncomment two lines below it
17
+# and do the same for tasks below.
18
+
19
+  version: 2.0.0
20
+  cross-depends:
21
+    - name: deploy_start
22
+  cross-depended-by:
23
+    - name: deploy_end
24
+#  requires: [deploy_start] # version 1.0.0
25
+#  required_for: [deploy_end]
26
+
27
+  parameters:
28
+    puppet_manifest: "deploy.pp"
29
+    puppet_modules: "."
30
+    timeout: 3600
31
+
32
+#- id: nsx-post-deployment-sh
33
+#  type: shell
34
+#  role: [nsx_role]
35
+#  version: 2.0.0
36
+#  cross-depends:
37
+#    - name: post_deployment_start
38
+#  cross-depended-by:
39
+#    - name: post_deployment_end
40
+# #  requires: [post_deployment_start]
41
+# #  required_for: [post_deployment_end]
42
+#  parameters:
43
+#    cmd: echo post_deployment_task_executed > /tmp/post_deployment
44
+#    retries: 3
45
+#    interval: 20
46
+#    timeout: 180
47
+
48
+#- id: nsx-pre-deployment-sh
49
+#  type: shell
50
+#  role: [nsx_role]
51
+#  version: 2.0.0
52
+#  cross-depends:
53
+#    - name: pre_deployment_start
54
+#  cross-depended-by:
55
+#    - name: pre_deployment_end
56
+# #  requires: [pre_deployment_start]
57
+# #  required_for: [pre_deployment_end]
58
+#  parameters:
59
+#    cmd: echo pre_deployment_task_executed > /tmp/pre_deployment
60
+#    retries: 3
61
+#    interval: 20
62
+#    timeout: 180

+ 11
- 0
environment_config.yaml View File

@@ -0,0 +1,11 @@
1
+attributes:
2
+  metadata:
3
+    # Settings group can be one of "general", "security", "compute", "network",
4
+    # "storage", "logging", "openstack_services" and "other".
5
+    group: 'other'
6
+  nsx_text:
7
+    value: 'Set default value'
8
+    label: 'Text field'
9
+    description: 'Description for text field'
10
+    weight: 25
11
+    type: "text"

+ 34
- 0
metadata.yaml View File

@@ -0,0 +1,34 @@
1
+# Plugin name
2
+name: nsx
3
+# Human-readable name for your plugin
4
+title: Title for nsx plugin
5
+# Plugin version
6
+version: '1.0.0'
7
+# Description
8
+description: Please describe your plugin here
9
+# Required fuel version
10
+fuel_version: ['8.0']
11
+# Specify license of your plugin
12
+licenses: ['Apache License Version 2.0']
13
+# Specify author or company name
14
+authors: ['Specify author or company name']
15
+# A link to the plugin's page
16
+homepage: 'https://github.com/openstack/fuel-plugins'
17
+# Specify a group which your plugin implements, possible options:
18
+# network, storage, storage::cinder, storage::glance, hypervisor,
19
+# equipment
20
+groups: []
21
+# Change `false` to `true` if the plugin can be installed in the environment
22
+# after the deployment.
23
+is_hotpluggable: false
24
+
25
+# The plugin is compatible with releases in the list
26
+releases:
27
+  - os: ubuntu
28
+    version: mitaka-9.0
29
+    mode: ['ha']
30
+    deployment_scripts_path: deployment_scripts/
31
+    repository_path: repositories/ubuntu
32
+
33
+# Version of plugin package
34
+package_version: '4.0.0'

+ 15
- 0
network_roles.yaml View File

@@ -0,0 +1,15 @@
1
+# Unique network role name
2
+- id: "example_net_role"
3
+  # Role mapping to network
4
+  default_mapping: "public"
5
+  properties:
6
+    # Should be true if network role requires subnet being set
7
+    subnet: true
8
+    # Should be true if network role requires gateway being set
9
+    gateway: false
10
+    # List of VIPs to be allocated
11
+    vip:
12
+         # Unique VIP name
13
+       - name: "vip_name"
14
+         # Optional linux namespace for VIP
15
+         namespace: "haproxy"

+ 13
- 0
node_roles.yaml View File

@@ -0,0 +1,13 @@
1
+nsx_role:
2
+  # Role name
3
+  name: "Set here the name for the role. This name will be displayed in the Fuel web UI"
4
+  # Role description
5
+  description: "Write description for your role"
6
+  # If primary then during orchestration this role will be
7
+  # separated into primary-role and role
8
+  has_primary: false
9
+  # Assign public IP to node if true
10
+  public_ip_required: false
11
+  # Weight that will be used to sort out the
12
+  # roles on the Fuel web UI
13
+  weight: 1000

+ 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/ubuntu/.gitkeep View File


+ 26
- 0
tasks.yaml View File

@@ -0,0 +1,26 @@
1
+# WARNING: `tasks.yaml` will be deprecated in further releases.
2
+# Please, use `deployment_tasks.yaml` to describe tasks instead.
3
+
4
+# This tasks will be applied on controller nodes,
5
+# here you can also specify several roles, for example
6
+# ['cinder', 'compute'] will be applied only on
7
+# cinder and compute nodes
8
+- role: ['controller']
9
+  stage: post_deployment
10
+  type: shell
11
+  parameters:
12
+    cmd: bash deploy.sh
13
+    timeout: 42
14
+# Task is applied for all roles
15
+- role: '*'
16
+  stage: pre_deployment
17
+  type: shell
18
+  parameters:
19
+    cmd: echo all > /tmp/plugin.all
20
+    timeout: 42
21
+# "reboot" task reboots the nodes and waits until they get back online
22
+# - role: '*'
23
+#   stage: pre_deployment
24
+#   type: reboot
25
+#   parameters:
26
+#     timeout: 600

+ 7
- 0
volumes.yaml View File

@@ -0,0 +1,7 @@
1
+volumes_roles_mapping:
2
+  # Default role mapping
3
+  nsx_role:
4
+    - {allocate_size: "min", id: "os"}
5
+
6
+# Set here new volumes for your role
7
+volumes: []

Loading…
Cancel
Save