Deploying Cloud Foundry on OpenStack using BOSH
来源:互联网 发布:百度软件手机助手 编辑:程序博客网 时间:2024/05/16 14:09
Note: Run all the commands in this topic from the~/deployments
directory that you created in the Deploying MicroBOSH on OpenStack topic.
先决条件
To deploy Cloud Foundry to OpenStack, you must first complete the followingsteps:
- Install the BOSH Command Line Interface (CLI).
Confirm that your OpenStack instance includes four flavors that correspondwith the OpenStack default flavor names
m1.small
,m1.medium
,m1.large
, andm1.xlarge
.These flavors must have the following listed specifications, at minimum:OpenStack Flavor Name CPUs RAM (GB) Disk (GB) Ephemeral Disk (GB) m1.small121020m1.medium241040m1.large481080m1.xlarge81610160Validate your OpenStack Instance.
Provision an IP address and set your DNS to map
*
records to this IPaddress.For example, if you usemycloud.com
domain as the base domain foryour Cloud Foundry deployment, set a*
A record for this zone mapping tothe IP address that you provision.Create an OpenStack security group named
cf
.Configure thecf
security group as follows:- Open all ports of the VMs in the
cf
security group to all other VMs inthecf
security group. This allows the VMs in thecf
security groupto communicate with each other. - Open port 22 for administrator SSH access.
- Open port 80 for HTTP traffic.
- Open all ports of the VMs in the
Target the BOSH Director
Use the bosh target
command with the IP address of the BOSH Director toconnect to the BOSH Director.Log in with the default user name and password,admin
and admin
, or use theuser name and password that you set when you installed BOSH.
$ bosh target https://192.168.109.81:25555Target set to `bosh'Your username: adminEnter password: *****Logged in as 'admin'
Record the BOSH Director UUID
Use the bosh status
command to view information about your BOSH deployment.Record the UUID of the BOSH Director. You use the UUID whenCustomizing the Cloud Foundry Deployment Manifest Stub for OpenStack.
$ bosh statusConfig /home/me/.bosh_configDirector Name bosh_openstack URL https://192.168.109.81:25555 Version 1.2710.0 (00000000) User admin UUID abcdef12-3456-7890-abcd-ef1234567890 CPI openstack dns enabled (domain_name: bosh) compiled_package_cache disabled snapshots disabledDeployment not set
Upload a Stemcell
Open https://bosh.io/stemcells in a web browserto view a list of publicly available BOSH stemcells.The list displays the most recent build numbers of BOSH stemcells, organized by operating system, target IaaS, and hypervisor.
Choose a BOSH stemcell for OpenStack and click the build number to download.
In a terminal window, run
bosh upload stemcell STEMCELL-NAME
to upload thestemcell to the BOSH Director.$ bosh upload stemcell ./bosh-stemcell-2754-openstack-kvm-ubuntu-trusty-go_agent.tgz
Create a Deployment Manifest Stub
Create a manifest stub file named cf-stub.yml
.Customize the manifest stub for your environment.
Deploy Cloud Foundry
Clone the
cf-release
GitHub repository.$ git clone https://github.com/cloudfoundry/cf-release.git
Use the
update
helper script to update thecf-release
submodules.$ cd cf-release$ ./update
Install spiff.
Run the following spiff command from the
cf-release
directory to create a deployment manifest namedcf-deployment.yml
:generate_deployment_manifest INFRASTRUCTURE MANIFEST-STUB > cf-deployment.yml
Replace INFRASTRUCTURE with
openstack
and replace MANIFEST-STUB with the name and location of yourcf-stub.yml file
. For example:$ ./generate_deployment_manifest openstack cf-stub.yml > cf-deployment.yml
Note:
generate_deployment_manifest
can accept a list of stub files. For example:generate_deployment_manifest openstack cf-stub.yml cf-consul.yml > cf-dm.yml
Note: The
cf-deployment.yml
uses the default OpenStack flavor names ofm1.small
,m1.medium
,m1.large
, andm1.xlarge
. If your OpenStack instance uses alternate names for these flavors, change the default flavor names incf-deployment.yml
to match the alternate names that your instance uses.Use
bosh target
to target the BOSH Director.$ bosh targetCurrent target is https://192.168.109.81:25555
Set your deployment to the generated manifest.
$ bosh deployment cf-deployment.yml
Use
bosh create release
to create a Cloud Foundry release.This command prompts you for a development release name.$ bosh create release
Use
bosh upload release
to upload the generated release to the BOSHDirector.$ bosh upload release
Deploy the uploaded Cloud Foundry release.
$ bosh deploy
Note:
bosh deploy
can take 2-3 hours to complete.Use
curl
to test the API endpoint of your Cloud Foundry installation.$ curl api.subdomain.domain/info
If
curl
succeeds, it should return the JSON-formatted information.Ifcurl
does not succeeds, check your networking and make sure your domainhas an NS record for your subdomain.You should be able to target your Cloud Foundry installation with the cf Command Line Interface (CLI) and log in as anadministrator.
The user name,
admin
and the password,fakepassword
, are specified inthe deployment manifest underuaa:scim:users.For more information about managing organizations, spaces, users, andapplications, refer to thecf CLI topic.
Update Cloud Foundry
If you make change to your manifest, run
bosh deploy
to update your CloudFoundry deployment with these changes.If you make changes to the
cf-release
directory, runbosh create release && bosh upload release && bosh deploy
to update your Cloud Foundry deployment with these changes.
Verify the Deployment
- Run
bosh vms
. This command provides an overview of the virtual machines that BOSH manages as part of the current deployment. The state of every VM should show asrunning.
$ bosh vms +-----------------------------+---------+------------------+---------------+ | Job/index | State | Resource Pool | IPs | +-----------------------------+---------+------------------+---------------+ | nfs_server/0 | running | nfs_server | 10.146.21.174 | | ccdb/0 | running | ccdb | 10.146.21.175 | | cloud_controller/0 | running | cloud_controller | 10.146.21.176 | | collector/0 | running | collector | 10.146.21.178 | | health_manager/0 | running | health_manager | 10.146.21.173 | | nats/0 | running | nats | 10.146.21.172 | | router/0 | running | router | 10.146.21.171 | | syslog/0 | running | syslog | 10.146.21.177 | | uaa/0 | running | uaa | 10.146.21.180 | | uaadb/0 | running | uaadb | 10.146.21.179 | | dea/0 | running | dea | 10.146.21.181 | | saml_login/0 | running | saml_login | 10.146.21.181 | +-----------------------------+---------+------------------+---------------+
- Deploying Cloud Foundry on OpenStack using BOSH
- Deploy Cloud Foundry on vSphere using BOSH
- Cloud Foundry BOSH 简介
- 在vSphere上通过BOSH工具大规模部署Cloud Foundry(3) -- 部署Cloud Foundry
- JasperReports Server on Cloud Foundry
- 在vSphere上通过BOSH工具大规模部署Cloud Foundry(2) - 安装BOSH
- Monitoring Cloud Foundry On System Level
- Cloud Foundry参赛博文——用BOSH部署CloudFoundry实战
- 在vSphere上通过BOSH工具大规模部署Cloud Foundry (1) - IaaS准备
- 使用bosh-lite在ubuntu环境下,在vagrant上搭建cloud foundry
- 在centos7/ubuntu15.04 上通过bosh-lite 搭建单机环境Cloud Foundry
- Cloud Foundry
- Cloud Foundry
- Using OpenStack On FutureGrid
- cloud foundry hello world
- 深入Cloud Foundry
- Cloud Foundry 杂七杂八
- 深入Cloud Foundry [转]
- springmvc导入Excel例子
- Android Studio App设置线性布局LinerLayout控件占屏幕长宽比例
- 判断版本号
- Dynamics CRM 2011编程系列(1):系统实体状态更新
- exfat文件系统(七)------exfat_core.c详解(一)------CLUSTER HEAP(BMAP_DENTRY_T以及相关)
- Deploying Cloud Foundry on OpenStack using BOSH
- 整车控制器VCU
- 反转单链表
- [leetcode] 92.Reverse Linked List II
- Using NSURLConnection 使用NSURLConnection 官方文档翻译(二)
- echarts按开始日期和结束时间做报表
- 内核临时页表建立
- 经典算法之0-1背包问题
- Spinner与适配器Adapter使用总结