|
| 1 | +# WARNING: |
| 2 | +# /etc/sudoers must not have "Default requiretty" for Puppet plugin to work |
| 3 | + |
| 4 | + |
| 5 | +imports: |
| 6 | + - http://www.getcloudify.org/spec/cloudify/{{ cloudify_version }}/types.yaml |
| 7 | + |
| 8 | +plugins: |
| 9 | + puppet_plugin: |
| 10 | + derived_from: cloudify.plugins.agent_plugin |
| 11 | + properties: |
| 12 | + url: https://github.com/cloudify-cosmo/cloudify-puppet-plugin/archive/{{ plugin_branch }}.zip |
| 13 | + |
| 14 | + |
| 15 | +types: |
| 16 | + cloudify.types.puppet.middleware_server: |
| 17 | + derived_from: cloudify.types.middleware_server |
| 18 | + properties: |
| 19 | + # All Puppet related configuration goes inside |
| 20 | + # the "puppet_config" property. |
| 21 | + - puppet_config |
| 22 | + |
| 23 | + # server (required) |
| 24 | + # ------ |
| 25 | + # |
| 26 | + # Host name of the Puppet server |
| 27 | + # |
| 28 | + # |
| 29 | + # environment: (required) |
| 30 | + # ----------- |
| 31 | + # |
| 32 | + # Environment name |
| 33 | + # See: http://docs.puppetlabs.com/guides/environment.html |
| 34 | + # |
| 35 | + # |
| 36 | + # version: (optional. default: latest) |
| 37 | + # ------- |
| 38 | + # |
| 39 | + # `version` is the Puppet version to install |
| 40 | + # |
| 41 | + # |
| 42 | + # node_name_prefix: (optional. default: empty string) |
| 43 | + # ---------------- |
| 44 | + # |
| 45 | + # |
| 46 | + # node_name_suffix: (optional. default: empty string) |
| 47 | + # ---------------- |
| 48 | + # |
| 49 | + # Puppet node name is constructed as follows: |
| 50 | + # `node_name_prefix` + node_id + `node_name_suffix` |
| 51 | + # |
| 52 | + # |
| 53 | + # facts: (optional) |
| 54 | + # ----- |
| 55 | + # |
| 56 | + # Map with facts to add to facter. Must not contain |
| 57 | + # `cloudify` nor `cloudify_*` keys as these are |
| 58 | + # generated automatically. |
| 59 | + # |
| 60 | + # |
| 61 | + # repos: (optional) |
| 62 | + # ----- |
| 63 | + # deb: |
| 64 | + # VER_NAME: url://for-package-that-installs-repo.deb |
| 65 | + # |
| 66 | + # Custom packages that are used for adding Puppet repository. |
| 67 | + # |
| 68 | + # |
| 69 | + # modules: (optional) |
| 70 | + # ------- |
| 71 | + # List of Puppet modules to install before executing any |
| 72 | + # Puppet DSL (passed using "manifest" or "execute") |
| 73 | + # |
| 74 | + # Example: |
| 75 | + # ===8<=== |
| 76 | + # modules: |
| 77 | + # - puppetlabs-apache |
| 78 | + # - puppetlabs-concat |
| 79 | + # - puppetlabs-stdlib |
| 80 | + # - puppetlabs-vcsrepo |
| 81 | + # ===8<=== |
| 82 | + # |
| 83 | + # |
| 84 | + # download: (optional) |
| 85 | + # -------- |
| 86 | + # |
| 87 | + # Link to a .tar.gz to download for using as manifests. |
| 88 | + # It is downloaded before any Puppet code runs. |
| 89 | + # The file should typically contain "manifests" and |
| 90 | + # "modules" directories. Can be used in conjunction with |
| 91 | + # "execute" or "manifest" properties. |
| 92 | + # |
| 93 | + # The value of the "download" property can be either |
| 94 | + # URL or a path to a .tar.gz file inside the blueprint. |
| 95 | + # |
| 96 | + # Example A: (url) |
| 97 | + # ===8<=== |
| 98 | + # download: http://puppet-statics.example.com/manifests.tar.gz |
| 99 | + # ===8<=== |
| 100 | + # |
| 101 | + # Example B: (resource in blueprint) |
| 102 | + # ===8<=== |
| 103 | + # download: /puppet-resources/manifests.tar.gz |
| 104 | + # ===8<=== |
| 105 | + # |
| 106 | + # |
| 107 | + # execute: (either "execute" or "manifest" must be present) |
| 108 | + # ------- |
| 109 | + # hash of per operation Puppet DSL to run. |
| 110 | + # |
| 111 | + # Example: |
| 112 | + # ===8<=== |
| 113 | + # execute: |
| 114 | + # configure: | |
| 115 | + # package{'git':} |
| 116 | + # -> |
| 117 | + # vcsrepo{$cloudify_local_repo: |
| 118 | + # ensure => present, |
| 119 | + # provider => git, |
| 120 | + # source => 'https://github.com/Fewbytes/cosmo-tester-puppet-downloadable.git', |
| 121 | + # } |
| 122 | + # start: | |
| 123 | + # class{'cloudify_hello_world': |
| 124 | + # } |
| 125 | + # ===8<=== |
| 126 | + # |
| 127 | + # |
| 128 | + # manifest: (either "execute" or "manifest" must be present) |
| 129 | + # -------- |
| 130 | + # hash of per operation Puppet manifest to run. |
| 131 | + # |
| 132 | + # Example: |
| 133 | + # ===8<=== |
| 134 | + # manifest: |
| 135 | + # start: manifests/site.pp |
| 136 | + # ===8<=== |
| 137 | + # |
| 138 | + # tags: (optional) |
| 139 | + # ---- |
| 140 | + # List of tags to use while running Puppet (standalone or agent) |
| 141 | + # Used for all operations. |
| 142 | + # |
| 143 | + # operations_tags: (optional) |
| 144 | + # --------------- |
| 145 | + # hash of lists of per operation tags to use |
| 146 | + # while running Puppet (standalone or agent) |
| 147 | + # |
| 148 | + # Example: |
| 149 | + # ===8<=== |
| 150 | + # operations_tags: |
| 151 | + # start: ['my_start'] |
| 152 | + # ===8<=== |
| 153 | + # |
| 154 | + # add_operation_tag: (boolean, optional, default false) |
| 155 | + # ----------------- |
| 156 | + # |
| 157 | + # In addition to any other tags, passes cloudify_operation_X |
| 158 | + # tag, where X is the operation name (such as "configure" or |
| 159 | + # "start" for example). |
| 160 | + # |
| 161 | + |
| 162 | + interfaces: |
| 163 | + # All operations mapped to same entry point in Puppet plugin |
| 164 | + # The "operation" function decides what to run according |
| 165 | + # to the operation being performed. The operation is taken |
| 166 | + # from the passed context (CloudifyContext.operation) |
| 167 | + cloudify.interfaces.lifecycle: |
| 168 | + - create: puppet_plugin.operations.operation |
| 169 | + - configure: puppet_plugin.operations.operation |
| 170 | + - start: puppet_plugin.operations.operation |
| 171 | + - stop: puppet_plugin.operations.operation |
| 172 | + - delete: puppet_plugin.operations.operation |
| 173 | + |
| 174 | + cloudify.types.puppet.app_server: |
| 175 | + derived_from: cloudify.types.app_server |
| 176 | + properties: |
| 177 | + - puppet_config |
| 178 | + interfaces: |
| 179 | + cloudify.interfaces.lifecycle: |
| 180 | + - create: puppet_plugin.operations.operation |
| 181 | + - configure: puppet_plugin.operations.operation |
| 182 | + - start: puppet_plugin.operations.operation |
| 183 | + - stop: puppet_plugin.operations.operation |
| 184 | + - delete: puppet_plugin.operations.operation |
| 185 | + |
| 186 | + cloudify.types.puppet.db_server: |
| 187 | + derived_from: cloudify.types.db_server |
| 188 | + properties: |
| 189 | + - puppet_config |
| 190 | + interfaces: |
| 191 | + cloudify.interfaces.lifecycle: |
| 192 | + - create: puppet_plugin.operations.operation |
| 193 | + - configure: puppet_plugin.operations.operation |
| 194 | + - start: puppet_plugin.operations.operation |
| 195 | + - stop: puppet_plugin.operations.operation |
| 196 | + - delete: puppet_plugin.operations.operation |
| 197 | + |
| 198 | + cloudify.types.puppet.web_server: |
| 199 | + derived_from: cloudify.types.web_server |
| 200 | + properties: |
| 201 | + - puppet_config |
| 202 | + interfaces: |
| 203 | + cloudify.interfaces.lifecycle: |
| 204 | + - create: puppet_plugin.operations.operation |
| 205 | + - configure: puppet_plugin.operations.operation |
| 206 | + - start: puppet_plugin.operations.operation |
| 207 | + - stop: puppet_plugin.operations.operation |
| 208 | + - delete: puppet_plugin.operations.operation |
| 209 | + |
| 210 | + |
| 211 | + cloudify.types.puppet.message_bus_server: |
| 212 | + derived_from: cloudify.types.message_bus_server |
| 213 | + properties: |
| 214 | + - puppet_config |
| 215 | + interfaces: |
| 216 | + cloudify.interfaces.lifecycle: |
| 217 | + - create: puppet_plugin.operations.operation |
| 218 | + - configure: puppet_plugin.operations.operation |
| 219 | + - start: puppet_plugin.operations.operation |
| 220 | + - stop: puppet_plugin.operations.operation |
| 221 | + - delete: puppet_plugin.operations.operation |
| 222 | + |
| 223 | + cloudify.types.puppet.app_module: |
| 224 | + derived_from: cloudify.types.app_module |
| 225 | + properties: |
| 226 | + - puppet_config |
| 227 | + interfaces: |
| 228 | + cloudify.interfaces.lifecycle: |
| 229 | + - create: puppet_plugin.operations.operation |
| 230 | + - configure: puppet_plugin.operations.operation |
| 231 | + - start: puppet_plugin.operations.operation |
| 232 | + - stop: puppet_plugin.operations.operation |
| 233 | + - delete: puppet_plugin.operations.operation |
| 234 | + |
| 235 | +relationships: |
| 236 | + cloudify.puppet.depends_on: |
| 237 | + derived_from: cloudify.relationships.depends_on |
| 238 | + source_interfaces: |
| 239 | + # The comment under types.interfaces applies here too |
| 240 | + cloudify.interfaces.relationship_lifecycle: |
| 241 | + - preconfigure: puppet_plugin.operations.operation |
| 242 | + - postconfigure: puppet_plugin.operations.operation |
| 243 | + - establish: puppet_plugin.operations.operation |
| 244 | + - unlink: puppet_plugin.operations.operation |
| 245 | + cloudify.puppet.connected_to: |
| 246 | + derived_from: cloudify.relationships.connected_to |
| 247 | + source_interfaces: |
| 248 | + # The comment under types.interfaces applies here too |
| 249 | + cloudify.interfaces.relationship_lifecycle: |
| 250 | + - preconfigure: puppet_plugin.operations.operation |
| 251 | + - postconfigure: puppet_plugin.operations.operation |
| 252 | + - establish: puppet_plugin.operations.operation |
| 253 | + - unlink: puppet_plugin.operations.operation |
0 commit comments