Project

General

Profile

Openstack Installation TTNN » History » Version 4

« Previous - Version 4/251 (diff) - Next » - Current version
Mehdi Abaakouk, 08/06/2014 10:18 AM


Openstack Installation TTNN

Pending upstream fixes:

Installation

Le setup installé est composé de :

  • 3 hyperviseurs (compute node) qui contiendront 1 ceph-mon, N ceph-osd, nova-compute (qui lance les VM), neutron-openvswitch-agent (qui configure le réseau des vms)
  • 1 VM (controler node), qui contient tous les services de management d'openstack (nova, cinder, glance, neutron)
Les étapes d'installation sont les suivantes:
  • Préparation manuelle de la VM de management sur un des hyperviseurs
  • Installation de ceph et openstack sur toutes les machines avec puppet
  • Déplacement de la VM de management d'openstack dans openstack.

Preparation de la VM de management, le controlleur

Installation des prérequis

$ apt-get install libvirt-bin openstack-debian-images openvswitch-switch openvswitch-datapath-dkms virtinst
#NOTE(sileht): temporairement appliquer les patches de au-dessus à openstack-debian-images 

Preparation de l'image de la VM

$ cat > hook.sh <<GEOF
cp mgmt-rc.local \$BODI_CHROOT_PATH/etc/rc.local
mkdir -p \$BODI_CHROOT_PATH/root/.ssh
chmod 600 \$BODI_CHROOT_PATH/root/.ssh
cat >> \$BODI_CHROOT_PATH/root/.ssh/authorized_keys <<EOF
ssh-dss AAAAB3NzaC1kc3MAAACBAJtnGLvuz4uVD6fnERDxDi/C0UyzwCiKmgNtEessopREYasAX4Gu6Fg10jAyIL5Nuc7YDnqj//pOfxNjD7hp99a2ZmkRQgh/ltClxYML9fqhBHgsUCpVse9nOYDHDnDgvXIPRSDUHat2UFpdchHVrFURNLIlZnBztsr+GCDURTV/AAAAFQD9SrBcH49ltaKOm6V5ssCPmgs1SwAAAIAbAvkQ3/tMzzdACO5B9s5Yb3ZuM7XImm0iqufivVf2Xy39g8HOBulUsN7eKEGPhVriqNolgIO7q7tVgYAff4/NE4yDP0Kp0SPg4tjt2yFJuL31Y3wzwHjnKrjgNlDSLl3uZnRXSipwUMwGKbdHB6NZSqlq192VKbHilQ00pbiMlAAAAIB5dfB1lVHkJ0o5CcaVQRPbca9DvbbRwnoTSmKHc5DUcqsPqDhS07CkM9ZcJuY1Nh4wGl4Q9kArj7Tnsvvygf/HReSUcIk4+nbDytJ8/pca/Qx4fzQQyppa94TylN62LSFT6MIJKLoMwYa0dQURT7Mv5+9Qj2vk5pZ38w2iQ9zVCg== root@h1
EOF
GEOF
$ chmod +x hook.sh

$ cat > mgmt-rc.local <<EOF
#!/bin/sh

for i in /proc/sys/net/ipv6/conf/*; do for j in autoconf accept_ra; do echo 0 > \$i/\$j; done;done
# https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
for i in /proc/sys/net/ipv4/conf/*/arp_announce; do echo 2 > \$i;done

ip link set eth0 up
ip addr add 89.234.156.249/32 dev eth0
ip route add 89.234.156.251/32 dev eth0
ip route add default via 89.234.156.251
EOF

$ build-openstack-debian-image --image-size 20  --release jessie -u http://apt.tetaneutral.net/debian/ -s http://apt.tetaneutral.net/debian/ --extra-packages puppet --hook-script $(pwd)/hook.sh
$ mv debian-jessie-7.0.0-3-amd64.raw /openstack.raw 
$ rm debian-jessie-7.0.0-3-amd64.qcow2

On garde l'image raw qui sera importable dans ceph plus tard.

Préparation du réseau

$ ovs-vsctl add-br br-net
$ ip link set br-net up
$ ovs-vsctl br-set-external-id br-net bridge-id br-net
$ ip route 89.234.156.249/32 dev br-net proto 42
  • Installation de la VM
$ virt-install --name openstack --ram 2048 --network bridge=br-net --nographics --serial pty --wait -1 --noreboot --autostart --disk /openstack.raw,bus=virtio,cache=none,io=native --import
$ EDITOR="sed -i -e \"s,<source bridge='br-net'/>,<source bridge='br-net'/><virtualport type='openvswitch' />,g\"" virsh edit openstack  # Openvswitch is not yet supported by virt-install
$ virsh  start openstack

Management d'openstack

Build and upload debian image:

$ apt-get install openstack-debian-images
#NOTE(sileht): temporairement appliquer les patches de au-dessus
$ build-openstack-debian-image -m -r jessie  -u http://apt.tetaneutral.net/debian/ -s http://apt.tetaneutral.net/debian/
$ glance image-create --file debian-jessie-7.0.0-3-amd64.raw --is-public True --human-readable --progress --disk-format raw --container-format bare --name debian-jessie-amd64