Created
December 2, 2018 19:30
-
-
Save alexellis/4a239cb355c9c289f986ec5a2a957c10 to your computer and use it in GitHub Desktop.
Deploy on Swarm / Docker for Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alexr:faas alex$ docker swarm init | |
Swarm initialized: current node (64dzd5vqwfxumbhq38s8kqioc) is now a manager. | |
To add a worker to this swarm, run the following command: | |
docker swarm join --token SWMTKN-1-2iyl4qp1r2h9g0hitgfowonyo3sh5e762nc4vsus4mefy2xzq7-2rdd4d151hhhjyzew4oxvndvd 192.168.65.3:2377 | |
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. | |
alexr:faas alex$ git clone https://github.com/openfaas/faas && \ | |
> cd faas && \ | |
> ./deploy_stack.sh | |
Cloning into 'faas'... | |
remote: Enumerating objects: 4, done. | |
remote: Counting objects: 100% (4/4), done. | |
remote: Compressing objects: 100% (4/4), done. | |
remote: Total 17401 (delta 0), reused 0 (delta 0), pack-reused 17397 | |
Receiving objects: 100% (17401/17401), 22.00 MiB | 3.93 MiB/s, done. | |
Resolving deltas: 100% (7118/7118), done. | |
Checking out files: 100% (2464/2464), done. | |
Attempting to create credentials for gateway.. | |
t06tb5yxh54h5ny7kuqf3fl2b | |
wkclhr4slxz1sordfx41nbfgi | |
[Credentials] | |
username: admin | |
password: a600d4714a432ba1ed8904fc95042b095b3d13b98dfc1ce08279462841e2e5ca | |
echo -n a600d4714a432ba1ed8904fc95042b095b3d13b98dfc1ce08279462841e2e5ca | faas-cli login --username=admin --password-stdin | |
Enabling basic authentication for gateway.. | |
Deploying OpenFaaS core services | |
Creating network func_functions | |
Creating config func_prometheus_rules | |
Creating config func_alertmanager_config | |
Creating config func_prometheus_config | |
Creating service func_nats | |
Creating service func_queue-worker | |
Creating service func_prometheus | |
Creating service func_alertmanager | |
Creating service func_gateway | |
Creating service func_faas-swarm | |
alexr:faas alex$ echo -n a600d4714a432ba1ed8904fc95042b095b3d13b98dfc1ce08279462841e2e5ca | faas-cli login --username=admin --password-stdin | |
Calling the OpenFaaS server to validate the credentials... | |
WARNING! Communication is not secure, please consider using HTTPS. Letsencrypt.org offers free SSL/TLS certificates. | |
credentials saved for admin http://127.0.0.1:8080 | |
alexr:faas alex$ | |
alexr:faas alex$ faas deploy -f \ | |
> https://raw.githubusercontent.com/openfaas/faas/master/stack.yml | |
Parsed: https://raw.githubusercontent.com/openfaas/faas/master/stack.yml | |
Deploying: markdown. | |
Deployed. 202 Accepted. | |
URL: http://127.0.0.1:8080/function/markdown | |
Deploying: hubstats. | |
Deployed. 202 Accepted. | |
URL: http://127.0.0.1:8080/function/hubstats | |
Deploying: nodeinfo. | |
Deployed. 202 Accepted. | |
URL: http://127.0.0.1:8080/function/nodeinfo | |
Deploying: echoit. | |
Deployed. 202 Accepted. | |
URL: http://127.0.0.1:8080/function/echoit | |
Deploying: wordcount. | |
Deployed. 202 Accepted. | |
URL: http://127.0.0.1:8080/function/wordcount | |
Deploying: base64. | |
Deployed. 202 Accepted. | |
URL: http://127.0.0.1:8080/function/base64 | |
alexr:faas alex$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is my how-to to kick things off
How to