Difference between revisions of "Best practices for development of EZ templates"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
m (add 'translate' tags)
(Marked this version for translation)
Line 2: Line 2:
  
 
<translate>
 
<translate>
 +
<!--T:1-->
 
This article lists recommendations for those willing to create EZ templates for Virtuozzo. Please consider them to be able to create EZ templates that can be included in the Virtuozzo distribution. Each recommendation has originated in the development and maintenance of Virtuozzo container templates. As the [https://src.openvz.org/projects/OVZT list of supported EZ templates] is evergrowing, before submitting your work make sure the same template has not been already submitted by someone else.
 
This article lists recommendations for those willing to create EZ templates for Virtuozzo. Please consider them to be able to create EZ templates that can be included in the Virtuozzo distribution. Each recommendation has originated in the development and maintenance of Virtuozzo container templates. As the [https://src.openvz.org/projects/OVZT list of supported EZ templates] is evergrowing, before submitting your work make sure the same template has not been already submitted by someone else.
  
 +
<!--T:2-->
 
* Make sure your EZ template does not share RPMs with other EZ templates. For example, if you submit a mysql application template, make sure that the mysql package is used only by it and not any other application template, e.g., wordpress.  
 
* Make sure your EZ template does not share RPMs with other EZ templates. For example, if you submit a mysql application template, make sure that the mysql package is used only by it and not any other application template, e.g., wordpress.  
 
* Minimize the number of RPMs in packages files. For example, do not list every RPM implied by dependencies.
 
* Minimize the number of RPMs in packages files. For example, do not list every RPM implied by dependencies.

Revision as of 22:35, 25 December 2015

<translate> This article lists recommendations for those willing to create EZ templates for Virtuozzo. Please consider them to be able to create EZ templates that can be included in the Virtuozzo distribution. Each recommendation has originated in the development and maintenance of Virtuozzo container templates. As the list of supported EZ templates is evergrowing, before submitting your work make sure the same template has not been already submitted by someone else.

  • Make sure your EZ template does not share RPMs with other EZ templates. For example, if you submit a mysql application template, make sure that the mysql package is used only by it and not any other application template, e.g., wordpress.
  • Minimize the number of RPMs in packages files. For example, do not list every RPM implied by dependencies.
  • Use setname when you modify an OS EZ template. This will help you avoid code duplication.
  • Make sure all your scripts have error-handling routines and return 0.
  • Add comments explaining the reasoning behind the code in scripts that is not intuitively clear.
  • Make your EZ templates as universal as possible. Avoid specific modifications like localization, time zones, etc.
  • Avoid using complex routines in your scripts to make them easier to maintain.

</translate>