74
edits
Changes
→Installing OpenStack with help of packstack on Virtuozzo 7 (*Production Setup*)
{{Virtuozzo}}
<translate>
<!--T:1-->
This howto article describes steps by step installation of how to install OpenStack devstack with on [[Virtuozzo]] 7.== Introduction == Virtuozzo 7 supports OpenStack as cloud management solution since version 6. With Virtuozzo 7 we are going to add a lot of new capabilities to OpenStack integration. This guide describes two ways of installing OpenStack on Virtuozzo nodes. The first is for quick/development/POC needs. The second is for production. Please keep in mind that devstack allows you to install OpenStack for demo/POC/development purposes only. That means it will be reset after host reboot. You need the following infrastructure to setup OpenStack with Virtuozzo 7:#controller host: physical host or virtual machine with at least 4CPU, 8GB RAM, 150GB disk. This host will act as a controller and Virtuozzo containers host.#compute host: physical host or virtual machine with at least 4CPU, 8GB RAM, 150GB disk. This host will act as a virtual machines host. == Prerequisites == You need to install and update your Virtuozzo nodes first. Install Virtuozzo 7 on your controller and compute hosts as usual. You can use basic (local) or Virtuozzo Storage. Update Virtuozzo hosts $ yum update -y If you have br0 bridge configured as an IP interface, then you should move an IP address assigned to it to the physical ethernet interface bridged to br0.You can check you configuration with the following command: $ if=$(brctl show | grep '^br0' | awk ' { print $4 }') && addr=$(ip addr | grep -w 'br0' | grep inet | awk ' {print $2} ') && gw=$(ip route | grep default | awk ' { print $3 } ') && echo "My interface is '$if', gateway is '$gw', IP address '$addr'" For instance you have the following output after execution the above script: My interface is 'en33', gateway is '192.168.190.2', IP address '192.168.190.134/24'. Then edit your /etc/sysconfig/network-scripts/ifcfg-ens33 to have the following content and remove BRIDGE="br0" string from it: ... ONBOOT=yes IPADDR=192.168.190.134 GATEWAY=192.168.190.2 PREFIX=24 ... Remove /etc/sysconfig/network-scripts/ifcfg-br0 file. $ rm /etc/sysconfig/network-scripts/ifcfg-br0 Then restart network service: $ systemctl restart network
== Setup OpenStack Controller Node with Virtuozzo Containers Support (*Developer/POC Setup*) == <!--T:1-->
<!--T:3-->
You are able to setup OpenStack controller node together with compute node on the same server for demo or test purpose. In this case compute node with Virtuozzo Containers support will be deployed. You can add another compute node with containers or VMs anytime you want as described in Setup OpenStack Compute Node section.
Git must be installed on all your Virtuozzo nodes:
$ yum install git -y
Clone virtuozzo scripts:
$ cd virtuozzo-openstack-scripts
* Then restart cinder services: $ systemctl restart openstack-cinder-api $ systemctl restart openstack-cinder-scheduler $ systemctl restart openstack-cinder-volume == How to create a new ploop image ready to upload to Glance == <!--T:17--> * Select os template. The following templates are possible: vzlinux-7, centos-7, ubuntu-16.04, ubuntu-14.04, debian-8.0, centos-6, debian-8.0-x86_64-minimal $ ct=centos-7 * Create a new container based on necessary os distribution $ prlctl create glance-$ct --vmtype ct --ostemplate $ct * Set IP address and DNS to be able to connect to internet from the container $ prlctl set glance-$ct --ipadd IPADDR --nameserver DNS_IPADDR * Add additional network adapter $ prlctl set glance-$ct --device-add net --network Bridged --dhcp on * Start the container $ prlctl start glance-$ct * Install cloud-init packet $ prlctl exec glance-$ct yum install cloud-init -y * Stop the container and mount it $ prlctl stop glance-$ct $ prlctl mount glance-$ct * Store the container uuid $ uuid=$(vzlist glance-$ct | awk ' NR>1 { print $1 }') * Remove the following modules from cloud.cfg $ sed -i '/- growpart/d' /vz/setup_devstack_for_vz7root/$uuid/etc/cloud/cloud.sh HOST_IP PASSWORDcfg $ sed -i '/- resizefs/d' /vz/root/$uuid/etc/cloud/cloud.cfg * Prepare network scripts cat > /vz/root/$uuid/etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF DEVICE=eth0 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=dhcp _EOF * If you need more than one network adapters within a container, make as many copies as you need $ cp /vz/root/$uuid/etc/sysconfig/network-scripts/ifcfg-eth0 /vz/root/$uuid/etc/sysconfig/network-scripts/ifcfg-eth1 $ sed -i '/eth0/eth1' /vz/root/$uuid/etc/sysconfig/network-scripts/ifcfg-eth1 * Perform some cleanup $ rm -f /vz/root/$uuid/etc/sysconfig/network-scripts/ifcfg-venet0* $ rm -f /vz/root/$uuid/etc/resolv.conf * Create ploop disk and copy files $ mkdir /tmp/ploop-$ct $ ploop init -s 950M /tmp/ploop-$ct/$ct.hds $ mkdir /tmp/ploop-$ct/dst $ ploop mount -m /tmp/ploop-$ct/dst /tmp/ploop-$ct/DiskDescriptor.xml $ cp -Pr --preserve=all /vz/root/$uuid/* /tmp/ploop-$ct/dst/ $ ploop umount -m /tmp/ploop-$ct/dst/ * Unmount the container $ prlctl umount glance-$ct * Now the image tmp/ploop-$ct/$ct.hds is ready to be uploaded to Glance == See also == <!--T:100-->* [http://docs.openstack.org/newton/install-guide-rdo/nova-controller-install.html Controller Node Installation Guide]* [http://docs.openstack.org/newton/install-guide-rdo/nova-compute-install.html Compute Node Installation Guide]* [http://docs.openstack.org/newton/install-guide-rdo/environment-packages.html OpenStack Installation Guide]* [https://docs.openvz.org/ Virtuozzo Documentation]* [[Virtuozzo ecosystem]]
</translate>
[[Category: HOWTO]]