Skip to content

Commit 0588a89

Browse files
committed
De-dupe the Docker Hub instructions into pre-reqs
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 18731b0 commit 0588a89

File tree

3 files changed

+27
-31
lines changed

3 files changed

+27
-31
lines changed

lab1.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,32 @@ $ faas-cli help
6464
$ faas-cli version
6565
```
6666

67+
## Configure a registry - The Docker Hub
68+
69+
Sign up for a Docker Hub account. The [Docker Hub](https://hub.docker.com) allows you to publish your Docker images on the Internet for use on multi-node clusters or to share with the wider community. We will be using the Docker Hub to publish our functions during the workshop.
70+
71+
You can sign up here: [Docker Hub](https://hub.docker.com)
72+
73+
Open a Terminal or Git Bash window and log into the Docker Hub using the username you signed up for above.
74+
75+
```
76+
$ docker login
77+
```
78+
79+
> Note: Tip from community - if you get an error while trying to run this command on a Windows machine, then click on the Docker for Windows icon in the taskbar and log into Docker there instead "Sign in / Create Docker ID".
80+
81+
* Set your OpenFaaS prefix for new images
82+
83+
OpenFaaS images are stored in a Docker registry or the Docker Hub, we can set an environment variable so that your username is automatically added to new functions you create. This will save you some time over the course of the workshop.
84+
85+
Edit `~/.bashrc` or `~/.bash_profile` - create the file if it doesn't exist.
86+
87+
Now add the following - changing the URL as per the one you saw above.
88+
89+
```
90+
export OPENFAAS_PREFIX="" # Populate with your Docker Hub username
91+
```
92+
6793
### Setup a single-node cluster
6894

6995
If you're taking part in an instructor-lead event then the organiser may ask you to use Docker Swarm, because it's much quicker and easier to set up in a short period of time. For some workshops you will be using Kubernetes.

lab1a.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,6 @@ $ docker swarm init
1414

1515
> If you receive an error then pass the `--advertise-addr` parameter along with your laptop's IP address.
1616
17-
### Docker Hub
18-
19-
Sign up for a Docker Hub account. The [Docker Hub](https://hub.docker.com) allows you to publish your Docker images on the Internet for use on multi-node clusters or to share with the wider community. We will be using the Docker Hub to publish our functions during the workshop.
20-
21-
You can sign up here: [Docker Hub](https://hub.docker.com)
22-
23-
> Note: The Docker Hub can also be setup to automate builds of Docker images.
24-
25-
Open a Terminal or Git Bash window and log into the Docker Hub using the username you signed up for above.
26-
27-
```sh
28-
$ docker login
29-
```
30-
31-
> Note: Tip from community - if you get an error while trying to run this command on a Windows machine, then click on the Docker for Windows icon in the taskbar and log into Docker there instead "Sign in / Create Docker ID".
32-
3317
### Deploy OpenFaaS
3418

3519
The instructions for deploying OpenFaaS change from time to time as we strive to make this easier. The following will get OpenFaaS deployed in around 60 seconds:

lab1b.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,6 @@ NAME STATUS ROLES AGE VERSION
204204
gke-name-default-pool-eceef152-qjmt Ready <none> 1h v1.10.7-gke.2
205205
```
206206

207-
## Configure a registry - The Docker Hub
208-
209-
Sign up for a Docker Hub account. The [Docker Hub](https://hub.docker.com) allows you to publish your Docker images on the Internet for use on multi-node clusters or to share with the wider community. We will be using the Docker Hub to publish our functions during the workshop.
210-
211-
You can sign up here: [Docker Hub](https://hub.docker.com)
212-
213-
Open a Terminal or Git Bash window and log into the Docker Hub using the username you signed up for above.
214-
215-
```
216-
$ docker login
217-
```
218-
219-
> Note: Tip from community - if you get an error while trying to run this command on a Windows machine, then click on the Docker for Windows icon in the taskbar and log into Docker there instead "Sign in / Create Docker ID".
220-
221207
## Deploy OpenFaaS
222208

223209
The instructions for deploying OpenFaaS change from time to time as we strive to make this even easier.
@@ -308,7 +294,7 @@ Edit `~/.bashrc` or `~/.bash_profile` - create the file if it doesn't exist.
308294
Now add the following - changing the URL as per the one you saw above.
309295

310296
```
311-
-export OPENFAAS_URL="" # populate as above
297+
export OPENFAAS_URL="" # populate as above
312298
```
313299

314300
Now move onto [Lab 2](lab2.md)

0 commit comments

Comments
 (0)