Use a Helm blueprint file to perform tasks on the infrastructure of an environment such as installing applications and servers.
Installing an Nginx server
The following is an example of a Helm blueprint file for installing a Nginx server. This sample is in a YAML format.
tosca_definitions_version: cloudify_dsl_1_3
description: >
This blueprint installs helm client, add repository to it and install
chart(without values file and flags),using kubeconfig file content.
imports:
- http://fileserver-svc/data/.artifacts/types/types-6.3.0.yaml
- plugin:cloudify-helm-plugin
inputs:
repo_name:
description: >
Name of the repo to add.
type: string
default: bitnami
chart_name:
description: >
Chart package name to deploy from repo.
default: nginx
helm_installation_source:
description: >
Helm download link.
type: string
default: 'http://fileserver-svc/data/test/helm-v3.6.3-linux-amd64.tar.gz'
repo_url:
description: >
URL of the repo to add. For example:
https://kubernetes-charts.storage.googleapis.com/
type: string
default: 'https://charts.bitnami.com/bitnami'
helm_max_sleep_time:
type: integer
default: 250
kube_config_file:
description: >
Name of secret containing kubeconfig info.
type: string
default: kubeconfig
node_templates:
helm_install:
type: cloudify.nodes.helm.Binary
properties:
use_existing_resource: false
installation_source: { get_input: helm_installation_source }
repo:
type: cloudify.nodes.helm.Repo
properties:
resource_config:
name: { get_input: repo_name }
repo_url: { get_input: repo_url }
max_sleep_time: { get_input: helm_max_sleep_time }
relationships:
- target: helm_install
type: cloudify.helm.relationships.run_on_host
release:
type: cloudify.nodes.helm.Release
properties:
client_config:
configuration:
file_content: {get_secret: { get_input: kube_config_file } }
resource_config:
name: "myrelease"
chart: { concat: [ { get_input: repo_name },'/', { get_input: chart_name } ] }
max_sleep_time: { get_input: helm_max_sleep_time }
relationships:
- target: helm_install
type: cloudify.helm.relationships.run_on_host
- target: repo
type: cloudify.relationships.depends_on
Nginx blueprint inputs
The following is a sample of Nginx blueprint inputs.
repo_name: bitnami
chart_name: nginx
helm_installation_source: http://fileserver-svc/data/test/helm-v3.6.3-linux-amd64.tar.gz
repo_url: https://charts.bitnami.com/bitnami
helm_max_sleep_time: 250
kube_config_file: kubeconfig