Skip to content

Commit 3081437

Browse files
committed
Add auth instructions for Swarm
Updates Swarm deployment guide and play-with-docker instrucctions to advise user to keep credentials and at the least to log in via the faas-cli. Signed-off-by: Alex Ellis (VMware) <[email protected]>
1 parent 5760c32 commit 3081437

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

docs/deployment/docker-swarm.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,26 @@ $ git clone https://github.com/openfaas/faas && \
3535
./deploy_stack.sh
3636
```
3737

38-
!!! note
39-
If you want to try newer features you can checkout the `master` branch, but we do not recommend that for first-time users.
38+
!!! info
39+
Basic authentication is now enabled by default for your protection. If you need to disable it pass the flag --no-auth to the ./deploy_stack.sh command above.
40+
41+
### 2.1 Store your admin credentials
42+
43+
The default configuration will create a username and password combination for you:
44+
45+
```
46+
Attempting to create credentials for gateway..
47+
...
48+
[Credentials]
49+
username: admin
50+
password: <some_hash_secret>
51+
echo -n <some_hash_secret> | faas-cli login --username=admin --
52+
password-stdin
53+
```
54+
55+
Run the command as you see it in your console, do not copy/paste the login command.
56+
57+
You will need the password for using the UI and REST API on the gateway, but you can invoke your functions without it.
4058

4159
## 2.1 Test out the UI
4260

@@ -52,7 +70,8 @@ Within a few seconds (or minutes if on a poor WiFi connection) the API gateway a
5270
The earlier `git clone` included a set of sample functions in `stack.yml`, to deploy them [install the OpenFaaS CLI](/cli/install/) and run:
5371

5472
```
55-
faas deploy
73+
$ faas deploy -f \
74+
https://raw.githubusercontent.com/openfaas/faas/master/stack.yml
5675
```
5776

5877
## 3.0 Start the hands-on labs

docs/deployment/play-with-docker.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ git clone https://github.com/openfaas/faas && \
4646
./deploy_stack.sh
4747
```
4848

49+
!!! info
50+
Basic authentication is now enabled by default for your protection so note down your credentials. If you need to disable it pass the flag --no-auth to the ./deploy_stack.sh command above.
51+
4952
`./deploy_stack.sh` can be run at any time and deploys the core OpenFaas components. You can read more about these in the [TestDrive document](https://github.com/openfaas/faas/blob/master/TestDrive.md)
5053

5154
## 2.1 Test out the UI

0 commit comments

Comments
 (0)