Editing Setup OpenStack with Virtuozzo 7
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 151: | Line 151: | ||
− | * | + | * Create a new repo file: |
− | + | cat > /etc/yum.repos.d/virtuozzo-ocata.repo << _EOF | |
+ | [virtuozzo-extra] | ||
+ | name=Virtuozzo Extra | ||
+ | baseurl=http://repo.virtuozzo.com/openstack/ocata/x86_64/os/ | ||
+ | enabled=1 | ||
+ | gpgcheck=1 | ||
+ | priority=50 | ||
+ | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Virtuozzo-7 | ||
+ | _EOF | ||
* Install packstack package: | * Install packstack package: | ||
Line 165: | Line 173: | ||
* Edit vz7-packstack-ocata.txt enabling/disabling necessary services | * Edit vz7-packstack-ocata.txt enabling/disabling necessary services | ||
* Replace all references to 'localhost' and '127.0.0.1' host addresses to correct valuses | * Replace all references to 'localhost' and '127.0.0.1' host addresses to correct valuses | ||
− | * Set all passwords parameters containing PW_PLACEHOLDER string to some meaninful values | + | * Set all passwords parameters containing PW_PLACEHOLDER string to some meaninful values |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Then run packstack: | * Then run packstack: | ||
− | $ packstack --answer-file | + | $ packstack --answer-file vz7-packstack-ocata.txt |
== Install and configure a nova controller node on [[Virtuozzo]] 7 (*Production Setup*) == <!--T:18--> | == Install and configure a nova controller node on [[Virtuozzo]] 7 (*Production Setup*) == <!--T:18--> | ||
Line 194: | Line 182: | ||
<!--T:19--> | <!--T:19--> | ||
* Follow instructions on [http://docs.openstack.org/newton/install-guide-rdo/nova-controller-install.html OpenStack.org] | * 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] | * Download the container [http://updates.virtuozzo.com/server/virtuozzo/en_us/odin/7/techpreview-ct/centos7-exe.hds.tar.gz image] | ||
Line 292: | Line 287: | ||
$ systemctl restart openstack-cinder-volume | $ systemctl restart openstack-cinder-volume | ||
− | == How to create a new ploop image ready to upload to Glance == <!--T:17--> | + | == 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 | * 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 | ||
Line 317: | Line 312: | ||
$ prlctl exec glance-$ct yum install cloud-init -y | $ prlctl exec glance-$ct yum install cloud-init -y | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Remove the following modules from cloud.cfg | * Remove the following modules from cloud.cfg | ||
− | $ sed -i '/- growpart/d' | + | $ prlctl exec glance-$ct sed -i '/- growpart/d' /etc/cloud/cloud.cfg |
− | $ sed -i '/- resizefs/d' | + | $ prlctl exec glance-$ct sed -i '/- resizefs/d' /etc/cloud/cloud.cfg |
* Prepare network scripts | * Prepare network scripts | ||
− | cat > | + | cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF |
DEVICE=eth0 | DEVICE=eth0 | ||
ONBOOT=yes | ONBOOT=yes | ||
Line 341: | Line 327: | ||
_EOF | _EOF | ||
− | * If you need more than one network adapters | + | * If you need more than one network adapters withing a container, make as many copies as you need |
− | $ cp | + | $ prlctl exec glance-$ct cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1 |
− | $ sed -i '/eth0/eth1' | + | $ prlctl exec glance-$ct sed -i '/eth0/eth1' /etc/sysconfig/network-scripts/ifcfg-eth1 |
* Perform some cleanup | * Perform some cleanup | ||
− | $ rm -f | + | $ rm -f /etc/sysconfig/network-scripts/ifcfg-venet0* |
− | $ rm -f | + | $ rm -f /etc/resolv.conf |
+ | |||
+ | * Stop the container | ||
+ | |||
+ | $ prlctl stop glance-$ct | ||
* Create ploop disk and copy files | * Create ploop disk and copy files | ||
Line 357: | Line 347: | ||
$ mkdir /tmp/ploop-$ct/dst | $ mkdir /tmp/ploop-$ct/dst | ||
$ ploop mount -m /tmp/ploop-$ct/dst /tmp/ploop-$ct/DiskDescriptor.xml | $ ploop mount -m /tmp/ploop-$ct/dst /tmp/ploop-$ct/DiskDescriptor.xml | ||
− | $ cp -Pr --preserve=all /vz/root/$ | + | $ prlctl mount glance-$ct |
+ | $ id=$(vzlist glance-$ct | awk ' NR>1 { print $1 }') | ||
+ | $ cp -Pr --preserve=all /vz/root/$id/* /tmp/ploop-$ct/dst/ | ||
+ | $ prlctl umount glance-$ct | ||
$ ploop umount -m /tmp/ploop-$ct/dst/ | $ ploop umount -m /tmp/ploop-$ct/dst/ | ||
− | |||
− | |||
− | |||
− | |||
* Now the image tmp/ploop-$ct/$ct.hds is ready to be uploaded to Glance | * Now the image tmp/ploop-$ct/$ct.hds is ready to be uploaded to Glance |