11.3. Provisioning Discovered Hosts
11.3.1. Manually Provisioning Hosts
Procedure 11.2. To Manually Provision a Discovered Host:
- Navigate to Hosts → Discovered Hosts.
- Select the host you want to provision and click Provision.
- On the host's Edit page, complete the necessary details, and then click Save.
11.3.2. Decommissioning Discovered Hosts
Procedure 11.3. To Decommission a Discovered Host:
- Shut down the host.
- Navigate to Hosts → Discovered Hosts.
- In the Name column find the host you want to decommission and then select Delete from the corresponding Edit drop-down menu.
11.3.3. Automatically Provisioning Hosts
Procedure 11.4. To Create a Provisioning Rule:
- Navigate to Configure → Discovery rules.
- Click New Rule. Specify the following parameters of the provisioning rule:
- Name is the name of the rule displayed in the list of rules. This name must not contain spaces or non-alphanumeric characters.
- Search is the search statement used to match discovered hosts for the particular rule. You can use scoped search syntax to define it. See Section 11.3.4, “Scoped Search Syntax” for examples of using scoped search.
- Host Group is the host group to be assigned to a matching host before starting the provisioning process. Make sure that the selected host group has all the required parameters set; required parameters are marked with an asterisk (*).
- Hostname defines a pattern for assigning human-readable host names to the matching hosts. When left blank, the host name is assigned in the format "macMACADDRESS" by default. The same syntax used for provisioning templates is used in this instance. See Section 11.3.5, “Host Name Patterns” for more information and examples.
- Hosts limit is the maximum number of provisioned hosts per rule. If the limit is reached, the rule will not take effect until one or more hosts are deleted. Typical use cases are rules per server rack or row when it is necessary to change provisioning parameters such as host name or host group per entry. You can set this value to zero (0) to specify no limit.
- Priority specifies the order of execution of rules. The value must be greater than or equal to zero. A lower value indicates a higher priority. If two rules have the same priority, the first rule encountered is applied.
- Enabled provides the option to temporarily enable or disable rules.
- Click Submit to save the rule.
discovery_autovariable to provide automatic provisioning according to specified rules.
Procedure 11.5. To Enable Automatic Provisioning:
- Navigate to Administer → Settings → Discovered in the Satellite web UI.
discovery_autoin the Name column, and set its value to
- Click Save.
11.3.4. Scoped Search Syntax
- facts.architecture = x86_64
- facts.bios_vendor ~ 'Dell*'
- facts.macaddress = "aa:bb:cc:dd:ee:ff"
- facts.macaddress_eth0 = "aa:bb:cc:dd:ee:ff"
- facts.ipaddress_eth1 ~ "192.168.*"
- facts.architecture ^ (x86_64,i386)
Table 11.1. Facts that Allow Numerical Comparison
|Search Parameter||Description||Example Usage|
|cpu_count||The number of CPUs||cpu_count >= 8|
|disk_count||The number of disks attached||disk_count < 10|
|disks_size||The total amount of disk space (in MiB)||disks_size > 1000000|
11.3.5. Host Name Patterns
rand()function for random integers is available. For example:
- application-server-<%= rand(99999) %>
- load-balancer-<%= @host.facts['bios_vendor'] + '-' + rand(99999) %>
- wwwsrv-<%= @host.hostgroup.name %>
- minion-<%= @host.discovery_rule.name %>
- db-server-<%= @host.ip.gsub('.','-') + '-' + @host.hostgroup.subnet.name %>>
11.3.6. Using the Discovery Plug-in on the Command Line
hammercommand to perform certain tasks related to discovery. Run the
hammer -hcommand to verify your configuration:
$ hammer -h | grep discovery discovery Manipulate discovered hosts. discovery_rule Manipulate discovered rules.
hammer discovery -hcommand to view the available options. For example, you can use the following command to reboot a discovered host (assuming its ID is 130):
$ hammer discovery reboot -id 130 Host reboot started