您的位置:首页 > 其它

flynn 开源paas 平台安装试用

2018-10-13 22:46 615 查看

flynn 是一个不错的开源paas 平台,基于git 以及容器技术,开发模型与
heroku 基本一样,同时构建方式就是基于heroku 的buildpacks

安装

官方文档提示说明是ubuntu 操作系统16 以及14 ,所以安装就试用ubuntu了

  • shell
sudo bash < <(curl -fsSL https://dl.flynn.io/install-flynn)
  • 效果

    比较漫长,等待

  • 安装的组件
Install Flynn’s runtime dependencies
Download, verify and install the flynn-host binary
Download and verify filesystem images for each of the Flynn components
Install an Upstart job for controlling the flynn-host daemon

初始化集群

测试使用单台机器

  • 初始化
sudo flynn-host init --init-discovery

  • 启动
sudo systemctl start flynn-host
sudo systemctl status flynn-host

  • bootstrap 系统
export CLUSTER_DOMAIN=demo.localflynn.com
flynn-host bootstrap  --discovery https://discovery.flynn.io/clusters/410a77eb-63c6-495c-86df-c12aeef9e7f4

备注:
需要先配置集群dns CLUSTER_DOMAIN=demo.localflynn.com


  • 检查

因为使用了flannel 确保有flanel 以及flunnbr0 的网络接口,如下:

使用(官方简单demo)

  • 添加集群

    具体参考自己的实际地址

flynn cluster add -p wshSAUMXH/TWU0WmmivA1IWlo+wLFtxY9IBArpwopW0= default demo.localflynn.com d0e2cd73215044088745f68da8a6c165

备注:
可能需要添加本地host
nodeip demo.localflynn.com
nodeip  controller.demo.localflynn.com
nodeip git.demo.localflynn.com
  • clone 代码
git clone https://github.com/flynn-examples/go-flynn-example
  • 创建app
cd go-flynn-example
flynn create example

  • git remote
git remote -v

  • apps

  • route

  • 添加pg 依赖
flynn resource add postgres

  • 查看环境变量
flynn env
  • git push (git push 会触发构建以及部署)
git push flynn master


  • 访问
curl -i example.demo.localflynn.com

说明

flynn 的部署以及使用还是比较简单的,和heroku 很相近,基本就是开源版本的heroku

dashboard 界面

需要配置可信列表

  • 界面



  • 登陆token
    flynn -a dashboard env get LOGIN_TOKEN

参考资料

https://flynn.io/docs/installation/manual
https://github.com/flynn/flynn
https://flynn.io/docs/basics

       
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: