Upload
yoland
View
451
Download
13
Embed Size (px)
DESCRIPTION
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 - PowerPoint PPT Presentation
Citation preview
CloudFoundry 介绍马云锋
Cloud Cloud Foundry NG 架构 面向开发者的工具 Cloud Foundry NG API 最新进展
◦ CF CLI 6◦ Loggregator◦ V2 service broker◦ SSO
Agenda
https://github.com/cloudfoundry/bosh-lite https://github.com/nttlabs/nise_bosh
搭建单机 CloudFoundry
Org Space Domain Route BuildPack Service Application
CloudFoundry中的一些概念
Cloud Foundry NG架构
Cloud Foundry NG架构
Push App流程图
Droplet Execution Agent
HealthManager
GoRouterGo Router 是 CF 入口点为什么要 GoRouter:1. 支持应用程序的动态分配2. 负载均衡
http://hello.vcap.me/index.html
GoRouter工作机制
GoRouter工作机制
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
灰度发布1
2
34
BuildPacks Buildpack 的作用
◦编译应用程序◦设置应用程序的运行变量◦设置应用程序的启动命令
Buildpack 只有三个接口◦bin/detect◦bin/compile◦bin/release
http://docs.cloudfoundry.org/buildpacks/
bin/detect#!/usr/bin/env ruby gemfile_path = File.join ARGV[0], "Gemfile"
if File.exist?(gemfile_path) puts "Ruby" exit 0
else exit 1
end
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
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
Cloud Cloud Foundry NG 架构 面向开发者的工具 Cloud Foundry NG API 最新进展
◦ CF CLI 6◦ Loggregator◦ V2 service broker◦ SSO
Agenda
命令行工具: CF
下载地址: https://github.com/cloudfoundry/cli#installers
CF Eclipse Plugin
http://docs.cloudfoundry.org/buildpacks/java/sts.html
Maven Plugin◦ 编译,单元测试,部署,管理应用程序
Gradle Plugin 编写自己的 CI/CD 流程
◦ CC API ( REST API CALL, Java SDK etc.)◦ cf 命令
构建工具
Cloud Cloud Foundry NG 架构 面向开发者的工具 Cloud Foundry NG API 最新进展
◦CF CLI 6◦Loggregator◦V2 service broker◦SSO
Agenda
用 GoLang 重写◦ 安装容易◦ 速度快◦ 非交互时,更容易集成到 CI/CD 中
CF CLI 6
应用程序 Log 的收集和转发Loggregator
Loggregator
ETCD◦ 和 ZooKeeper 类似的配置管理
GNATS◦ 用 GoLang 重写◦ 支持 Cluster
HM9000◦ 用 GoLang 重写◦ 支持 Cluster◦ 使用 ETCD 存储信息
CloudController◦ Cloud Controller NG◦ API Worker◦ Clock Worker
新的和重写的 Component
Service Broker V2
例子: https://github.com/JimmyMa/cf-echo-service-v2
Dashboard Single Sign-On
例子: https://github.com/JimmyMa/cf-echo-service-v2
http://docs.cloudfoundry.org/services/dashboard-sso.html
为 Service 的 Dashboard 提供了一种 SSO 的方式