Last active
August 29, 2015 14:04
-
-
Save wolf20xx/83a30a72f161050fa732 to your computer and use it in GitHub Desktop.
openstack_deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This auto-script is for CentOS6.5 | |
# preparation | |
# if necessary, eth-device and ipaddres setting | |
# Generally, eth0 has to be exposed port in public network | |
# On the virtualbox environment, | |
# eth0 has static ip-address in host-only-network | |
# eth1 is the NAT-network | |
eth0addr="192.168.33.1" | |
ethfile="/etc/sysconfig/network-script/ifcfg-eth0" | |
cat << EOT1 > $ethfile 2>&1 | |
DEVICE=eth0 | |
TYPE=Ethernet | |
ONBOOT=yes | |
IPADDR=$eth0addr | |
NETMASK=255.255.255.0 | |
EOT1 | |
# hosts | |
# this may be important for installation(esp, horizon.pp execution) | |
cat << EOT2 > /etc/hosts 2>&1 | |
127.0.0.1 localhost | |
$eth0addr rdo | |
EOT2 | |
# network | |
cat << EOT3 > /etc/sysconfig/network 2>&1 | |
NETWORKING=yes | |
HOSTNAME=rdo | |
EOT3 | |
# dns | |
echo "nameserver 8.8.8.8" > /etc/resolv.conf | |
# if necessary, set proxy | |
#export http_proxy=http://<proxy_host>:<proxy_port>/ | |
#export https_proxy=$http_proxy | |
#export ftp_proxy=$http_proxy | |
#export no_proxy=localhost,127.0.0.1,192.168.0.xxx | |
# ntp | |
yum install -y ntp | |
echo "server ntp.nict.jp prefer iburst" >> /etc/ntp.conf | |
chkconfig ntpd on | |
echo "ntp.nict.jp" >> /etc/ntp/step-tickers | |
service ntpd start | |
# disable SELINUX | |
sed -i "s/SELINUX=.*/SELINUX=permissive/" /etc/selinux/config | |
setenforce 0 | |
# kernel parameter and set iptables | |
sed -i -e "s/^net.bridge.bridge-nf-call-ip6tables = 0/net.bridge.bridge-nf-call-ip6tables = 1/" /etc/sysctl.conf | |
sed -i -e "s/^net.bridge.bridge-nf-call-iptables = 0/net.bridge.bridge-nf-call-iptables = 1/" /etc/sysctl.conf | |
sed -i -e "s/^net.bridge.bridge-nf-call-arptables = 0/net.bridge.bridge-nf-call-arptables = 1/" /etc/sysctl.conf | |
# yum | |
yum update -y | |
yum install -y http://rdo.fedorapeople.org/rdo-release.rpm | |
yum install -y openstack-packstack | |
# packstack | |
# generate setting file: answer.txt | |
packstack --gen-answer-file answer.txt | |
# add component | |
sed -i -e "s/^CONFIG_HEAT_INSTALL=n/CONFIG_HEAT_INSTALL=y/" answer.txt | |
sed -i -e "s/^CONFIG_HEAT_CLOUDWATCH_INSTALL=n/CONFIG_HEAT_CLOUDWATCH_INSTALL=y/" answer.txt | |
sed -i -e "s/^CONFIG_HEAT_CFN_INSTALL=n/CONFIG_HEAT_CFN_INSTALL=y/" answer.txt | |
# User/Pass parameters | |
sed -i -e "s/^CONFIG_KEYSTONE_ADMIN_PW=.*/CONFIG_KEYSTONE_ADMIN_PW=xxxxxxxx/" answer.txt | |
sed -i -e "s/^CONFIG_KEYSTONE_DEMO_PW=.*/CONFIG_KEYSTONE_DEMO_PW=yyyyyyyy/" answer.txt | |
# if necessary,change volume | |
#sed -i -e "s/^CONFIG_CINDER_VOLUMES_SIZE=20G/CONFIG_CINDER_VOLUMES_SIZE=xxG/" answer.txt | |
# token | |
sed -i -e "s/^CONFIG_KEYSTONE_TOKEN_FORMAT=PKI/CONFIG_KEYSTONE_TOKEN_FORMAT=UUID/" answer.txt | |
# virtualbox | |
#sed -i -e "s/10.0.3.15/${eth0addr}/" answer.txt | |
# execute packastack | |
packstack --answer-file answer.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment