Vagrant で ローカル環境を汚さずにサクッと Open-FaaS を試す
TL; DR
- OpenFaaS というサーバーレス環境を立てられる OSS があります
- いろいろ試してみるのに、Vagrantに閉じ込めた環境を用意しました
リポジトリ: https://github.com/ryskiwt/openfaas-in-vagrant
使い方
- ほとんど上のリポジトリに書いてあるので割愛
ちょっと解説
provision.sh
Vagrantfile から config.vm.provision "shell", path: "provision.sh"
で呼び出します
-
docker, docker-compose のインストール
- Vagrantfile に以下のように記述するだけでも
docker
と docker-compose
は入りますが、今回は使いたいバージョンが入らなかったので、プロビジョニング用のshellを書いています。
config.vm.provision :docker
config.vm.provision :docker_compose
- open-faas の環境構築
- 複数のNICがある場合は、追加でオプションの指定が必要(
docker swarm init --advertise-addr=192.168.33.40
)
- open-faas の環境構築は、 公式リポジトリを clone して
./deploy_stack.sh --no-auth
だけで終わり
参考リンク集
- github
- 公式のドキュメント
- OpenFaaS の APIドキュメント
- OpenFaaS の ワークショップ(日本語)
- これだけで、構築〜CLIツールの使い方まで一通りわかります
- https://github.com/openfaas/workshop/tree/master/translations/ja
- Vagrant内にDocker環境をつくるのに参考にさせていただきました
- function template のリポジトリ
- function の雛形の定義が格納されている
- https://github.com/openfaas/templates
-
https://github.com/openfaas-incubator (この配下に
xxx-template
のリポジトリがいくつか)
- watchdog のリポジトリ
- watchdog 書いてしまえば魔改造も可能らしい
- 旧版: https://github.com/openfaas/faas/tree/master/watchdog
- 次世代版: https://github.com/openfaas-incubator/of-watchdog
provision.sh
Vagrantfile から
config.vm.provision "shell", path: "provision.sh"
で呼び出します-
docker, docker-compose のインストール
- Vagrantfile に以下のように記述するだけでも
docker
とdocker-compose
は入りますが、今回は使いたいバージョンが入らなかったので、プロビジョニング用のshellを書いています。
- Vagrantfile に以下のように記述するだけでも
config.vm.provision :docker
config.vm.provision :docker_compose
- open-faas の環境構築
- 複数のNICがある場合は、追加でオプションの指定が必要(
docker swarm init --advertise-addr=192.168.33.40
) - open-faas の環境構築は、 公式リポジトリを clone して
./deploy_stack.sh --no-auth
だけで終わり
- 複数のNICがある場合は、追加でオプションの指定が必要(
参考リンク集
- github
- 公式のドキュメント
- OpenFaaS の APIドキュメント
- OpenFaaS の ワークショップ(日本語)
- これだけで、構築〜CLIツールの使い方まで一通りわかります
- https://github.com/openfaas/workshop/tree/master/translations/ja
- Vagrant内にDocker環境をつくるのに参考にさせていただきました
- function template のリポジトリ
- function の雛形の定義が格納されている
- https://github.com/openfaas/templates
-
https://github.com/openfaas-incubator (この配下に
xxx-template
のリポジトリがいくつか)
- watchdog のリポジトリ
- watchdog 書いてしまえば魔改造も可能らしい
- 旧版: https://github.com/openfaas/faas/tree/master/watchdog
- 次世代版: https://github.com/openfaas-incubator/of-watchdog
- これだけで、構築〜CLIツールの使い方まで一通りわかります
- https://github.com/openfaas/workshop/tree/master/translations/ja
- function の雛形の定義が格納されている
- https://github.com/openfaas/templates
-
https://github.com/openfaas-incubator (この配下に
xxx-template
のリポジトリがいくつか)
- watchdog 書いてしまえば魔改造も可能らしい
- 旧版: https://github.com/openfaas/faas/tree/master/watchdog
- 次世代版: https://github.com/openfaas-incubator/of-watchdog
Author And Source
この問題について(Vagrant で ローカル環境を汚さずにサクッと Open-FaaS を試す), 我々は、より多くの情報をここで見つけました https://qiita.com/ryskiwt/items/908e247942571c2af4ca著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .