Move samples.yml to stack.yml (default) and update references in shell scripts
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
		| @@ -129,7 +129,7 @@ A YAML stack file groups functions together and also saves on typing. | ||||
|  | ||||
| You can define individual functions or a set of of them within a YAML file. This makes the CLI easier to use and means you can use this file to deploy to your OpenFaaS instance.  By default the faas-cli will attempt to load `stack.yaml` from the current directory. | ||||
|  | ||||
| Here is an example file using the `samples.yml` file included in the repository. | ||||
| Here is an example file using the `stack.yml` file included in the repository. | ||||
|  | ||||
| ```yaml | ||||
| provider: | ||||
| @@ -148,7 +148,7 @@ This url-ping function is defined in the sample/url-ping folder makes use of Pyt | ||||
| * Build the files in the .yml file: | ||||
|  | ||||
| ``` | ||||
| $ faas-cli build -f ./samples.yml | ||||
| $ faas-cli build -f ./stack.yml | ||||
| ``` | ||||
|  | ||||
| > `-f` specifies the file or URL to download your YAML file from. The long version of the `-f` flag is: `--yaml`. | ||||
| @@ -156,7 +156,7 @@ $ faas-cli build -f ./samples.yml | ||||
| You can also download over HTTP/s: | ||||
|  | ||||
| ``` | ||||
| $ faas-cli build -f https://raw.githubusercontent.com/openfaas/faas-cli/master/samples.yml | ||||
| $ faas-cli build -f https://raw.githubusercontent.com/openfaas/faas-cli/master/stack.yml | ||||
| ``` | ||||
|  | ||||
| Docker along with a Python template will be used to build an image named alexellis2/faas-urlping. | ||||
| @@ -166,7 +166,7 @@ Docker along with a Python template will be used to build an image named alexell | ||||
| Now you can use the following command to deploy your function(s): | ||||
|  | ||||
| ``` | ||||
| $ faas-cli deploy -f ./samples.yml | ||||
| $ faas-cli deploy -f ./stack.yml | ||||
| ``` | ||||
|  | ||||
| #### Managing secrets | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| ./faas-cli build --yaml ./samples.yml # --squash=true | ||||
| ./faas-cli build # --squash=true | ||||
|  | ||||
| docker images |head -n 4 | ||||
|   | ||||
| @@ -60,9 +60,9 @@ var buildCmd = &cobra.Command{ | ||||
| the "--yaml" flag (which may contain multiple function definitions), or directly | ||||
| via flags.`, | ||||
| 	Example: `  faas-cli build -f https://domain/path/myfunctions.yml | ||||
|   faas-cli build -f ./samples.yml --no-cache | ||||
|   faas-cli build -f ./samples.yml --filter "*gif*" | ||||
|   faas-cli build -f ./samples.yml --regex "fn[0-9]_.*" | ||||
|   faas-cli build -f ./stack.yml --no-cache | ||||
|   faas-cli build -f ./stack.yml --filter "*gif*" | ||||
|   faas-cli build -f ./stack.yml --regex "fn[0-9]_.*" | ||||
|   faas-cli build --image=my_image --lang=python --handler=/path/to/fn/  | ||||
|                  --name=my_fn --squash`, | ||||
| 	RunE: runBuild, | ||||
|   | ||||
| @@ -79,12 +79,12 @@ var deployCmd = &cobra.Command{ | ||||
| the "--yaml" flag (which may contain multiple function definitions), or directly | ||||
| via flags. Note: --replace and --update are mutually exclusive.`, | ||||
| 	Example: `  faas-cli deploy -f https://domain/path/myfunctions.yml | ||||
|   faas-cli deploy -f ./samples.yml | ||||
|   faas-cli deploy -f ./samples.yml --label canary=true | ||||
|   faas-cli deploy -f ./samples.yml --filter "*gif*" --secret dockerhuborg | ||||
|   faas-cli deploy -f ./samples.yml --regex "fn[0-9]_.*" | ||||
|   faas-cli deploy -f ./samples.yml --replace=false --update=true | ||||
|   faas-cli deploy -f ./samples.yml --replace=true --update=false | ||||
|   faas-cli deploy -f ./stack.yml | ||||
|   faas-cli deploy -f ./stack.yml --label canary=true | ||||
|   faas-cli deploy -f ./stack.yml --filter "*gif*" --secret dockerhuborg | ||||
|   faas-cli deploy -f ./stack.yml --regex "fn[0-9]_.*" | ||||
|   faas-cli deploy -f ./stack.yml --replace=false --update=true | ||||
|   faas-cli deploy -f ./stack.yml --replace=true --update=false | ||||
|   faas-cli deploy --image=alexellis/faas-url-ping --name=url-ping | ||||
|   faas-cli deploy --image=my_image --name=my_fn --handler=/path/to/fn/ | ||||
|                   --gateway=http://remote-site.com:8080 --lang=python | ||||
|   | ||||
| @@ -29,10 +29,10 @@ config to a remote repository. | ||||
| These container images must already be present in your local image cache.`, | ||||
|  | ||||
| 	Example: `  faas-cli push -f https://domain/path/myfunctions.yml | ||||
|   faas-cli push -f ./samples.yml | ||||
|   faas-cli push -f ./samples.yml --parallel 4 | ||||
|   faas-cli push -f ./samples.yml --filter "*gif*" | ||||
|   faas-cli push -f ./samples.yml --regex "fn[0-9]_.*"`, | ||||
|   faas-cli push -f ./stack.yml | ||||
|   faas-cli push -f ./stack.yml --parallel 4 | ||||
|   faas-cli push -f ./stack.yml --filter "*gif*" | ||||
|   faas-cli push -f ./stack.yml --regex "fn[0-9]_.*"`, | ||||
| 	RunE: runPush, | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -28,9 +28,9 @@ var removeCmd = &cobra.Command{ | ||||
| using the "--yaml" flag (which may contain multiple function definitions), or by | ||||
| explicitly specifying a function name.`, | ||||
| 	Example: `  faas-cli remove -f https://domain/path/myfunctions.yml | ||||
|   faas-cli remove -f ./samples.yml | ||||
|   faas-cli remove -f ./samples.yml --filter "*gif*" | ||||
|   faas-cli remove -f ./samples.yml --regex "fn[0-9]_.*" | ||||
|   faas-cli remove -f ./stack.yml | ||||
|   faas-cli remove -f ./stack.yml --filter "*gif*" | ||||
|   faas-cli remove -f ./stack.yml --regex "fn[0-9]_.*" | ||||
|   faas-cli remove url-ping | ||||
|   faas-cli remove img2ansi --gateway==http://remote-site.com:8080`, | ||||
| 	RunE: runDelete, | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| ./faas-cli deploy --yaml ./samples.yml | ||||
| ./faas-cli deploy --yaml ./stack.yml | ||||
|  | ||||
| sleep 5 | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ functions: | ||||
|   url-ping: | ||||
|     lang: python | ||||
|     handler: ./sample/url-ping | ||||
|     image: alexellis/faas-url-ping | ||||
|     image: alexellis/faas-url-ping:0.1 | ||||
|     limits: | ||||
|       memory: 10m | ||||
|     requests: | ||||
| @@ -15,7 +15,7 @@ functions: | ||||
| 
 | ||||
|   stronghash: | ||||
|     skip_build: true | ||||
|     image: functions/alpine | ||||
|     image: functions/alpine:latest | ||||
|     fprocess: "sha512sum" | ||||
|     limits: | ||||
|       memory: 10m | ||||
| @@ -25,7 +25,7 @@ functions: | ||||
|   nodejs-echo: | ||||
|     lang: node | ||||
|     handler: ./sample/nodejs-echo | ||||
|     image: alexellis/faas-nodejs-echo | ||||
|     image: alexellis/faas-nodejs-echo:0.1 | ||||
|     limits: | ||||
|       memory: 30m | ||||
|     requests: | ||||
| @@ -35,7 +35,7 @@ functions: | ||||
|   shrink-image: | ||||
|     lang: dockerfile | ||||
|     handler: ./sample/imagemagick | ||||
|     image: functions/resizer | ||||
|     image: functions/resizer:0.1 | ||||
|     fprocess: "convert - -resize 50% fd:1" | ||||
|     limits: | ||||
|       memory: 20m | ||||
| @@ -45,7 +45,7 @@ functions: | ||||
|   ruby-echo: | ||||
|     lang: ruby | ||||
|     handler: ./sample/ruby-echo | ||||
|     image: alexellis/ruby-echo | ||||
|     image: alexellis/ruby-echo:0.1 | ||||
|     limits: | ||||
|       memory: 10m | ||||
|     requests: | ||||
		Reference in New Issue
	
	Block a user
	 Alex Ellis
					Alex Ellis