英文博客 https://blog.alexellis.io/your-serverless-raspberry-pi-cluster/
中文译文 https://linux.cn/article-9007-1.html?utm_source=index&utm_medium=more
https://docs.openfaas.com/deployment/docker-swarm/
https://github.com/openfaas/faas
docker swarm init
命令docker swarm join 令牌字符串 主机IP地址:2377
命令mkdir -p ~/openfaas && pushd ~/openfaas
git clone https://github.com/openfaas/faas.git -b 0.9.6 faas-0.9.6
cd faas-0.9.6
docker stack deploy func --compose-file docker-compose.arm64.yml
# 备注:32位raspbian可以执行./deploy_stack.armhf.sh , 但这里我们用的是64位HypriotOS所以手动docker敲命令
Creating network func_functions
Creating service func_gateway
Creating service func_prometheus
Creating service func_alertmanager
Creating service func_nodeinfo
Creating service func_markdown
Creating service func_wordcount
Creating service func_echoit
watch 'docker service ls'
# 手动下载 https://github.com/openfaas/faas-cli/releases/download/0.7.6/faas-cli-arm64 保存到 /tmp/faas-cli-arm64
curl -sSL cli.openfaas.com > install-cli.sh
切换到root
sudo su
启动翻墙代理, 设置http_proxy
cat install-cli.sh | sh