Changes

Jump to: navigation, search

Setup OpenStack with Virtuozzo 7

82 bytes removed, 14:10, 8 June 2017
Installing OpenStack with help of packstack on Virtuozzo 7 (*Production Setup*)
* Create a new repo fileInstall Virtuozzo Platform Release package to all Virtuozzo OpenStack nodes:
cat > /etc/yum.repos.d/virtuozzo-extra.repo << _EOF [virtuozzo-extra] name=Virtuozzo Extra baseurl=http://repo.virtuozzo.com/openstack/newton/x86_64/os/ enabled=1 gpgcheck=1 priority=50 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7 _EOF * Add RDO repository: $ yum install https://repos.fedorapeople.org/repos/openstack/openstackvz-newton/rdoplatform-release-newton-4.noarch.rpm
* Install packstack package:
* Download sample Vz7 packstack answer file:
$ wget https://raw.githubusercontent.com/virtuozzo/virtuozzo-openstack-scripts/master/vz7-packstack-sampleocata.txt
* Edit vz7-packstack-sampleocata.txt enabling/disabling necessary services* Replace all references to 'localhost' and '127. Also make sure 0.0.1' host addresses to correct valuses* Set all passwords parameters containing PW_PLACEHOLDER string to some meaninful values* If you have correct IP addresses specified by are going to use Virtuozzo Storage as a Cinder Volume backend set the following parameters in the file:
CONFIG_CONTROLLER_HOST # Enable Virtuozzo Storage CONFIG_COMPUTE_HOSTS CONFIG_VSTORAGE_ENABLED=y CONFIG_NETWORK_HOSTS CONFIG_AMQP_HOST # VStorage cluster name. CONFIG_MARIADB_HOST CONFIG_VSTORAGE_CLUSTER_NAME= CONFIG_REDIS_HOST # VStorage cluster password. CONFIG_VSTORAGE_CLUSTER_PASSWORD=   # Bridge mappings CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=extnet1:br-ex  # Bridge interfaces CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eth0  # Bridge mapping for compute node CONFIG_NEUTRON_OVS_BRIDGES_COMPUTE=extnet1:br-ex
* Set all passwords parameters containing PW_PLACEHOLDER string to some meaninful values
* Then run packstack:
$ packstack --answer-file =vz7-packstack-sampleocata.txt
== Install and configure a nova controller node on [[Virtuozzo]] 7 (*Production Setup*) == <!--T:18-->
<!--T:19-->
* Follow instructions on [http://docs.openstack.org/newton/install-guide-rdo/nova-controller-install.html OpenStack.org]
* Change disk_formats string in /etc/glance/glance-api.conf so that it contains 'ploop'. Like this:
disk_formats = ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,ploop
 
* Restart glance-api service:
 
systemctl restart openstack-glance-api.service
* Download the container [http://updates.virtuozzo.com/server/virtuozzo/en_us/odin/7/techpreview-ct/centos7-exe.hds.tar.gz image]
$ systemctl restart openstack-cinder-volume
== How to create a new image 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
$ 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
$ prlctl exec glance-$ct sed -i '/- growpart/d' /vz/root/$uuid/etc/cloud/cloud.cfg $ prlctl exec glance-$ct 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
_EOF
* If you need more than one network adapters withing within a container, make as many copies as you need
$ prlctl exec glance-cp /vz/root/$ct cp uuid/etc/sysconfig/network-scripts/ifcfg-eth0 /vz/root/$uuid/etc/sysconfig/network-scripts/ifcfg-eth1 $ prlctl exec glance-$ct 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 * Stop the container  $ prlctl stop glance-$ct
* Create ploop disk and copy files
$ mkdir /tmp/ploop-$ct/dst
$ ploop mount -m /tmp/ploop-$ct/dst /tmp/ploop-$ct/DiskDescriptor.xml
$ prlctl mount glance-$ct $ id=$(vzlist glance-$ct | awk ' NR>1 { print $1 }') $ cp -Pr --preserve=all /vz/root/$iduuid/* /tmp/ploop-$ct/dst/ $ ploop umount -m /tmp/ploop-$ct/dst/ * Unmount the container 
$ prlctl umount glance-$ct
$ ploop umount -m /tmp/ploop-$ct/dst/
* Now the image tmp/ploop-$ct/$ct.hds is ready to be uploaded to Glance
74
edits

Navigation menu