Addressing some comments

Signed-off-by: Jono Finger <jfinger@plos.org>
This commit is contained in:
Jono Finger 2017-10-13 15:29:28 -07:00 committed by Alex Ellis
parent 7cd333a285
commit c04a3c0612

View File

@ -1,4 +1,4 @@
# Using a self-hosted registry with OpenFaaS
# Use a self-hosted registry with OpenFaaS
If you're using OpenFaaS on single host, then you don't need to push your images to a registry. They will just be used from the local Docker library.
@ -10,6 +10,8 @@ This describes how to use OpenFaaS in a swarm with your own local registry for h
For this example lets presume you want to create a swarm of 3 nodes. Use node1 as the manager.
This is adapted from the [Swarm deployment guide](https://github.com/openfaas/faas/blob/master/guide/deployment_swarm.md).
```
$ docker swarm init --advertise-addr $(hostname -i)
```
@ -26,12 +28,13 @@ $ git clone https://github.com/openfaas/faas && \
./deploy_stack.sh
```
## Add a registry to the swarm
## Start a registry
Add it to the swarm and use the same network as OpenFaaS.
```
docker service create -d -p 5000:5000 \
--network func_functions --detach=false \
--constraint 'node.role == manager' \
--name registry registry:2
```
@ -42,6 +45,13 @@ Here we are using a basic local registry. You can deploy it elsewhere and use vo
This is a helper for using and deploying functions to OpenFaaS.
On a Mac if you're using brew then you can type in
```
$ brew install faas-cli
```
On Linux
```
$ curl -sSL https://cli.openfaas.com | sh
```