Setting up OpenStack security rules for Continuent Tungsten

for port in 22 2112 7800 7801 7802 7803 7804 7805 10000 10001 11999 12000 9999 3306 13306
do
nova secgroup-add-rule default tcp $port $port 0.0.0.0/0
sleep 2
done

Advertisements
Setting up OpenStack security rules for Continuent Tungsten

Creating an OpenStack test image

These instructions should work to create an test OpenStack image for Cento6. I needed an minimum centos image for testing puppet modules out on.

An Ubuntu server running Devstack was used to build and test the images.

Packages needed on the Ubuntu server

sudo apt-get install vnc4server  vncviewer

Start the vnc server with the options for a larger resolution

vncserver -geometry 1600×1200 -randr 1600×1200,1440×900,1024×768 
Download the Centos 6 Minimum cd image

Create a qcow2 image to use to build the server in
kvm-img create -f qcow2 centos6-min.qcow2 10G
Boot the image
sudo kvm -m 1024 -cdrom .iso -drive file=centos6-min.qcow2,if=virtio,index=0 -boot d -net nic -net user -nographic -vnc :2
In another terminal session connect to the vnc
vncviewer :2
Install the host as usual with a custom disk layout (/ = 9120 and Swap for the rest)

Once the install is complete shutdown the host
shutdown -h now
Reboot the image without the iso attached
sudo kvm -m 1024  -drive file=centos6-min.qcow2,if=virtio,index=0 -boot d -net nic -net user -nographic -vnc :2
In another terminal session connect to the vnc
vncviewer :2

Install any updates

sudo yum -y update
At this point I also disabled iptables (service iptables stop ; checkconfig iptables off) and disabled selinux as this image if for testing.

Remove the line from the /etc/sysconfig/network-scripts/ifcfg-eth0 specifying the hardware address 

Remove /etc/udev/rules.d/70-persistent-net.rules to ensure the new network adapter gets detected a boot time

Shutdown the host again
shutdown -h now
The file centos6-min.qcow2 is ready to be loaded into glance
glance image-create –name=”centos6-min” –is-public=true –container-format=ovf –disk-format=qcow2 < centos6-min.qcow2
Creating an OpenStack test image