Este contenido no está disponible en el idioma seleccionado.
Chapter 5. Configuring Provisioning Environment
This section shows how to configure various stages of your provisioning environment using hammer
. For web UI equivalents of the following procedures see the Red Hat Satellite Host Configuration Guide.
5.1. Domains Copiar enlaceEnlace copiado en el portapapeles!
Domains in Red Hat Satellite represent DNS zones. Satellite has the ability to assign domain names with Red Hat Satellite Capsule Server DNS. This provides users with a means to group and name hosts within a particular domain and associate them with parameters and Puppet variables.
To create a new domain, issue the following command:
hammer domain create --name <domain_name>
$ hammer domain create --name <domain_name>
You can associate the newly created domain to organizations and locations using the hammer organization add-domain
or hammer location add-domain
commands. To view the status of a domain, issue the following command:
hammer domain info --name <domain_name>
$ hammer domain info --name <domain_name>
5.2. Subnets Copiar enlaceEnlace copiado en el portapapeles!
Subnets in Red Hat Satellite define networks specified for groups of systems. Subnets use standard IP-address settings to define the network and use the Red Hat Satellite Capsule Server’s DHCP features to assign IP addresses to systems within the subnet. The following command contains the minimal set of options required for subnet creation:
Here, <boot_mode> is one of Static
or DHCP
, <ipam> is one of DHCP
, Internal DB
, or None
. If using DHCP, you can set the IP range with the --from
and --to
options. For the full list of configurable options, see the output of the hammer subnet create --help
command.
5.3. Architectures Copiar enlaceEnlace copiado en el portapapeles!
Architecture in Satellite represents a logical grouping of hosts and operating systems. To view the architectures, issue the following command:
hammer architecture list
$ hammer architecture list
Architectures are created by Satellite automatically when hosts are registered in Puppet, therefore it is rarely needed to create them manually (even though hammer
provides this option).
5.4. Compute Resources Copiar enlaceEnlace copiado en el portapapeles!
Compute resources are hardware abstractions from virtualization and cloud providers. Satellite uses compute resources to provision virtual machines and containers. Run the following command to create a compute resource:
hammer compute-resource create \ --name <cr_name> \ --organization-ids <org_ID1>,<org_ID2>... \ --location-ids <loc_ID1>,<loc_ID2>... \ --provider <provider>
$ hammer compute-resource create \
--name <cr_name> \
--organization-ids <org_ID1>,<org_ID2>... \
--location-ids <loc_ID1>,<loc_ID2>... \
--provider <provider>
Here, <provider> is one of: RHEV
, RHEL OpenStack Platform
, Libvirt
, Docker
, Rackspace
, Google
, EC2
, or VMware
. Depending on the provider type, other options such as --url
, or --user
may be required. See the output of the hammer compute-resource create --help
command for details.
5.5. Installation Media Copiar enlaceEnlace copiado en el portapapeles!
Installation media (ISO images) provide content for kickstart trees and new host installations in Red Hat Satellite. To list the media, issue the following command:
hammer medium list
$ hammer medium list
To add a new medium, issue the following command:
hammer medium create --name <medium_name> --path <path_to_medium>
$ hammer medium create --name <medium_name> --path <path_to_medium>
You can make the medium available to organizations and locations directly when adding it (see the output of the hammer medium create --help
command), or later by using the hammer organization add-medium
or hammer location add-medium
commands.
5.6. Partition Tables Copiar enlaceEnlace copiado en el portapapeles!
Partition tables define the partitions and file system layout for new installations when provisioning systems. Red Hat Satellite provides default partition tables associated with operating system families, to view them, issue the following command:
hammer partition-table list
$ hammer partition-table list
To create a new partition table, issue the following command:
hammer partition-table create \ --name <table_name> \ --file <path_to_layout_file> \ --os-family <os_family>
$ hammer partition-table create \
--name <table_name> \
--file <path_to_layout_file> \
--os-family <os_family>
See the output of the hammer partition-table --help
command for other subcommands.
5.7. Provisioning Templates Copiar enlaceEnlace copiado en el portapapeles!
Provisioning templates provide the systematic means to run unattended installations. To view the provisioning templates provided by Satellite, issue the following command:
hammer template list
$ hammer template list
To add a new template, issue the following command:
hammer template create --name <template_name> --file <path_to_template_file>
$ hammer template create --name <template_name> --file <path_to_template_file>
See the output of the hammer template --help
command for other subcommands.
5.8. Operating Systems Copiar enlaceEnlace copiado en el portapapeles!
Operating systems define combinations of installation methods and media and are grouped within families. As a default, Red Hat Satellite uses a Red Hat family. Families allow Satellite to change certain behaviors when provisioning hosts. To list operating systems, issue the following command:
hammer os list
$ hammer os list
To create a new operating system, issue the following command:
hammer os create --name <os_name> --major <version_number>
$ hammer os create --name <os_name> --major <version_number>
Then you can add architectures, partition tables, installation media, and configuration templates to the operating system. See the output of the hammer os --help
command for details.
Example 5.1. Updating Multiple Operating Systems
The following Bash script assigns each operating system a partition table (Kickstart default), configuration template (Kickstart default PXELinux), and provisioning template (Satellite Kickstart Default).
You can add grep
commands to the for statement to further specify the affected operating systems. To verify if the assignment was performed correctly, use the hammer os info
command.
5.9. Parameters Copiar enlaceEnlace copiado en el portapapeles!
Parameters define the behavior of Red Hat Satellite during provisioning. There are several types of parameters, see the Red Hat Satellite Host Configuration Guide for details. Use the following example to set a global parameter:
hammer global-parameter set --name <param_name> --value <param_value>
$ hammer global-parameter set --name <param_name> --value <param_value>
Example 5.2. Setting a Global Parameter to Disable the Firewall
Run the following command to set the firewall global option to disabled:
hammer global-parameter set --name firewall --value --disabled
$ hammer global-parameter set --name firewall --value --disabled
To verify the setting, issue the following command:
Similarly, you can use hammer
to set other parameter types:
- To set domain parameters, use:
hammer domain set-parameter \ --name <param_name> \ --value <param_value> \ --domain <domain_name>
$ hammer domain set-parameter \
--name <param_name> \
--value <param_value> \
--domain <domain_name>
- To set host group parameters, use:
hammer hostgroup set-parameter \ --name <param_name> \ --value <param_value> \ --hostgroup <hg_name>
$ hammer hostgroup set-parameter \
--name <param_name> \
--value <param_value> \
--hostgroup <hg_name>
- To set host parameters, use:
hammer host set-parameter \ --name <param_name> \ --value <param_value> \ --host <h_name>
$ hammer host set-parameter \
--name <param_name> \
--value <param_value> \
--host <h_name>
- To update smart class parameters, use:
hammer sc-param \ --name <param_name> \ --default-value <param_value>
$ hammer sc-param \
--name <param_name> \
--default-value <param_value>