前提
BOSH(microbosh)部署成功
cf部署成功
准备
BOSH部署需要的三个文件:stemcell,release包,deploy-manifest
生成release包
a. 从源码生成
https://github.com/cloudfoundry/cf-mysql-release
生成,但是由于网络问题,会比较慢。
b. 下载release包
下载地址:https://github.com/cloudfoundry-community/community-shared-boshreleases
上传stemcell
文档里有提到用到的stemcell的版本,如:v11版需要2671版本的stemcell:https://github.com/cloudfoundry/cf-mysql-release/tree/v11#upload_stemcell
http://boshartifacts.cfapps.io/file_collections?type=stemcells
上传:
bosh upload stemcell bosh-stemcell-2671-openstack-kvm-ubuntu-trusty-go_agent.tgz
生成manifest
由于stub没有openstack的,只有先生成aws的然后改成openstack的,区别很小。
./generate_deployment_manifest aws templates/sample_stubs
/cf-mysql-aws-stub.yml > cf-mysql-aws.yml
执行该脚本,需要先安装spiff:https://github.com/cloudfoundry-incubator/spiff
修改生成的模板文件的值
特别需要注意的是:
数据库需要的持久化云硬盘 persistent_disk最小为3G
例子:
compilation: cloud_properties: instance_type: m1.medium # 编译虚机规格 network: services1 # 创建的网络,下面有servies1的定义 reuse_compilation_vms: true # 重用虚机编译 workers: 1 director_uuid: 8ba3b08e-1d07-41ac-a9d9-af89a535c58e # bosh director的uuid,用bosh status可以查询到 jobs: - instances: 2 # 启动的实例个数 name: mysql networks: - name: services1 static_ips: # 部署虚机的ip - 10.60.28.151 - 10.60.28.152 persistent_disk: 4096 # 挂载的云硬盘,最少为3G properties: # 配置 admin_password: "123456" # root密码 cluster_ips: - 10.60.28.151 - 10.60.28.152 haproxy_ips: # 网关 - 10.60.28.153 haproxy_mysql_user: haproxy_check max_connections: 1500 network_name: services1 seeded_databases: null syslog_aggregator: null release: cf-mysql resource_pool: services-small # 部署虚机的资源池,下面有定义 template: mysql - instances: 1 name: haproxy networks: - name: services1 static_ips: - 10.60.28.153 default: [dns, gateway] # 默认的网关 - name: floating static_ips: - 172.16.40.230 # 外部网络的浮动ip properties: external_domain: cf-demo.io haproxy_mysql_user: haproxy_check haproxy_stats_password: "123456" #A_PASSWORD_YOU_MAKE_UP mysql_node: ip: 10.60.28.151 nats: # cf nats配置 machines: - 10.60.28.114 password: "123456" #NATS_PASSWORD_FROM_CF_RELEASE port: 4223 user: nats network_name: services1 syslog_aggregator: null release: cf-mysql resource_pool: services-small template: haproxy - instances: 1 name: cf-mysql-broker networks: - name: services1 static_ips: - 10.60.28.154 properties: auth_password: "123456" #A_PASSWORD_YOU_MAKE_UP auth_username: "tester" #A_USERNAME_YOU_MAKE_UP cc_api_uri: "http://api.cf-demo.io" #YOUR_CF_API_URI cookie_secret: "123456" #A_PASSWORD_YOU_MAKE_UP external_host: p-mysql.cf-demo.io #YOUR_CF_DOMAIN max_user_connections_default: 40 mysql_node: admin_password: "123456" #A_PASSWORD_YOU_MAKE_UP host: 10.60.28.151 persistent_disk: 4096 nats: machines: - 10.60.28.114 password: "123456" #NATS_PASSWORD_FROM_CF_RELEASE port: 4223 user: nats network_name: services1 networks: broker_network: services1 services: - dashboard_client: id: p-mysql secret: "123456" #A_PASSWORD_YOU_MAKE_UP description: A MySQL service for application development and testing id: 44b26033-1f54-4087-b7bc-da9652c2a539 metadata: displayName: MySQL for Pivotal CF documentationUrl: http://docs.gopivotal.com/ imageUrl: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABoxJREFUeNrkW01sG0UUnkQ90FNNOfVHilvKBQS2iASHVtiCHkAqxI3ECZG4KOJGnOZQxCVxeuHnEJz0BlVjF3FCyg9UooeKOogeqBTkOEov/DlS056a2hfCASm8b3izXY/XZr07Xq/hSSs7jr2775v3vu+92Zm+vb098X+2fR2/wAeZCL0k6YjzEeHXA9pXa3SU+H2R35f++nCu0sn76+tEBJDTcDDNjsd8nm6LjmU68gRGKdQAkONwesKA063AyDEY1dAAwI5n6RgIKHVrDETOLxC+ACDHEeL5AB13A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IHJkrs/qDwGe8MhnbzAJfFDRxuaIdQBCHUoTictMAAQvpgkQYWnA3CgSSpBZfC/DnSE1uUVAFtBgIAOT84dEAiqmkNEgFOac851qwYwbZgYUQBUgooE5DTIcy1zwZoU1cmunv1/tlTikRQ/IRXDwByhRYIAIBEEAKpKhOOxw0cdSa4hRbTaH2pR8l9lluwA4I9REaDJWR86/q3TdBppyCZI1SQARREim2IJxMhvVXfE1Z9u1/3/pWMn5IyzMQCw+oqqopoIwTNAtNeYVkchNE+jrKeHmn8wUAss64XQctBp4GTo9CB/hp8JNKiyekDSryMSBmvF8OgpQII+a4N8QyHEj5Br3XZeFksjY9JBXf6UiiA9pk6/6jv8nSrBfLcBQK+A/h8yia7zwfRHDaMNbkAh5QSQGwGyPxnSmyE8O+v60je7RMJJVI7V3T+szxAFPkgw17QXYGQKYZJEkOHktSU50arKZ/kkitrmrfYnZVb1ZXROzVA2DFxQFxGbZek85iHhPPL/a4oGD7NSWf2DZusD8MXpMIGg1hzIKbnNjbbnIxDZNPppVwAwCKiUwrgg0mvjE3VaSttqPiAdtlTwYalm64j7W/TKiICJ/4DzM63WD7tZKBkKafRaVznlvdsUUJEwETZpdFvvu4lgV3OCjGKhx5xPutk/4HpStIdAKLh13hUHOHACgAjrynEQXradH3jdMhPnjios64g97x3y9FyAJRIgzIUk5KNeN0753jbHy2vQRicCdnwVtX27e4SMA2ADIsnV42gvOG4cAC0iUgyGqV5CbZ/Nmd5L3NfJ3eMMRlI82jjtNk2g4+AZjHKxkxuo+7qxfV4tUXOwkqk9wW7tbwEGAJwbJQSR3aMDAAAAAElFTkSuQmCC longDescription: Provisioning a service instance creates a MySQL database. Binding applications to the instance creates unique credentials for each application to access the database. providerDisplayName: Pivotal Software supportUrl: http://gopivotal.com/support/ name: p-mysql plans: - description: Shared MySQL Server id: ab08f1bc-e6fc-4b56-a767-ee0fea6e3f20 max_storage_mb: 100 max_user_connections: 20 metadata: bullets: - Not for production use - server is not replicated - Shared MySQL server - 100 MB storage - 40 concurrent connections costs: - amount: usd: 0 unit: MONTH displayName: 100 MB Dev name: 100mb-dev - description: Shared MySQL Server id: 11d0aa36-dcec-4021-85f5-ea4d9a5c8342 max_storage_mb: 1000 max_user_connections: 40 metadata: bullets: - Not for production use - server is not replicated - Shared MySQL server - 1000 MB storage - 40 concurrent connections costs: - amount: usd: 0 unit: MONTH displayName: 1 GB Dev name: 1gb-dev tags: - mysql skip_ssl_validation: false ssl_enabled: true syslog_aggregator: null release: cf-mysql resource_pool: services-small template: cf-mysql-broker - instances: 1 lifecycle: errand # 单次运行的任务,非服务 name: broker-registrar # 注册mysql-broker到cf networks: - name: services1 static_ips: - 10.60.28.154 properties: broker: host: p-mysql.cf-demo.io #YOUR_CF_DOMAIN name: p-mysql password: "123456" #A_PASSWORD_YOU_MAKE_UP username: "tester" #A_USERNAME_YOU_MAKE_UP cf: admin_password: "admin" #YOUR_CF_ADMIN_PASSWORD admin_username: "admin" #YOUR_CF_ADMIN_USERNAME api_url: "api.cf-demo.io" #YOUR_CF_API_URI release: cf-mysql resource_pool: services-small template: broker-registrar - instances: 1 lifecycle: errand name: broker-deregistrar networks: - name: services1 static_ips: - 10.60.28.154 properties: broker: host: p-mysql.cf-demo.io # YOUR_CF_DOMAIN name: p-mysql password: "123456" #A_PASSWORD_YOU_MAKE_UP username: "tester" #A_USERNAME_YOU_MAKE_UP cf: admin_password: "admin" # YOUR_CF_ADMIN_PASSWORD admin_username: "admin" #YOUR_CF_ADMIN_USERNAME api_url: "api.cf-demo.io" #YOUR_CF_API_URI release: cf-mysql resource_pool: services-small template: broker-deregistrar #meta: # apps_domain: YOUR_APPS_DOMAIN # environment: YOUR_ENVIRONMENT_NAME # external_domain: YOUR_CF_DOMAIN # nats: # machines: # - 10.10.80.11 # password: NATS_PASSWORD_FROM_CF_RELEASE # port: 4222 # user: nats # syslog_aggregator: null name: cf-demo-mysql-test networks: # 部署用到的网络的定义 - name: services1 subnets: - cloud_properties: net_id: eb7a0287-1f62-44bf-98c0-2345c802756a # 网络id subnet: 6b2ddea5-b562-44b2-9de2-f6e6196f3dde # 子网id dns:# dns服务器 - 10.60.28.50 gateway: 10.60.28.254 # 该网络的网关 range: 10.60.28.0/24 # 该网络所有的ip reserved: # 保留的ip,bosh部署时,不会从这里分配 - 10.60.28.1 - 10.60.28.150 static: # 部署时,从这个范围分配ip - 10.60.28.151 - 10.60.28.160 type: manual - name: floating # 浮动ip定义 type: vip cloud_properties: {} properties: {} releases: - name: cf-mysql version: 11 resource_pools: # 部署用到的虚机池 - cloud_properties: instance_type: m1.small name: services-small network: services1 size: 5 stemcell: name: bosh-openstack-kvm-ubuntu version: 2427 update: canaries: 1 canary_watch_time: 30000-600000 max_in_flight: 1 update_watch_time: 30000-600000
部署
登陆BOSH
bosh target http://microbosh-host
部署
bosh deployment cf-mysql-openstack.yml
bosh deploy
部署完成后
修改所有mysql节点的my.conf
[mysqld]
lower_case_table_names=1 # 添加该行,不区分大小写
相关推荐
**Cloud Foundry** 是一款领先的开源PaaS(Platform as a Service,平台即服务)产品,旨在为企业提供一种高效的方式去构建、部署和运行应用程序。它支持多种编程语言、框架和服务,并且兼容不同的云基础设施平台。...
BOSH是一个针对大规模分布式系统的部署和生命周期管理的开源工具,其基础是“a tool of release engineering"。由其定义可以看出,虽然BOSH的诞生出自cloudfoundry的部署难题,但BOSH能做的不只是部署cloudfoundry...
服务Fabrik Bosh针对Cloud Foundry的发布一个用于部署Service Fabrik的bosh版本,该版本将服务实例配置为Docker容器和Bosh部署。第三党此BOSH版本基于/分叉于此,因此包含来自以下第三方BOSH版本的资源: : 。目录...
Redis BOSH 部署流水线 注意:这个自述文件是首先编写的,然后开发了管道,我还没有更新自述文件来反映我到目前为止实际实现的内容。 但这里是连续部署 Redis 3 次的基本管道的图片: 此存储库是从 BOSH 部署到...
1. **CPI(Cloud Provider Interface)**:CPI是BOSH与各种IaaS(Infrastructure as a Service)提供商之间的接口。它是一个可执行库,允许BOSH与不同的云环境进行通信,例如VMware vSphere、Google Compute ...
它将允许您通过bosh create-env样式部署来部署BOSH,以及将BOSH部署在另一个BOSH之上,这与在BOSH上部署大多数其他事物的方式类似。 快速开始 要使用它,您甚至不需要克隆此存储库! 只需运行以下命令(使用Genesis...
BOSH Agent是BOSH架构的关键组件,它驻留在每一个由BOSH部署的虚拟机(VM)上,负责与BOSH Director进行通信并执行指令,实现对VM的自动化管理和配置。 **1. BOSH Agent 的主要职责** - **初始化和配置**: 当BOSH...
例如,如果需要部署MySQL,Director会指示Agent完成相应的配置。 - **CLI(命令行界面)**:CLI是用户与BOSH交互的主要界面,提供了丰富的命令用于操作和管理BOSH环境。用户可以通过CLI执行各种部署、更新和监控...
用BOSH自动部署大规模 云平台Cloud Foundry: Cloud Foundry云平台简介 Cloud Foundry架构 Cloud Foundry部署模型 BOSH工作原理 用BOSH自动化部署Cloud Foundry 用BOSH实现Cloud Foundry弹性 BOSH应用实例
此存储库包含 BOSH 部署的 Jenkins,其中包含可以自动化 CloudFoundry 部署并验证其功能的作业。 还提供了 BOSH 部署的 VPN 服务器。 为了拥有功能齐全的部署,您需要: 部署为您的环境定制的 Jenkins 为 ...
在接下来的部分中,我们将首先讨论基于BOSH的flavor,Service Fabrik Broker的部署布局,然后是在Kubernetes上部署的Interoperator的体系结构。 服务Fabrik Broker部署布局 上面是Service Fabrik的组件图。 ...
如果您在 BOSH 部署中使用 consul(例如 ),或者运行 consul 服务器集群( ),则这个 BOSH CLI 插件是一个非常方便的操作工具。 安装 通过 RubyGems 安装: $ gem install bosh_cli_plugin_consul 用法 查看命令...
包括在任何现有的 BOSH 部署中以进行奖金监控! 包括 临时磁盘警报( /var/vcap/data volume) 永久性磁盘警报( /var/vcap/store volume) 用法 向您的每个 BOSH 部署添加以下内容: releases : - name : ...
构建系统工作流下图总结了构建系统的预期工作流程(一旦一切都实现了): 目前,它监视以下 BOSH 版本的变化:cf-release(cf-services-release 和 cf-services-contrib-release 后续),并从 BOS
在Cloud Foundry中,BOSH(Blockchain-based Orchestration for Software HOSts)是其核心的部署和管理工具,而CF(Cloud Foundry CLI)是用户与Cloud Foundry交互的主要命令行接口。"docs-cf-admin"这个压缩包显然...
bosh-init 部署 bosh 新的 CLI 不仅仅可以部署 Micro BOSH。 但在这个项目中,这正是我们要做的 - 使用新的bosh-init CLI 部署一个 Micro BOSH。 该项目将在运行 BOSH 的 AWS EC2 us-east-1 区域上部署单个服务器...
该文档来自于Docker Meetup深圳站,华为蒙泽超带来了题为“使用CloudFoundry 的BOSH管理Docker的集群”的演讲。
使用BOSH进行Cloud Foundry的生产环境部署 使用BOSH进行Cloud Foundry的生产环境部署
BOSH(Blockchain Operations SHell)则是一个用于管理云基础设施的工具,它使得部署、升级和监控分布式系统变得更为简单。在这个"elasticsearch-deployment"项目中,我们将探讨如何使用BOSH来部署Elasticsearch。 ...
【标题】"Using Bosh Lite" 指的是在本地环境中使用 Bosh Lite 这一工具来部署 Cloud Foundry 平台。Bosh 是一种开源的发布和管理系统,用于部署和管理分布式系统,如 PaaS 平台 Cloud Foundry。Bosh Lite 则是 Bosh...