Browse Source

Graph-based switch-controlplane. Puppet part.

Change-Id: If6664e5dc855c1611862ca1aef43baf99f42d7ed
changes/61/358461/23
Pavel Chechetin 2 years ago
parent
commit
66e7a8c493

+ 33
- 0
deployment/puppet/octane_tasks/graphs/orig/switch-control-1.yaml View File

@@ -0,0 +1,33 @@
1
+# GROUPS
2
+- id: primary-controller
3
+  type: group
4
+  role: [primary-controller]
5
+  fault_tolerance: 0
6
+
7
+- id: controller
8
+  type: group
9
+  role: [controller]
10
+  fault_tolerance: 0
11
+
12
+# TASKS
13
+- id: rsync_octane
14
+  type: sync
15
+  version: 2.1.0
16
+  groups: [primary-controller, controller]
17
+  requires: []
18
+  required_for: []
19
+  parameters:
20
+    src: rsync://{MASTER_IP}:/octane_code/puppet
21
+    dst: /etc/fuel/octane/
22
+    timeout: 180
23
+
24
+- id: kill_cluster
25
+  type: puppet
26
+  version: 2.1.0
27
+  groups: [primary-controller, controller]
28
+  requires: [rsync_octane]
29
+  required_for: []
30
+  parameters:
31
+    puppet_manifest: /etc/fuel/octane/puppet/octane_tasks/modular/kill_cluster.pp
32
+    puppet_modules:  /etc/fuel/octane/puppet:/etc/puppet/modules
33
+    timeout: 360

+ 34
- 0
deployment/puppet/octane_tasks/graphs/orig/switch-control-2.yaml View File

@@ -0,0 +1,34 @@
1
+# GROUPS
2
+- id: primary-controller
3
+  type: group
4
+  role: [primary-controller]
5
+  fault_tolerance: 0
6
+
7
+- id: controller
8
+  type: group
9
+  role: [controller]
10
+  fault_tolerance: 0
11
+
12
+# TASKS
13
+- id: rsync_octane
14
+  type: sync
15
+  version: 2.1.0
16
+  groups: [primary-controller, controller]
17
+  requires: []
18
+  required_for: []
19
+  parameters:
20
+    src: rsync://{MASTER_IP}:/octane_code/puppet
21
+    dst: /etc/fuel/octane/
22
+    timeout: 180
23
+
24
+- id: stop_init_services
25
+  type: puppet
26
+  version: 2.1.0
27
+  groups: [primary-controller, controller]
28
+  requires: [rsync_octane]
29
+  required_for: []
30
+  parameters:
31
+    puppet_manifest: /etc/fuel/octane/puppet/octane_tasks/modular/stop_init_services.pp
32
+    puppet_modules:  /etc/fuel/octane/puppet:/etc/puppet/modules
33
+    timeout: 360
34
+

+ 45
- 0
deployment/puppet/octane_tasks/graphs/orig/switch-control-rollback.yaml View File

@@ -0,0 +1,45 @@
1
+# GROUPS
2
+- id: primary-controller
3
+  type: group
4
+  role: [primary-controller]
5
+  fault_tolerance: 0
6
+
7
+- id: controller
8
+  type: group
9
+  role: [controller]
10
+  fault_tolerance: 0
11
+
12
+# TASKS
13
+- id: rsync_octane
14
+  type: sync
15
+  version: 2.1.0
16
+  groups: [primary-controller, controller]
17
+  requires: []
18
+  required_for: []
19
+  parameters:
20
+    src: rsync://{MASTER_IP}:/octane_code/puppet
21
+    dst: /etc/fuel/octane/
22
+    timeout: 180
23
+
24
+- id: start_cluster
25
+  type: puppet
26
+  version: 2.1.0
27
+  groups: [primary-controller, controller]
28
+  requires: [rsync_octane]
29
+  required_for: []
30
+  parameters:
31
+    puppet_manifest: /etc/fuel/octane/puppet/octane_tasks/modular/start_cluster.pp
32
+    puppet_modules:  /etc/fuel/octane/puppet:/etc/puppet/modules
33
+    timeout: 360
34
+
35
+- id: netconfig
36
+  type: puppet
37
+  version: 2.1.0
38
+  groups: [primary-controller, controller]
39
+  required_for: []
40
+  requires: []
41
+  parameters:
42
+    puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp
43
+    puppet_modules: /etc/puppet/modules
44
+    timeout: 300
45
+

+ 28
- 0
deployment/puppet/octane_tasks/graphs/seed/switch-control-1.yaml View File

@@ -0,0 +1,28 @@
1
+# GROUPS
2
+- id: primary-controller
3
+  type: group
4
+  role: [primary-controller]
5
+  fault_tolerance: 0
6
+
7
+# TASKS
8
+- id: rsync_octane
9
+  type: sync
10
+  version: 2.1.0
11
+  groups: [primary-controller]
12
+  requires: []
13
+  required_for: []
14
+  parameters:
15
+    src: rsync://{MASTER_IP}:/octane_code/puppet
16
+    dst: /etc/fuel/octane/
17
+    timeout: 180
18
+
19
+- id: start_controller_services
20
+  type: puppet
21
+  version: 2.1.0
22
+  groups: [primary-controller]
23
+  requires: [rsync_octane]
24
+  required_for: []
25
+  parameters:
26
+    puppet_manifest: /etc/fuel/octane/puppet/octane_tasks/modular/start_controller_services.pp
27
+    puppet_modules:  /etc/fuel/octane/puppet:/etc/puppet/modules
28
+    timeout: 360

+ 30
- 0
deployment/puppet/octane_tasks/graphs/seed/switch-control-2.yaml View File

@@ -0,0 +1,30 @@
1
+# GROUPS
2
+- id: primary-controller
3
+  type: group
4
+  role: [primary-controller]
5
+  fault_tolerance: 0
6
+
7
+- id: netconfig
8
+  type: puppet
9
+  version: 2.1.0
10
+  groups: [primary-controller]
11
+  required_for: []
12
+  requires: [upload_configuration]
13
+  parameters:
14
+    puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp
15
+    puppet_modules: /etc/puppet/modules
16
+    timeout: 300
17
+
18
+- id: upload_configuration
19
+  type: upload_file
20
+  version: 2.1.0
21
+  groups: [primary-controller]
22
+  requires: []
23
+  required_for: []
24
+  parameters:
25
+    path: /etc/fuel/cluster/{CLUSTER_ID}/astute.yaml
26
+    permissions: '0640'
27
+    dir_permissions: '0750'
28
+    timeout: 180
29
+    data:
30
+      yaql_exp: '$.toYaml()'

+ 29
- 0
deployment/puppet/octane_tasks/graphs/seed/switch-control-rollback.yaml View File

@@ -0,0 +1,29 @@
1
+# GROUPS
2
+- id: primary-controller
3
+  type: group
4
+  role: [primary-controller]
5
+  fault_tolerance: 0
6
+
7
+# TASKS
8
+- id: rsync_octane
9
+  type: sync
10
+  version: 2.1.0
11
+  groups: [primary-controller]
12
+  requires: []
13
+  required_for: []
14
+  parameters:
15
+    src: rsync://{MASTER_IP}:/octane_code/puppet
16
+    dst: /etc/fuel/octane/
17
+    timeout: 180
18
+
19
+- id: stop_init_services
20
+  type: puppet
21
+  version: 2.1.0
22
+  groups: [primary-controller]
23
+  requires: [rsync_octane]
24
+  required_for: []
25
+  parameters:
26
+    puppet_manifest: /etc/fuel/octane/puppet/octane_tasks/modular/stop_init_services.pp
27
+    puppet_modules:  /etc/fuel/octane/puppet:/etc/puppet/modules
28
+    timeout: 360
29
+

+ 10
- 0
deployment/puppet/octane_tasks/manifests/kill_cluster.pp View File

@@ -0,0 +1,10 @@
1
+# == Class: octane_tasks::kill_cluster
2
+#
3
+# Kills Pacemaker cluster (can be started again).
4
+#
5
+class octane_tasks::kill_cluster {
6
+  exec { 'kill_cluster':
7
+    command  => 'pcs cluster kill',
8
+    provider => shell,
9
+  }
10
+}

+ 10
- 0
deployment/puppet/octane_tasks/manifests/start_cluster.pp View File

@@ -0,0 +1,10 @@
1
+# == Class: octane_tasks::start_cluster
2
+#
3
+# Starts Pacemaker cluster again (on rollback phase).
4
+#
5
+class octane_tasks::start_cluster {
6
+  exec { 'start_cluster':
7
+    command  => 'pcs cluster start',
8
+    provider => shell,
9
+  }
10
+}

+ 2
- 0
deployment/puppet/octane_tasks/modular/kill_cluster.pp View File

@@ -0,0 +1,2 @@
1
+notice('MODULAR: octane_tasks::kill_cluster')
2
+include octane_tasks::kill_cluster

+ 2
- 0
deployment/puppet/octane_tasks/modular/start_cluster.pp View File

@@ -0,0 +1,2 @@
1
+notice('MODULAR: octane_tasks::start_cluster')
2
+include octane_tasks::start_cluster

+ 6
- 0
deployment/puppet/octane_tasks/modular/start_controller_services.pp View File

@@ -0,0 +1,6 @@
1
+notice('MODULAR: octane_tasks/start_controller_services.pp')
2
+
3
+class { 'octane_tasks::maintenance':
4
+  ensure_cluster_services => 'running',
5
+  ensure_init_services    => 'running',
6
+}

+ 5
- 0
deployment/puppet/octane_tasks/modular/start_init_services.pp View File

@@ -0,0 +1,5 @@
1
+notice('MODULAR: octane_tasks::start_init_services')
2
+
3
+class {'octane_tasks::maintenance':
4
+  ensure_init_services => 'running',
5
+}

+ 5
- 0
deployment/puppet/octane_tasks/modular/stop_init_services.pp View File

@@ -0,0 +1,5 @@
1
+notice('MODULAR: octane_tasks::stop_init_services')
2
+
3
+class { 'octane_tasks::maintenance':
4
+  ensure_init_services => 'stopped',
5
+}

Loading…
Cancel
Save