Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
openstack-quickstart
openstack-quickstart-extranodesetup
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openstack-quickstart-extranodesetup of Package openstack-quickstart
#!/bin/bash -x # assumes the openstack-compute-node pattern installed pw=openstack mpw=m$pw # cloud controller's IP-address: IP=10.10.135.7 echo "Setting up OpenStack demo extra node..." # use lxc or qemu, if kvm is unavailable if rpm -q openstack-nova-compute >/dev/null && ! grep -q -e vmx -e svm /proc/cpuinfo ; then sed -i -e 's/\(--libvirt_type\).*/\1=lxc/' /etc/nova/nova.conf zypper -n install lxc modprobe nbd sed -i -e 's/\(MODULES_LOADED_ON_BOOT="\)/\1nbd\ /' /etc/sysconfig/kernel echo mount -t cgroup none /cgroup >> /etc/init.d/boot.local mount -t cgroup none /cgroup fi # activate ip-forwarding sed -i -e 's;IP_FORWARD="no";IP_FORWARD="yes";' /etc/sysconfig/sysctl sed -i -e 's;net.ipv4.ip_forward.*;net.ipv4.ip_forward = 1;' /etc/sysctl.conf echo 1 > /proc/sys/net/ipv4/ip_forward # configure bridge if [ ! -e /etc/sysconfig/network/ifcfg-br0 ] ; then echo "net.ipv4.conf.all.proxy_arp = 1" >> /etc/sysctl.conf /etc/init.d/network stop ifdown eth0 # because systemd ignores the above sed -i -e "s/\(BOOTPROTO\).*/\1='static'/" \ -e "s|^\(IPADDR\).*|\1='0.0.0.0\\/32'|" /etc/sysconfig/network/ifcfg-eth0 cat >/etc/sysconfig/network/ifcfg-br0 <<EOF BOOTPROTO='dhcp4' BRIDGE='yes' BRIDGE_FORWARDDELAY='0' BRIDGE_PORTS='eth0' BRIDGE_STP='off' BROADCAST='' ETHTOOL_OPTIONS='' IPADDR='' MTU='' NETMASK='' NETWORK='' REMOTE_IPADDR='' STARTMODE='onboot' USERCONTROL='no' EOF /etc/init.d/network start fi # configure nova sed -i -e "s;127.0.0.1;$IP;" /etc/nova/api-paste.ini /etc/glance/glance-api.conf /etc/glance/glance-registry.conf /etc/bash.openstackrc perl -i.bak -pe "s/root:<mysql-password>/nova:$mpw/; s/<IP>/$IP/g; s/(--network_manager).*/\$1=nova.network.manager.FlatDHCPManager/;" /etc/nova/nova.conf echo "--vncproxy_url=http://$IP:6080" >> /etc/nova/nova.conf echo '--flat_network_bridge=br0' >> /etc/nova/nova.conf echo "--image_service=nova.image.glance.GlanceImageService" >> /etc/nova/nova.conf echo "--glance_api_servers=$IP:9292" >> /etc/nova/nova.conf SuSEfirewall2 stop # interferes with openstack's network/firewall insserv -r SuSEfirewall2_setup insserv -r SuSEfirewall2_init /etc/init.d/boot.apparmor stop # interferes with openstack-nova-network insserv -r boot.apparmor # configure NTP, because we need synchronized time between nodes grep -q ntp.org /etc/ntp.conf || echo server pool.ntp.org >> /etc/ntp.conf # start services for s in ntp libvirtd iscsitarget open-iscsi tgtd openstack-nova-compute do i=/etc/init.d/$s if [ -x $i ] ; then insserv $s $i restart fi done grep -q bash.openstackrc /etc/bash.bashrc.local ||\ echo "export HOST_IP=$IP . /etc/bash.openstackrc setcreds admin $pw" >> /etc/bash.bashrc.local
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor