Skip to content

Commit

Permalink
Merging bunchc pull request OpenStackCookbook#43
Browse files Browse the repository at this point in the history
  • Loading branch information
uksysadmin committed Feb 11, 2015
1 parent 41d611b commit d97eb71
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ then
# CookbookHosts
192.168.100.200 controller.book controller
192.168.100.201 network.book network
192.168.100.202 compute.book compute
192.168.100.203 compute2.book compute2
192.168.100.202 compute-01.book compute-01
192.168.100.203 compute-02.book compute-02
192.168.100.210 swift.book swift
192.168.100.212 swift2.book swift2
192.168.100.211 cinder.book cinder" | sudo tee -a /etc/hosts
Expand Down
21 changes: 16 additions & 5 deletions compute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ cp /vagrant/id_rsa* ~/.ssh/

sudo scp root@controller:/etc/ssl/certs/ca.pem /etc/ssl/certs/ca.pem
sudo c_rehash /etc/ssl/certs/ca.pem
nova_compute_install() {

nova_compute_install() {
# Install some packages:
sudo apt-get -y install ntp nova-api-metadata nova-compute nova-compute-qemu nova-doc novnc nova-novncproxy
# install L3-Agent if using DVR
#sudo apt-get -y install neutron-common neutron-plugin-ml2 neutron-plugin-openvswitch-agent neutron-l3-agent
sudo apt-get -y install neutron-common neutron-plugin-ml2 neutron-plugin-openvswitch-agent neutron-metadata-agent
sudo apt-get -y install ntp nova-api-metadata nova-compute nova-compute-qemu nova-doc novnc nova-novncproxy nova-consoleauth sasl2-bin
sudo apt-get -y install neutron-common neutron-plugin-ml2 neutron-plugin-openvswitch-agent
# [DVR] # sudo apt-get -y install neutron-l3-agent
sudo apt-get -y install vlan bridge-utils
sudo apt-get -y install libvirt-bin pm-utils sysfsutils
sudo service ntp restart
Expand All @@ -65,13 +64,17 @@ unix_sock_rw_perms = "0770"
unix_sock_dir = "/var/run/libvirt"
auth_unix_ro = "none"
auth_unix_rw = "none"
auth_tcp = "none"
EOF

# configure libvirtd.conf
cat > /etc/libvirt/libvirt.conf << EOF
uri_default = "qemu:///system"
EOF

# configure libvirt-bin.conf
sudo sed -i 's/libvirtd_opts="-d"/libvirtd_opts="-d -l"/g' /etc/default/libvirt-bin

# restart libvirt
sudo service libvirt-bin restart

Expand Down Expand Up @@ -172,6 +175,7 @@ connection = mysql://neutron:${MYSQL_NEUTRON_PASS}@${CONTROLLER_HOST}/neutron
[service_providers]
#service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
#service_provider=FIREWALL:Iptables:neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver:defaul
#service_provider=VPN:openswan:neutron.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default
EOF
Expand Down Expand Up @@ -389,6 +393,13 @@ sleep 30; echo "[+] Restarting nova-* on compute"
nova_restart
start neutron-l3-agent

# Because live-migration
# Do some terrible things for GID/UID mapping on compute nodes:
UID=`ssh root@controller "id nova | awk {'print $1'} | cut -d '=' -f2 | cut -d '(' -f1"`
GID=`ssh root@controller "id nova | awk {'print $1'} | cut -d '=' -f2 | cut -d '(' -f1"`
sudo usermod -u $UID nova
sudo groupmod -g $GID nova

# Logging
sudo stop rsyslog
sudo cp /vagrant/rsyslog.conf /etc/rsyslog.conf
Expand Down
2 changes: 1 addition & 1 deletion controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ sudo service neutron-server stop
sudo service neutron-server start

######################
# Chapter 3 COMPUTE #
# Chapter 4 COMPUTE #
######################

# Create database
Expand Down

0 comments on commit d97eb71

Please sign in to comment.