I ran into some quirks when trying to get DevStack to run out-of-the-box on CentOS 6.3. Even though it’s supported, there were a few additional steps that were needed which were not performed by stack.sh. I’m not contributing these back because I don’t know to what extent they are “bugs”.
The following steps were performed on a clean minimal install of CentOS 6.3. I highly recommend not running DevStack on any production systems or any other shared systems.
# Install some prereqs / utilities yum -y install mlocate vim openssl-devel euca2ools telnet Django14 # EPEL is required for all the additional packages required by OpenStack rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6 yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # If you can't find a python-pip package the below can be used instead #easy_install pip #ln -s /usr/bin/pip /usr/bin/pip-python # Horizon requires older version of Kombu. Not sure how old, but 1.0.4 seems to do the trick # 'RabbitStrategy' object has no attribute 'connection_errors' pip install kombu==1.0.4 # Clear out any IP table rules iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT service iptables save # Enable SSH keys on the server for easy remote access sed -i -r 's/^#(AllowAgentForwarding)/\1/g' /etc/ssh/sshd_config # Apply the above configuration change service sshd restart # Fix SSH SE-Linux permissions restorecon -R -v /root/.ssh # Make default policy permissive setenforce permissive sed -i 's/SELINUX=.*/SELINUX=permissive/' /etc/selinux/config # Setup DevStack cd /opt git clone https://github.com/openstack-dev/devstack.git cd devstack # ImproperlyConfigured: Error importing middleware horizon.middleware: "cannot import name SafeExceptionReporterFilter" perl -p -i -e 's/^Django$/Django14/' files/rpms/horizon # pip install version 1.0.4 instead perl -p -i -e 's/^(python-kombu)/#$1/' files/rpms/* # Write a default localrc configuration cat<<__EOF__>localrc FLOATING_RANGE=192.168.1.0/24 FIXED_RANGE=192.168.2.0/24 FIXED_NETWORK_SIZE=256 FLAT_INTERFACE=eth0 ADMIN_PASSWORD=openadmin MYSQL_PASSWORD=openmysql RABBIT_PASSWORD=openrabbit SERVICE_PASSWORD=openservice SERVICE_TOKEN=$(uuidgen) __EOF__ # Start the installation rm -f nohup.out; FORCE_PREREQ=true ./stack.sh | tee nohup.out # Fix for "Permission denied" apache error chmod 755 /opt/stack/
Once the above completes, you’ll have your new devstack running out of
/opt/stack. To reconnect to the screen session controlling the stack, run:
screen -x stack
**WARNING*** If you ever re-run the
stack.sh script, you will lose all state and rebuild a fresh stack.
To destroy the stack, run:
su – stack -c /opt/devstack/unstack.sh
To resume a stack that has been “unstacked”, run the following command:
su - stack -c /opt/devstack/rejoin-stack.sh # In my experience, it does not start apache automatically service https start
To completely start from scratch, this is what I ran:
WARNING: this blows aways your MySQL & RabbitMQ installations!
su - stack -c /opt/devstack/unstack.sh ./clean.sh find / -name rabbitmq -type d | xargs rm -rf yum -y remove mysql-server rm -rf /var/lib/mysql/ rm -f /opt/stack/devstack/.prereqs
You might also want to test out some more images. Fortunately, RackSpace provides some that you can use.
RackSpace OpenStack Images: https://github.com/rackerjoe/oz-image-build
Here is how you can load them into DevStack (note the URLs are subject to change):
# Load the admin credentials . /opt/stack/devstack/accrc/admin/admin # Download & load images wget http://c250663.r63.cf1.rackcdn.com/centos60_x86_64.qcow2 glance image-create --name centos60_x86_64 --disk-format=raw --container-format=bare --file /opt/centos60_x86_64.qcow2 wget http://c250663.r63.cf1.rackcdn.com/ubuntu-precise_x86_64_60G.qcow2 glance image-create --name ubuntu-precise_x86_64_60G --disk-format=raw --container-format=bare --file /opt/ubuntu-precise_x86_64_60G.qcow2