WIP using templates

pull/758/head
Scott Anderson 2020-02-10 11:43:51 -07:00
parent 055ba1a0f8
commit cc34dc7af7
1 changed files with 100 additions and 11 deletions

View File

@ -1,20 +1,109 @@
--- ---
title: Use an InfluxDB template title: Use InfluxDB templates
description: > description: >
placeholder Use the `influx pkg` command to view and install templates from your local
filesystem or from URLs.
menu: menu:
v2_0: v2_0:
parent: InfluxDB templates parent: InfluxDB templates
name: Use a template name: Use templates
weight: 101 weight: 101
v2.0/tags: [templates] v2.0/tags: [templates]
--- ---
## Placeholder outline Use the `influx pkg` command to summarize, validate, and install templates from
- Use a template your local filesystem and from URLs.
- `influx pkg`
- Populating secrets for templates that include secrets ## View a template summary
- View package summaries before installing To view a summary of what's included in a template before installing the template,
- Validate a package before installing use the [`influx pkg summary` command](/v2.0/reference/cli/influx/pkg/summary/).
- Use a template from a remote URL Summarize templates stored in your local filesystem or from a URL.
- Define secrets while installing a template
{{% code-tabs-wrapper %}}
{{% code-tabs %}}
[From a file](#)
[From a URL](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```sh
# Syntax
influx pkg summary -f <template-filepath>
# Example
influx pkg summary -f /path/to/template.yml
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```sh
# Syntax
influx pkg summary -u <template-url>
# 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 <template-filepath>
# Example
influx pkg validate -f /path/to/template.yml
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```sh
# Syntax
influx pkg validate -u <template-url>
# 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 <template-url>
# Example
influx pkg -u <template-url>
```
### Install templates from both files and URLs
```sh
# Syntax
influx pkg -u <template-url> -f <template-path>
# 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
-