You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Template:Server: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Peachey88
m (Update doc)
imported>Krinkle
No edit summary
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
{{!}}-
{{!}}-
}}
}}
{{#if: {{{server_group|<noinclude>demo</noinclude>}}}|
{{#if: {{{cluster|{{{server_group|<noinclude>demo</noinclude>}}}}}}|
{{!}} bgcolor=#efefef {{!}} Server&nbsp;group:
{{!}} bgcolor=#efefef {{!}} Cluster:
{{!}} bgcolor=#f8f8ff {{!}} {{{server_group|Example services}}}
{{!}} bgcolor=#f8f8ff {{!}} {{{cluster|{{{server_group|Example services}}}}}}
{{!}}-
{{!}}-
}}
}}
Line 38: Line 38:
  | {{#ifeq: {{lc:{{{status|}}}}} | decommissioned
  | {{#ifeq: {{lc:{{{status|}}}}} | decommissioned
   | {{{usage|unknown}}}
   | {{{usage|unknown}}}
   | {{Server/usage|{{#if:{{{usage|}}}|{{{usage|}}}|{{#if:{{{server_group|}}}|{{{server_group}}}|unknown}}}}}}
   | {{Server/usage|{{#if:{{{usage|}}}|{{{usage|}}}|{{#if:{{{cluster|{{{server_group|}}}}}}|{{{cluster|{{{server_group}}}}}}|unknown}}}}}}
   }}
   }}
}}
}}
Line 78: Line 78:
{{!}} bgcolor=#efefef {{!}} Kernel:
{{!}} bgcolor=#efefef {{!}} Kernel:
{{!}} bgcolor=#f8f8ff {{!}} {{{kernel}}}
{{!}} bgcolor=#f8f8ff {{!}} {{{kernel}}}
{{!}}-
}}
{{#if: {{{usage_version|}}}|
{{!}} bgcolor=#efefef {{!}} {{{usage}}}&nbsp;version:
{{!}} bgcolor=#f8f8ff {{!}} {{{usage_version}}}
{{!}}-
{{!}}-
}}
}}
Line 89: Line 84:
-->{{#ifeq: {{lcfirst:{{PAGENAME}}}} | {{Server/name|{{{name|}}}}} | {{DISPLAYTITLE:{{#if:{{NAMESPACE}}|{{NAMESPACE}}:|}}{{Server/name|{{{name|}}}}}}} }}<!--
-->{{#ifeq: {{lcfirst:{{PAGENAME}}}} | {{Server/name|{{{name|}}}}} | {{DISPLAYTITLE:{{#if:{{NAMESPACE}}|{{NAMESPACE}}:|}}{{Server/name|{{{name|}}}}}}} }}<!--
   Categories:
   Categories:
-->[[Category:{{Server/location|{{{location}}}}} cluster]]<!--
-->[[Category:{{Server/location|{{{location}}}}} data center]]<!--
-->[[Category:Servers]]<!--
-->[[Category:Servers]]<!--
--></includeonly><noinclude><div style="clear: both;"></div>
--></includeonly><noinclude><div style="clear: both;"></div>
Line 96: Line 91:
This template categorizes the host page into:
This template categorizes the host page into:
* [[:Category:Servers]]
* [[:Category:Servers]]
* a subcategory of [[:Category:Clusters]] (based on the <tt>{{{location}}}</tt> parameter)  
* a subcategory of [[:Category:Data centers]] (based on the <tt>{{{location}}}</tt> parameter)  
* a subcategory of [[:Category:Servers by usage]] (based on the <tt>{{{usage}}}</tt>)
* a subcategory of [[:Category:Servers by usage]] (based on the <tt>{{{usage}}}</tt>)
* a subcategory of [[:Category:Servers by status]] (based on the <tt>{{{status}}}</tt>)
* a subcategory of [[:Category:Servers by status]] (based on the <tt>{{{status}}}</tt>)


==Parameters==
==Parameters==
;location: (required) Which [[:Category:Clusters|cluster]] this server is located in.
;location: (required) Which [[:Category:Data centers|data center]] this server is located in.
;name: (optional: defaults to <tt><nowiki>{{PAGENAME}}</nowiki></tt>
;name: (optional: defaults to <tt><nowiki>{{PAGENAME}}</nowiki></tt>
;serial: (optional)
;serial: (optional)
;usage: (optional) ID of usage (see [[:Category:Servers by usage]] for possible values)
;usage: (optional) ID of usage (see [[:Category:Servers by usage]] for possible values)
;usage-multi: (optional) Overwrites <code>usage</code> for embedding multiple templates directly.
;usage-multi: (optional) Overwrites <code>usage</code> for embedding multiple templates directly.
;status: (optional) Use <code>online</code>, <code>offline</code>, <code>unknown</code> or <code>decommissioned</code> (see [[Template:Server/status]])
;status: (optional) Use <code>active</code> or <code>decom</code> (see [[Template:Server/status]])
;memory: (optional)
;memory: (optional)
;cpu: (optional)
;cpu: (optional)
Line 112: Line 107:
;os: (optional)
;os: (optional)
;kernel: (optional)
;kernel: (optional)
;usage_version: (optional)
;cluster: (optional) Name of organizational server group (not physical per se).
;server_group: (optional) Name of organizational server group (not physical per se).
;server_nodename: (optional) "Node" hostname.
;server_nodename: (optional) "Node" hostname.
;racktables_id: (optional) The "object_id" of the server in [[Racktables]]
;racktables_id: (optional) The "object_id" of the server in [[Racktables]]
Line 129: Line 123:
"location": {
"location": {
"label": "Location",
"label": "Location",
"description": "Which cluster this server is located in.",
"description": "Which data center this server is located in.",
"example": "eqiad",
"example": "eqiad",
"type": "string",
"type": "string",
Line 143: Line 137:
"status": {
"status": {
"label": "Status",
"label": "Status",
"description": "Use one of \"online\", \"offline\", \"unknown\" or \"decom\"",
"description": "Use one of \"active\", or \"decom\"",
"type": "string",
"type": "string",
"default": "unknown"
"default": "active"
},
"cluster": {
"aliases": [
"server_group"
],
"label": "Cluster",
"type": "string"
}
}
},
},
Line 152: Line 153:
"location",
"location",
"status",
"status",
"usage"
"usage",
"cluster"
],
],
"format": "block"
"format": "block"
Line 165: Line 167:
| usage =  
| usage =  
| status = online
| status = online
| server_group =  
| cluster =  
| server_nodename =  
| server_nodename =  
}}</pre>
}}</pre>

Latest revision as of 15:53, 17 June 2022

server
Location: sandbox
Cluster: Example services
Node name: foo.examplenet (fingerprint)
Status
Overall: Symbol support vote.png Active
Icinga?: host status services status
Hardware
Software

This template categorizes the host page into:

Parameters

location
(required) Which data center this server is located in.
name
(optional: defaults to {{PAGENAME}}
serial
(optional)
usage
(optional) ID of usage (see Category:Servers by usage for possible values)
usage-multi
(optional) Overwrites usage for embedding multiple templates directly.
status
(optional) Use active or decom (see Template:Server/status)
memory
(optional)
cpu
(optional)
hdd
(optional)
os
(optional)
kernel
(optional)
cluster
(optional) Name of organizational server group (not physical per se).
server_nodename
(optional) "Node" hostname.
racktables_id
(optional) The "object_id" of the server in Racktables
netbox
(optional) The "object_id" of the server in Netbox

<templatedata> { "params": { "name": { "label": "Name", "description": "Name of the server", "type": "string", "default": "Server" }, "location": { "label": "Location", "description": "Which data center this server is located in.", "example": "eqiad", "type": "string", "required": true, "suggested": true }, "usage": { "label": "Usage", "description": "Main purpose of the server. See \"Category:Servers by usage\" for expected values.", "type": "string", "suggested": true }, "status": { "label": "Status", "description": "Use one of \"active\", or \"decom\"", "type": "string", "default": "active" }, "cluster": { "aliases": [ "server_group" ], "label": "Cluster", "type": "string" } }, "paramOrder": [ "name", "location", "status", "usage", "cluster" ], "format": "block" } </templatedata>

Usage

{{Server
| location = 
| name = 
| netbox = 
| usage = 
| status = online
| cluster = 
| server_nodename = 
}}

Example