From 743f694639091934005887682f31d34a53167b6f Mon Sep 17 00:00:00 2001 From: uriwygo Date: Mon, 16 Apr 2018 12:18:43 +0300 Subject: [PATCH] Add secret-blueprint file for hidden secret system test --- secret-blueprint.yaml | 79 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 secret-blueprint.yaml diff --git a/secret-blueprint.yaml b/secret-blueprint.yaml new file mode 100644 index 00000000..98e65382 --- /dev/null +++ b/secret-blueprint.yaml @@ -0,0 +1,79 @@ +tosca_definitions_version: cloudify_dsl_1_3 + +description: > + This blueprint installs a simple web server on the manager VM using Cloudify's script plugin. + +imports: + - http://www.getcloudify.org/spec/cloudify/4.4.dev1/types.yaml + - http://www.getcloudify.org/spec/diamond-plugin/1.3.6/plugin.yaml + +inputs: + server_ip: + description: > + The ip of the server the application will be deployed on. + agent_user: + description: > + User name used when SSH-ing into the started machine. + agent_private_key_path: + description: > + Path to a private key that resides on the management machine. + SSH-ing into agent machines will be done with this key. + webserver_port: + description: > + The HTTP web server port. + default: 8080 + +node_templates: + vm: + type: cloudify.nodes.Compute + properties: + ip: { get_secret: ip } + agent_config: + user: { get_secret: user } + key: { get_secret: key } + interfaces: + ########################################################### + # We are infact telling cloudify to install a diamond + # monitoring agent on the server. + # + # (see https://github.com/BrightcoveOS/Diamond) + ########################################################### + cloudify.interfaces.monitoring_agent: + install: + implementation: diamond.diamond_agent.tasks.install + inputs: + diamond_config: + interval: 1 + start: diamond.diamond_agent.tasks.start + stop: diamond.diamond_agent.tasks.stop + uninstall: diamond.diamond_agent.tasks.uninstall + cloudify.interfaces.monitoring: + start: + implementation: diamond.diamond_agent.tasks.add_collectors + inputs: + collectors_config: + CPUCollector: {} + MemoryCollector: {} + LoadAverageCollector: {} + DiskUsageCollector: + config: + devices: x?vd[a-z]+[0-9]*$ + NetworkCollector: {} + http_web_server: + type: cloudify.nodes.WebServer + properties: + port: { get_input: webserver_port } + relationships: + - type: cloudify.relationships.contained_in + target: vm + interfaces: + cloudify.interfaces.lifecycle: + configure: scripts/configure.sh + start: scripts/start.sh + stop: scripts/stop.sh + +outputs: + http_endpoint: + description: Web server external endpoint + value: { concat: ['http://', { get_property: [ vm, ip ] }, + ':', { get_property: [http_web_server, port] }] }