|
| 1 | +plugins: |
| 2 | + |
| 3 | + sl: |
| 4 | + executor: central_deployment_agent |
| 5 | + package_name: cloudify-serverless-plugin |
| 6 | + package_version: '0.1.3' |
| 7 | + |
| 8 | +data_types: |
| 9 | + |
| 10 | + cloudify.types.serverless.ServerlessConfig: |
| 11 | + properties: |
| 12 | + executable_path: |
| 13 | + type: string |
| 14 | + default: '' |
| 15 | + description: File path to Serverless binary. Leave blank and Cloudify will store the binary. |
| 16 | + |
| 17 | + cloudify.types.serverless.ClientConfig: |
| 18 | + properties: |
| 19 | + provider: |
| 20 | + type: string |
| 21 | + description: The Serverless provider name. |
| 22 | + required: false |
| 23 | + credentials: |
| 24 | + type: dict |
| 25 | + required: false |
| 26 | + description: Credentials of the provider. |
| 27 | + |
| 28 | + cloudify.types.serverless.ServiceConfig: |
| 29 | + properties: |
| 30 | + name: |
| 31 | + type: string |
| 32 | + description: The Serverless service name. |
| 33 | + required: true |
| 34 | + template: |
| 35 | + type: string |
| 36 | + description: Template for the service. |
| 37 | + required: true |
| 38 | + template_url: |
| 39 | + type: string |
| 40 | + description: Template URL for the service. Supports GitHub, BitBucket. |
| 41 | + required: false |
| 42 | + template_path: |
| 43 | + type: string |
| 44 | + description: Template local path for the service. |
| 45 | + required: false |
| 46 | + functions: |
| 47 | + type: list |
| 48 | + required: true |
| 49 | + description: List of cloudify.types.serverless.FunctionConfig. |
| 50 | + env: |
| 51 | + type: dict |
| 52 | + required: false |
| 53 | + description: > |
| 54 | + A dict of environment variables to use during execution of serverless CLI calls. |
| 55 | + # For example, you can provide AWS credentials: |
| 56 | + # env: |
| 57 | + # AWS_ACCESS_KEY_ID: { get_secret: AWS_ACCESS_KEY_ID } |
| 58 | + # AWS_SECRET_ACCESS_KEY: { get_secret: AWS_SECRET_ACCESS_KEY } |
| 59 | + |
| 60 | + cloudify.types.serverless.FunctionConfig: |
| 61 | + properties: |
| 62 | + name: |
| 63 | + type: string |
| 64 | + description: The Serverless function name. |
| 65 | + required: true |
| 66 | + handler: |
| 67 | + type: string |
| 68 | + description: The Serverless function handelr. |
| 69 | + required: true |
| 70 | + events: |
| 71 | + type: list |
| 72 | + description: List of events assoicated with the function. |
| 73 | + required: false |
| 74 | + environment: |
| 75 | + type: dict |
| 76 | + description: Function environment variables. |
| 77 | + required: false |
| 78 | + |
| 79 | +dsl_definitions: |
| 80 | + |
| 81 | + serverless_configuration: &serverless_config |
| 82 | + serverless_config: |
| 83 | + type: cloudify.types.serverless.ServerlessConfig |
| 84 | + |
| 85 | + use_external_resource_desc: &use_external_resource_desc > |
| 86 | + Indicate whether the resource exists or if Cloudify should create the resource, |
| 87 | + true if you are bringing an existing resource, false if you want cloudify to create it. |
| 88 | + |
| 89 | + external_resource: &external_resource |
| 90 | + use_external_resource: |
| 91 | + description: *use_external_resource_desc |
| 92 | + type: boolean |
| 93 | + default: false |
| 94 | + |
| 95 | +node_types: |
| 96 | + |
| 97 | + cloudify.nodes.serverless.Binary: |
| 98 | + derived_from: cloudify.nodes.SoftwareComponent |
| 99 | + properties: |
| 100 | + <<: *serverless_config |
| 101 | + <<: *external_resource |
| 102 | + installation_source: |
| 103 | + type: string |
| 104 | + default: 'https://github.com/serverless/serverless/releases/download/v3.22.0/serverless-linux-x64' |
| 105 | + description: > |
| 106 | + Location to download the Helm installation from. Ignored if 'use_existing_resource' is true. |
| 107 | + max_sleep_time: |
| 108 | + type: integer |
| 109 | + default: 300 |
| 110 | + interfaces: |
| 111 | + cloudify.interfaces.lifecycle: |
| 112 | + create: |
| 113 | + implementation: sl.serverless_plugin.tasks.install_binary |
| 114 | + delete: |
| 115 | + implementation: sl.serverless_plugin.tasks.uninstall_binary |
| 116 | + |
| 117 | + cloudify.nodes.serverless.Service: |
| 118 | + derived_from: cloudify.nodes.SoftwareComponent |
| 119 | + properties: |
| 120 | + <<: *serverless_config |
| 121 | + <<: *external_resource |
| 122 | + client_config: |
| 123 | + type: cloudify.types.serverless.ClientConfig |
| 124 | + description: Configure the Serverless provider and client credentials. |
| 125 | + required: true |
| 126 | + resource_config: |
| 127 | + type: cloudify.types.serverless.ServiceConfig |
| 128 | + required: true |
| 129 | + interfaces: |
| 130 | + cloudify.interfaces.lifecycle: |
| 131 | + create: |
| 132 | + implementation: sl.serverless_plugin.tasks.create |
| 133 | + configure: |
| 134 | + implementation: sl.serverless_plugin.tasks.configure |
| 135 | + start: |
| 136 | + implementation: sl.serverless_plugin.tasks.start |
| 137 | + poststart: |
| 138 | + implementation: sl.serverless_plugin.tasks.poststart |
| 139 | + stop: |
| 140 | + implementation: sl.serverless_plugin.tasks.stop |
| 141 | + delete: |
| 142 | + implementation: sl.serverless_plugin.tasks.delete |
| 143 | + serverless.interface: |
| 144 | + invoke: |
| 145 | + implementation: sl.serverless_plugin.tasks.invoke |
| 146 | + inputs: |
| 147 | + functions: |
| 148 | + default: [] |
| 149 | + metrics: |
| 150 | + implementation: sl.serverless_plugin.tasks.metrics |
| 151 | + inputs: |
| 152 | + functions: |
| 153 | + default: [] |
| 154 | + |
| 155 | +blueprint_labels: |
| 156 | + obj-type: |
| 157 | + values: |
| 158 | + - serverless |
| 159 | + |
| 160 | +labels: |
| 161 | + obj-type: |
| 162 | + values: |
| 163 | + - serverless |
0 commit comments