Mass Configuration

Branch server mass configuration

Branch servers are configured individually using formulas. If you are working in an environment with many branch servers, you might find it easier to configure the terminals automatically with a pre-defined configuration file, rather than configuring each branch server individually.

Configure multiple branch servers

This procedure requires the python-susemanager-retail package, which is provided with SUSE Manager for Retail. Install the python-susemanager-retail package on the SUSE Manager server.

Procedure: Configuring multiple branch servers
  1. Create a YAML file describing the infrastructure you intend to install. An example YAML file is at the end of this chapter, for you to reference.

  2. On a clean SUSE Manager installation, import the YAML file you have created:

    retail_yaml --from-yaml filename.yaml

    You can use the retail_yaml --help command for additional options.

If you need to change your configuration, you can edit the YAML file at any time, and use the retail_yaml --from-yaml command to upload the new configuration.

Use the empty profiles together with activation keys to onboard all the systems of your infrastructure. Use an activation key to assign the channels listed in retail:retail-install-setup.adoc.

Terminal mass configuration

If you are working in an environment with many terminals, you might find it easier to configure the terminals automatically with a pre-defined configuration file, rather than configuring each terminal individually.

In order to do this, you will need to have your infrastructure planned out ahead of time, including the IP addresses, hostnames, and domain names of branch servers and terminals. You will also require the hardware (MAC) addresses of each terminal.

The settings specified in the configuration file cannot always be successfully applied. In cases where there is a conflict, SUSE Manager will ignore the request in the file. This is especially important when designating hostnames. You should always check the details have been applied as expected after using this configuration method.

Configure multiple terminals

Procedure: Configuring multiple terminals
  1. Create a YAML file describing the infrastructure you intend to install, specifying the hardware address for each terminal. An example YAML file is at the end of this chapter, for you to reference.

  2. On a clean SUSE Manager installation, import the YAML file you have created:

    retail_yaml --from-yaml filename.yaml

    You can use the retail_yaml --help command for additional options.

  3. In the SUSE Manager Web UI, check that your systems are listed and displaying correctly, and the formulas you require are available.

  4. Create activation keys for each of your branch servers, connect them using bootstrap, and configure them as proxy servers. For further information on these steps, see the SUSE Manager documentation.

  5. Apply highstate to apply your configuration changes. In the States tab, click Apply Highstate.

  6. Connect your terminals according to your infrastructure plan.

If you need to change your configuration, you can edit the YAML file at any time, and use the retail_yaml --from-yaml command to upload the new configuration.

If you have a current configuration that you would like to export to a YAML file, use:

retail_yaml --to-yaml filename.yaml

This can be a good way to create a basic mass configuration file. However it is important to check the file before using it, as some mandatory configuration entries will be missing.

When you are designing your configuration and creating the YAML file, ensure the branch server ID matches the fully qualified hostname, and the Salt ID. If these do not match, the bootstrap script could fail.

Example YAML file for mass configuration

You can use the retail_yaml command to import configuration parameters from a pre-prepared YAML file. This section contains a commented example YAML file for you to reference.

Example: YAML mass terminal configuration file
branches:
# there are 2 possible setups: with / without dedicated NIC
#
# with dedicated NIC
  branchserver1.branch1.cz:     # salt ID of branch server
    branch_prefix: branch1      # optional, default guessed from salt id
    server_name: branchserver1  # optional, default guessed from salt id
    server_domain: branch1.cz   # optional, default guessed from salt id
    nic: eth1                   # nic used for connecting terminals, default taken from hw info in SUMA
    dedicated_nic: true         # set to true if the terminals are on separate network
    salt_cname: branchserver1.branch1.cz      # hostname of salt master / broker for terminals, mandatory
    configure_firewall: true    # modify firewall configuration
    branch_ip: 192.168.2.1      # default for dedicated NIC: 192.168.1.1
    netmask: 255.255.255.0      # default for dedicated NIC: 255.255.255.0
    dyn_range:                  # default for dedicated NIC: 192.168.1.10 - 192.168.1.250
        - 192.168.2.10
        - 192.168.2.250
# without dedicated NIC
# the DHCP formula is not used, DHCP is typically provided by a router
# the network parameters can be autodetected if the machine is already connected to SUSE Manager
  branchserver2.branch2.cz:     # salt ID of branch server
    branch_prefix: branch2      # optional, default guessed from salt id
    server_name: branchserver2  # optional, default guessed from salt id
    server_domain: branch2.cz   # optional, default guessed from salt id
    salt_cname: branchserver2.branch1.cz      # FQDN of salt master / broker for terminals, mandatory
    branch_ip: 192.168.2.1      # optional, default taken from SUMA data if the machine is registered
    netmask: 255.255.255.0      # optional, default taken from SUMA data if the machine is registered
    exclude_formulas:           # optional, do not configure listed formulas
      - dhcp                    # without dedicated NIC the dhcp service is typically provided by a router
    hwAddress: 11:22:33:44:55:66 # optional, required to connect pre-configured entry with particular machine
                                 # during onboarding
    terminals:                       # configuration of static terminal entries
      hostname1:                     # hostname
        hwAddress: aa:aa:aa:bb:bb:bb # required as unique id of a terminal
        IP: 192.168.2.50             # required for static dhcp and dns entry
        saltboot:                    # optional, alternative 1: configure terminal-specific pillar data
          partitioning:              # partitioning pillar as described in saltboot documentation
            disk1:
              device: /dev/sda
              disklabel: msdos
              partitions:
                p1:
                  flags: swap
                  format: swap
                  size_MiB: 2000.0
                p2:
                  image: POS_Image_JeOS6
                  mountpoint: /
              type: DISK
      hostname2:                     # hostname
        hwAddress: aa:aa:aa:bb:bb:cc # required as unique id of a terminal
        IP: 192.168.2.51             # required for static dhcp and dns entry
        hwtype: IBMCORPORATION-4838910 # optional, alternative 2: assign the terminal to hwtype group
        # if neither of hwtype nor saltboot is specified, a group is assigned according to hwtype
        # reported by bios on the first boot
hwtypes:
  IBMCORPORATION-4838910:      # HWTYPE string (manufacturer-model) as returned by bios
    description: 4838-910       # freetext description
    saltboot:
      partitioning:             # partitioning pillar as described in saltboot documentation
        disk1:
          device: /dev/sda
          disklabel: msdos
          partitions:
            p1:
              flags: swap
              format: swap
              size_MiB: 1000.0
            p2:
              image: POS_Image_JeOS6
              mountpoint: /
          type: DISK
  TOSHIBA-6140100:
    description: HWTYPE:TOSHIBA-6140100
    saltboot:
      partitioning:
        disk1:
          device: /dev/sda
          disklabel: msdos
          partitions:
            p1:
              flags: swap
              format: swap
              size_MiB: 1000.0
            p2:
              image: POS_Image_JeOS6
              mountpoint: /
          type: DISK