From cc34dc7af764e52e73b718b3d65192f7fcee1ebe Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 10 Feb 2020 11:43:51 -0700 Subject: [PATCH] WIP using templates --- content/v2.0/influxdb-templates/use.md | 111 ++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 11 deletions(-) diff --git a/content/v2.0/influxdb-templates/use.md b/content/v2.0/influxdb-templates/use.md index 29cf477be..f470ece0d 100644 --- a/content/v2.0/influxdb-templates/use.md +++ b/content/v2.0/influxdb-templates/use.md @@ -1,20 +1,109 @@ --- -title: Use an InfluxDB template +title: Use InfluxDB templates description: > - placeholder + Use the `influx pkg` command to view and install templates from your local + filesystem or from URLs. menu: v2_0: parent: InfluxDB templates - name: Use a template + name: Use templates weight: 101 v2.0/tags: [templates] --- -## Placeholder outline -- Use a template - - `influx pkg` - - Populating secrets for templates that include secrets - - View package summaries before installing - - Validate a package before installing - - Use a template from a remote URL - - Define secrets while installing a template +Use the `influx pkg` command to summarize, validate, and install templates from +your local filesystem and from URLs. + +## View a template summary +To view a summary of what's included in a template before installing the template, +use the [`influx pkg summary` command](/v2.0/reference/cli/influx/pkg/summary/). +Summarize templates stored in your local filesystem or from a URL. + +{{% code-tabs-wrapper %}} +{{% code-tabs %}} +[From a file](#) +[From a URL](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sh +# Syntax +influx pkg summary -f + +# Example +influx pkg summary -f /path/to/template.yml +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sh +# Syntax +influx pkg summary -u + +# Example +influx pkg summary -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml +``` +{{% /code-tab-content %}} +{{% /code-tabs-wrapper %}} + +## Validate a template +To validate a template before installing it or for troubleshooting purposes, use +the [`influx pkg validate` command](/v2.0/reference/cli/influx/pkg/validate/). +Validate templates stored in your local filesystem or from a URL. + +{{% code-tabs-wrapper %}} +{{% code-tabs %}} +[From a file](#) +[From a URL](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sh +# Syntax +influx pkg validate -f + +# Example +influx pkg validate -f /path/to/template.yml +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sh +# Syntax +influx pkg validate -u + +# Example +influx pkg validate -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml +``` +{{% /code-tab-content %}} +{{% /code-tabs-wrapper %}} + +## Install templates + +### Install templates from files +- Install individual files +- Install mulitple files +- Install all files in a directory +- Recurse through a directory - `-recurse` + +### Install templates from a URL +```sh +# Syntax +influx pkg -u + +# Example +influx pkg -u +``` + +### Install templates from both files and URLs +```sh +# Syntax +influx pkg -u -f + +# Example +influx pkg \ + -u https://mydomain.com/templates/template1.yml \ + -u https://mydomain.com/templates/template2.yml \ + -f ~/templates/custom-template.yml \ + -f ~/templates/iot/home/ \ + --recurse +``` + +## Include secrets when installing a template +-