1 / 29

CloudFoundry 介绍

CloudFoundry 介绍. 马云锋. Agenda. Cloud Cloud Foundry NG 架构 面向开发者的工具 Cloud Foundry NG API 最新进展 CF CLI 6 Loggregator V2 service broker SSO. 搭建单机 CloudFoundry. https://github.com/cloudfoundry/bosh-lite https://github.com/nttlabs/nise_bosh. CloudFoundry 中的一些概念. Org Space Domain Route

yoland
Download Presentation

CloudFoundry 介绍

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CloudFoundry介绍 马云锋

  2. Agenda • Cloud • Cloud Foundry NG架构 • 面向开发者的工具 • Cloud Foundry NG API • 最新进展 • CF CLI 6 • Loggregator • V2 service broker • SSO

  3. 搭建单机CloudFoundry • https://github.com/cloudfoundry/bosh-lite • https://github.com/nttlabs/nise_bosh

  4. CloudFoundry中的一些概念 • Org • Space • Domain • Route • BuildPack • Service • Application

  5. Cloud Foundry NG架构

  6. Cloud Foundry NG架构

  7. Push App流程图

  8. Droplet Execution Agent

  9. HealthManager

  10. GoRouter • Go Router 是CF入口点 • 为什么要GoRouter: • 支持应用程序的动态分配 • 负载均衡 http://hello.vcap.me/index.html

  11. GoRouter工作机制

  12. GoRouter工作机制

  13. GoRouter工作机制 • DEA 注册应用程序的信息到GoRouter,并且DEA周期性的发送应用程序的信息 • HTTP 协议 hello.vcap.me 10.0.0.8:61001 ,  10.0.0.18:61005 • GET /index.html HTTP/1.1 • Host:hello.vcap.me GoRouter使用Host信息,来找到注册的应用对应的DEA,并且把请求转发给给DEA

  14. 灰度发布 2 1 3 4

  15. BuildPacks Buildpack的作用 编译应用程序 设置应用程序的运行变量 设置应用程序的启动命令 Buildpack只有三个接口 bin/detect bin/compile bin/release http://docs.cloudfoundry.org/buildpacks/

  16. bin/detect #!/usr/bin/env ruby gemfile_path = File.joinARGV[0], "Gemfile" if File.exist?(gemfile_path) puts"Ruby" exit0 else exit1 end

  17. bin/compile #!/usr/bin/env ruby #sync output $stdout.sync = true build_path = ARGV[0] cache_path = ARGV[1] install_ruby private def install_ruby puts"Installing Ruby" # !!! build tasks go here !!! # download ruby to cache_path # install ruby end

  18. bin/release #!/usr/bin/env ruby #sync output $stdout.sync = true build_path = ARGV[0] cache_path = ARGV[1] #invoke a Ruby program here #the Ruby program returns: { "config_vars" => { "RACK_ENV" => "production" }, "default_process_types" => { "web" => "bundle exec rackup config.ru -p $PORT" } }.to_yaml

  19. Agenda • Cloud • Cloud Foundry NG架构 • 面向开发者的工具 • Cloud Foundry NG API • 最新进展 • CF CLI 6 • Loggregator • V2 service broker • SSO

  20. 命令行工具:CF 下载地址:https://github.com/cloudfoundry/cli#installers

  21. CF Eclipse Plugin http://docs.cloudfoundry.org/buildpacks/java/sts.html

  22. 构建工具 • Maven Plugin • 编译,单元测试,部署,管理应用程序 • GradlePlugin • 编写自己的CI/CD流程 • CC API ( REST API CALL, Java SDK etc.) • cf命令

  23. Agenda • Cloud • Cloud Foundry NG架构 • 面向开发者的工具 • Cloud Foundry NG API • 最新进展 • CF CLI 6 • Loggregator • V2 service broker • SSO

  24. CF CLI 6 • 用GoLang重写 • 安装容易 • 速度快 • 非交互时,更容易集成到CI/CD中

  25. Loggregator • 应用程序Log的收集和转发

  26. Loggregator

  27. 新的和重写的Component • ETCD • 和ZooKeeper类似的配置管理 • GNATS • 用GoLang重写 • 支持Cluster • HM9000 • 用GoLang重写 • 支持Cluster • 使用ETCD存储信息 • CloudController • Cloud Controller NG • API Worker • Clock Worker

  28. Service Broker V2 例子:https://github.com/JimmyMa/cf-echo-service-v2

  29. Dashboard Single Sign-On http://docs.cloudfoundry.org/services/dashboard-sso.html 为Service的Dashboard提供了一种 SSO的方式 例子:https://github.com/JimmyMa/cf-echo-service-v2

More Related