Skip to content

Commit f6f6e02

Browse files
Martin Dekov (VMware)alexellis
authored andcommitted
Add documentation on template store
Adding documentation to describe the template store command which is a feature in the cli version 0.8.1 along with adding description with the two existing constant which set the default locations for the template store and the default template URL from which you pull the templates Signed-off-by: Martin Dekov (VMware) <[email protected]>
1 parent 3871010 commit f6f6e02

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

docs/cli/templates.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,54 @@ You can use your own Git repository for a custom or forked set of templates. Thi
324324

325325
See `faas-cli template pull` for more information.
326326

327+
If you want to set up your own default template location, specify the `OPENFAAS_TEMPLATE_URL` environmental variable the following way:
328+
329+
```bash
330+
export OPENFAAS_TEMPLATE_URL=https://raw.githubusercontent.com/user/mytemplate/customtemplates
331+
```
332+
333+
#### 8.4 Download templates from the template store
334+
335+
> Note: In order to access the template store you need `0.8.1` version of the CLI or higher
336+
337+
Check what templates are available in the template store with the CLI by typing:
338+
339+
```bash
340+
faas-cli template store list
341+
```
342+
343+
Pull the desired template by specifying `NAME` attribute only:
344+
345+
```bash
346+
faas-cli template store pull go
347+
```
348+
349+
or pull the template by mixing the `REPOSITORY` and `NAME` attributes the following way:
350+
351+
```bash
352+
faas-cli template store pull openfaas/go
353+
```
354+
355+
To get more information on specific store use the `describe` verb like:
356+
357+
```bash
358+
faas-cli template store describe openfaas/go
359+
```
360+
361+
or if there is no collision between names use only the name field:
362+
363+
```bash
364+
faas-cli template store describe go
365+
```
366+
367+
If you have your own store with templates, you can set that as your default official store by setting the environmental variable `OPENFAAS_TEMPLATE_STORE_URL` the following way:
368+
369+
```bash
370+
export OPENFAAS_TEMPLATE_STORE_URL=https://raw.githubusercontent.com/user/openfaas-templates/templates.json
371+
```
372+
373+
Now the source of the store is changed to the URL you have specified above.
374+
327375
## ARM / Raspberry Pi
328376

329377
Templates for ARM and Raspberry Pi are provided on a best-effort basis. If you can help with maintenance please let the project contributors know.

0 commit comments

Comments
 (0)