Changes

Jump to: navigation, search

Application Templates

1,488 bytes added, 03:17, 16 November 2008
m
finish initial write-up
===Abstract===
Application Templates (AT's) are commonly found when using Virtualization as a means to try out new software without having to perform a full manual install. Unfortunately, OpenVZ, as of yet, doesn't have any precreated AT's for people to try out, which might be attributed to the lack of documentation on how to create them. The primary goal of this howto is to give an overview of how an AT can be created for OpenVZ without too much trouble. This howto assumes the user is familiar with basic OpenVZ terminology and operation, so basic tasks such as setting VE memory, networking parameters, package repositories, etc are not covered here.
===Introduction===
===Step 1: The Base===
Choose the base OS you'd like to use and find an existing VE template to use (or create your [{{fullurl:Category:Templates}} own]). For this document, I'm using the [http://download.openvz.org/template/precreated/contrib/centos-5-x86_64-default-5.2-20081107.tar.gz CentOS 5 x86_64] templateand will be installing Ruby-on-Rails.====Creating the bare VE====<pre>vzctl create 3000 --ostemplate centos-5-x86_64-default-5.2-20081107 --hostname RoR-AT vzctl set 3000 --userpasswd root:<whatever> --save</pre> ===Step 2: Software Installation===This is the part where you'll follow the application specific installation procedures. Make sure that you install all the dependancies and do a proper configuration so that the application is usable.In regards to Ruby-on-Rails, I found a good guide on installing RoR on CentOS [http://wiki.rubyonrails.org/rails/pages/RailsOnCentos here]. ===Step 3: Package the Software===Once you have everything installed and configured, packaging is a simple procedure:*Remove any unecessary files (e.g. /tmp /var/tmp /usr/src/, any downloaded files, etc)*Stop the VE:<pre>vzctl stop 3000</pre>*Create a tar.gz of the /vz/private/$VEID directory:<pre>tar xfvz /vz/template/cache/centos-5-x86_64-RoR-AT-11152008.tar.gz /vz/private/3000/ </pre>*Done ===Step 4: Deployment/Distribution===To do rapid deployment of your new AT, you can utilize for/while loops to create multiple VE's as shown [[Demo scripts | here]]. As for distribution, please share any of the AT's you create [http://download.openvz.org/template/precreated/contrib/ here]
12
edits

Navigation menu