Open main menu

OpenVZ Virtuozzo Containers Wiki β

Editing Application Templates

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 1: Line 1:
 
===Abstract===
 
===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.
+
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.
  
 
===Introduction===
 
===Introduction===
Line 6: Line 6:
  
 
===Step 1: The Base===
 
===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] template and will be installing Ruby-on-Rails.
+
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] template
====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>cd /vz/private/$VEID && tar cvzf /vz/template/cache/centos-5-x86_64-RoR-AT-11152008.tar.gz ./ </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]
 
 
 
[[Category:HOWTO]]
 
[[Category:Templates]]
 

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)