前置操作
1.需要ceilometer監(jiān)控服務(wù)以及alarm監(jiān)控服務(wù)
2.可以將計(jì)算節(jié)點(diǎn)改造為http文件服務(wù)器,yum -y install httpd
特別注意裝的是Apache2.4版本,默認(rèn)沒有文件列表,修改/etc/httpd/conf.d/welcome.conf
<LocationMatch "^/+$">
Options +Indexes 修改這行
ErrorDocument 403 /.noindex.html
</LocationMatch>
3.scp /etc/xiandian/* 192.168.100.20:/var/www/html/
4.虛擬機(jī)環(huán)境控制節(jié)點(diǎn)和云主機(jī)無法通信
vi /etc/sysconfig/network-scripts/ifcfg-be-ex
DEVICE=br-ex
DEVICETYPE=OVS
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.200.10
NETMASK=255.255.255.0
修改計(jì)算節(jié)點(diǎn)注釋部分lb-server.yaml
vi /var/www/html/lb-server.yaml
heat_template_version: 2014-10-16
description: A load-balancer server
parameters:
pool_id:
type: string
description: LBaas Pool to join
flavor:
type: string
default: m1.small
image:
type: string
default: CentOS7.0 //以glance上傳的鏡像名字為準(zhǔn)
description: Images
network_name:
type: string
default: int //內(nèi)網(wǎng)名稱
description: Int Network
server_name:
type: string
default: web_server
description: Server Name
ftp_yum_url:
type: string
description: Yum Url
resources:
server:
type: OS::Nova::Server
properties:
name: {get_param: server_name}
flavor: {get_param: flavor}
image: {get_param: image}
networks:
- network: {get_param: network_name}
user_data_format: RAW
user_data:
str_replace:
params:
ftp_yum_url: { get_param: ftp_yum_url}
template: |
#!/bin/bash
mkdir -p /opt/repo
mv /etc/yum.repos.d/* /opt/repo
cat > /etc/yum.repos.d/yum.repo <<-EOF
[centos7]
name=centos7
gpgcheck=0
baseurl=ftp_yum_url
enabled=1
EOF
setenforce 0
yum clean all
yum install httpd -y
systemctl restart httpd
systemctl enable httpd
member:
type: OS::Neutron::PoolMember
properties:
pool_id: {get_param: pool_id}
address: {get_attr: [server, first_address]}
protocol_port: 80
創(chuàng)建棧
棧-創(chuàng)建棧下一步
創(chuàng)建即可