Skip to content

Server Templates

Server Templates are used to create Servers quickly and easily using pre-configured settings. A Flight Plan can be executed after a server is created from a template.
This allows automation of the server creation process and ensures that all necessary steps are performed automatically.

Access Rules

Group Action Condition
User - No access
Manager R User is added to "Users" or "Managers"
Manager CRU User is added to "Managers"
Manager CRUD User is added to "Managers" and the record is created by the user
Root CRUD Any record

Info

CRUD stands for Create, Read, Update, Delete.

Server Template Configuration

Server Templates are located under the Cetmix Tower > Servers > Templates menu.

Server Template

General Settings

Server Template Form

Field Description
Name Server Template name.
Reference Used for Odoo automation and YAML export/import. Leave blank to generate it automatically.
Color Used for more convenient identification in the kanban view.
Flight Plan Flight Plan to be executed automatically after a server is created.
On Delete Plan Flight Plan to be executed automatically before a server is deleted.
Operating System Default operating system for new servers.
Tags Default search tags for new servers.
SSH Auth Mode Default SSH authentication mode for new servers. Options: "Password" or "Key".
SSH Port Default SSH port for new servers.
SSH Username Default SSH username for new servers.
Use sudo Specify if sudo is required by default for all commands on new servers.
SSH Password Default SSH password for new servers.
SSH Private Key Default SSH private key for new servers.
Note Optional comments or user notes.

Configuration

Configuration Tab

Default configuration variables that will apply to Servers created using this template. These values can be customized per Server as needed.

Important

Use the Required checkbox to mark a variable as mandatory. All Variables marked as "Required" must have a value. Otherwise, the server creation process will be blocked, and an appropriate warning message will be displayed.

Access Roles

Access Roles Tab

Access Roles for this record for specific users.

Server Logs

Server Logs Tab

Define default Server Logs for new servers created from this template.

YAML

Server Template YAML

Export the current record to a YAML file. The following data will be exported:

This tab is visible only to users with the "Cetmix Tower YAML > Export" setting enabled.
Please refer to the Cetmix Tower YAML documentation for more details.

Server Template Usage

Use the following step-by-step guide to create a new Server from a server template.

YAML Format Specification

cetmix_tower_model: server_template
reference: demo_server_template_1 # String. Used for Odoo automation and [YAML export/import](yaml_export_import.md). If not specified, new record will be generated automatically.
name: 'Demo Server Template #1'
color: 1  # Integer from 0 to 10
os_id: debian_10  # Operating System reference or Operating System object
tag_ids:  # Tags. List of Tag references or Tag objects
- custom  # Tag reference or Tag object
note: "Fancy server template"  # Text. Optional comments or user notes.
ssh_port: 22  # Integer. Default SSH port.
ssh_username: admin  # String. Default SSH username.
ssh_key_id: very_nice_ssh_key  # SSH Key reference or SSH Key object. SSH Key used in new servers.
ssh_auth_mode: p  # String. SSH authentication mode. Possible values: p for password, k for key
use_sudo: n  # String. 'sudo' mode. Possible values: n for sudo without password, p for sudo with password, blank for no sudo
variable_value_ids:  # List of Variable Value references or Variable Value objects. Configuration variables used in new servers.
- demo_language_variable_value_1_4  # Variable Value reference or Variable Value object
- demo_odoo_version_variable_value_1_3  # Variable Value reference or Variable Value object
- demo_path_variable_value_1_3  # Variable Value reference or Variable Value object
- demo_url_variable_value_1_2  # Variable Value reference or Variable Value object
server_log_ids:  # List of Server Log references or Server Log objects. Server logs used in new servers.
- log_from_file_3  # Server Log reference or Server Log object
- command_log_for_server_template_1  # Server Log reference or Server Log object
shortcut_ids:  # List of Shortcut references or Shortcut objects. Shortcuts used in new servers.
- flight_plan_shortcut_for_server_template  # Shortcut reference or Shortcut object
flight_plan_id: demo_flight_plan_1  # Reference or Flight Plan object. Flight Plan launched upon server creation.
plan_delete_id: demo_delete_flight_plan_4  # Reference or Flight Plan object. Flight Plan launched upon server deletion.

Please refer to the General YAML Format Specification for more details.