This chapter explains how to install and set up SUSE Manager{productnumber} Proxy. It also provides notes about migrating a previous proxy such as version 2.1, 3.0, or 3.1 to version 3.2.
suma_proxy patternconfigure-proxy.shSUSE Manager{productnumber} Proxy is a SUSE Manager add-on that caches software packages on an internal, central server. The proxy caches patch updates from SUSE or custom RPMs generated by third-party organizations. A proxy allows you to use bandwidth more effectively because client systems connect to the proxy for updates, and the SUSE Manager server is no longer required to handle all client requests. The proxy also supports transparent custom package deployment.
SUSE Manager Proxy is an open source (GPLv2) solution that provides the following features:
Cache software packages within a Squid proxy.
Client systems see the SUSE Manager Proxy as a SUSE Manager server instance.
The SUSE Manager Proxy is registered as a client system with the SUSE Manager server.
The primary goal of a SUSE Manager Proxy is to improve SUSE Manager performance by reducing bandwidth requirements and accelerating response time.
The following section provides SUSE Manager Proxy requirements.
Supported Client Systems. For supported clients and their requirements, see Section 1.7, “Supported Client Systems”.
Hardware Requirements. Hardware requirements highly depend on your usage scenario. When planning proxy environments, consider the amount of data you want to cache on your proxy. If your proxy should be a 1:1 mirror of your SUSE Manager , the same amount of disk space is required. For specific hardware requirements, see the following table.
Hardware | Required |
|---|---|
CPU | Multi-core 64-bit CPU (x86_64). |
RAM | Minimum 4 GB for a non-production server Minimum 16 GB for a production server |
Free Disk Space | Minimum 100 GB for base installation and at least 50 GB for caching per SUSE product and +100 GB per Red Hat product; a resizeable partition strongly recommended. |
SUSE recommends storing the squid proxy caching data on a separate disk formatted with the XFS file system.
SSL Certificate Password. For installing the proxy, you need the SSL certificate password entered during the initial installation of SUSE Manager .
Network Requirements. For additional network requirements, see Section 1.8, “Network Requirements”.
SUSE Customer Center. For using SUSE Manager Proxy , you need an account at SUSE Customer Center (SCC) where your purchased products and product subscriptions are registered. Make sure you have the following subscriptions:
One or more subscriptions for SUSE Manager Proxy .
One or more subscriptions for SUSE Manager .
Subscriptions for the products on the client systems you want to register with SUSE Manager via SUSE Manager Proxy .
Subscriptions to client entitlements for the client system you want to register with SUSE Manager via SUSE Manager Proxy .
Network Time Protocol (NTP). The connection to the Web server via Secure Sockets Layer (SSL) requires correct time settings on the server, proxy and clients. For this reason, all systems must use NTP. For more information, see https://www.suse.com/documentation/sles-12/book_sle_admin/data/cha_netz_xntp.html.
Virtual Environments. The following virtual environments are supported:
For running SUSE Manager Proxy in virtual environments, use the following settings for the virtual machine (VM):
At least 1 GB of RAM
Bridged network
The following section will guide you through the installation and setup procedure.
SUSE Manager Proxy systems are registered as traditional clients using a bootstrap script. Currently there is no method to register proxy systems using Salt. A SUSE Manager Proxy can serve both Traditional and Salt clients.
First completly download the channels (SUSE Linux Enterprise 12 SP3) and then create the activation key. Only then you can select the correct child channels.
+
Create an activation key based on the SUSE Linux Enterprise 12 SP3 base channel. For more information about activation keys, see Section 5.2, “Creating Activation Keys”.
Click the subtab and select the SUSE Manager 3.2 Proxy child channel with the matching update channel (SUSE Manager Proxy-3.2-Pool and SUSE-Manager-Proxy-3.2-Updates ). These child channels are required for providing the proxy packages and updates. As for normal SLES clients, SLES12-SP3-Updates plus SLE-Manager-Tools12-Pool and SLE-Manager-Tools12-Updates are required.
Modify a bootstrap script for the proxy. Ensure unchecking , because in this case the proxy must be bootstrapped as a so-called traditional client. For more information about bootstrap scripts, see Section 5.4.2, “Editing the Bootstrap Script”.
Bootstrap the client with the bootstrap script.
You will see a list of channels to which your client is already subscribed to. Select the two unchecked proxy channels which include the SUSE Manager Proxy-3.2-Pool and SUSE-Manager-Proxy-3.2-Updates , then select to continue. This will provide the required repositories for the proxy packages from the SUSE Manager server to the client.
A few more steps are still needed:
install the suma_proxy pattern (see Section 2.2.3, “Install the suma_proxy pattern”);
copy the SSL certificate and key from the server (see Section 2.2.4, “Copy Server Certificate and Key”);
run configure-proxy.sh (see Section 2.2.5, “Running configure-proxy.sh”);
You will then be able to register your clients against the proxy using the Web UI or a bootstrap script as if it were a SUSE Manager server. For more information, see Section 2.2.6, “Registering Salt Clients via SUSE Manager Proxy”.
suma_proxy pattern #Make sure the suma_proxy
pattern version 2.5.1.3 or later is installed using the following command on the proxy:
{prompt.root}zypper in -t pattern suma_proxyThe new salt-broker service will be automatically started at the end of the package installation. This service forwards the Salt interactions to the SUSE Manager server.
It is possible to arrange Salt proxies in a chain. In such a case, the upstream proxy is named “parent” .
Make sure the proxie’s TCP ports 4505 and 4506 are open and that the proxy can reach the SUSE Manager
server (or another upstream proxy) on these ports.
The proxy will share some SSL information with the SUSE Manager server, so the next step is to copy the certificate and its key from the SUSE Manager server or the upstream proxy.
As root
, enter the following commands on the proxy using your SUSE Manager
server or chained proxy named as PARENT:
{prompt.root}cd /root/ssl-build{prompt.root}scp root@`PARENT`:/root/ssl-build/RHN-ORG-PRIVATE-SSL-KEY .{prompt.root}scp root@`PARENT`:/root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT .{prompt.root}scp root@`PARENT`:/root/ssl-build/rhn-ca-openssl.cnf .The SUSE Manager Proxy functionality is only supported if the SSL certificate was signed by the same CA as the SUSE Manager Server certificate. Using certificates signed by different CAs for Proxies and Server is not supported.
configure-proxy.sh #The configure-proxy.sh script will finalize the setup of your SUSE Manager Proxy
.
Now execute the interactive configure-proxy.sh script.
Pressing Enter
without further input will make the script use the default values provided between brackets [].
Here is some information about the requested settings:
A SUSE Manager parent can be either another proxy server or a SUSE Manager server.
A HTTP proxy enables your SUSE Manager proxy to access the Web. This is needed if where direct access to the Web is prohibited by a firewall.
Normally, the correct value (3.0, 3.1, or 3.2) should be offered as a default.
An email address where to report problems.
For safety reasons, press Y.
Answer N.
This ensures using the new certificates that were copied previously from the SUSE Manager
server.
The next questions are about the characteristics to use for the SSL certificate of the proxy. The organization might be the same organization that was used on the server, unless of course your proxy is not in the same organization as your main server.
The default value here is the proxy’s hostname.
Further information attached to the proxy’s certificate. Beware the country code must be made of two upper case letters. For further information on country codes, refer to the online list of alpha-2 codes.
As the country code enter the country code set during the SUSE Manager installation.
For example, if your proxy is in US and your SUSE Manager
in DE, you must enter DE for the proxy.
Use this if your proxy server can be accessed through various DNS CNAME aliases. Otherwise it can be left empty.
Enter the password that was used for the certificate of your SUSE Manager server.
Use this option if you want to reuse a SSH key that was used for SSH-Push Salt minions on the server.
Accept default Y.
Use same user name and password as on the SUSE Manager server.
SLP stands for Service Location Protocol.
If parts are missing, such as CA key and public certificate, the script prints commands that you must execute to integrate the needed files.
When the mandatory files are copied, re-run configure-proxy.sh.
Also restart the script if a HTTP error was met during script execution.
configure-proxy.sh activates services required by SUSE Manager
Proxy, such as squid
, apache2
, salt-broker
, and jabberd
.
To check the status of the proxy system and its clients, click the proxy system’s details page on the Web UI ( › , then the system name). and subtabs display the respective status information.
Proxy servers may now act as a broker and package cache for Salt minions. These minions can be registered with a bootstrap script like the traditional clients, or directly from the Web UI or the command line.
Registering Salt clients via SUSE Manager Proxy from the Web UI is done almost the same way as registering clients directly with the SUSE Manager server. The difference is that you specify the name of the proxy in the drop-box on › page.
Instead of the Web UI , you may use the command line to register a minion through a proxy. To do so, add the proxy FQDN as the master in the minions configuration file located at:
/etc/salt/minion
or alternatively:
/etc/salt/minion.d/`name`.conf
Add the FQDN to the minion file:
master: proxy123.example.com
Save and restart the salt-minion service with:
{prompt.root}systemctl restart salt-minionOn the proxy, accept the new minion key with:
{prompt.root}salt-key -a 'minion'The minion will now connect to the proxy exclusively for Salt operations and normal HTTP package downloads.
Registering clients (either traditional or Salt) via SUSE Manager Proxy with a script is done almost the same way as registering clients directly with the SUSE Manager server. The difference is that you create the bootstrap script on the SUSE Manager Proxy with a command-line tool. The bootstrap script then deploys all necessary information to the clients. The bootstrap script refers some parameters (such as activation keys or GPG keys) that depend on your specific setup.
Create a client activation key on the SUSE Manager server using the Web UI . See Section 5.2, “Creating Activation Keys”.
On the proxy, execute the mgr-bootstrap command-line tool as root . If needed, use the additional command-line switches to tune your bootstrap script. An important option is --traditional that enables to opt for a traditional client instead of a salt minion.
To view available options type mgr-bootstrap
--help from the command line:
# ``mgr-bootstrap --activation-keys=key-string``
Optionally edit the resulting bootstrap script. Execute the bootstrap script on the clients as described in Section 5.4.3, “Connecting Clients”.
The clients are registered with the SUSE Manager Proxy specified in the bootstrap script.
Within the Web UI , standard proxy pages will show information about client, no matter whether minions or traditional clients.
A list of clients connected to a proxy can be located under <proxy name> .
A list of chained proxies for a minion can be located under <minion name>
If you decide to move any of your clients between proxies or the server you will need to repeat the registration process from scratch.
To enable PXE boot via a proxy server, additional software must be installed and configured on both the SUSE Manager server and the SUSE Manager Proxy server.
On the SUSE Manager server install susemanager-tftpsync :
# ``zypper in susemanager-tftpsync``
On the SUSE Manager Proxy server install susemanager-tftpsync-recv :
# ``zypper in susemanager-tftpsync-recv``
Run the configure-tftpsync.sh setup script and enter the requested information:
# ``configure-tftpsync.sh``
It asks for hostname and IP address of the SUSE Manager server and of the proxy itself. Additionally, it asks for the tftpboot directory on the proxy.
On the SUSE Manager server, run configure-tftpsync.sh to configure the upload to the SUSE Manager Proxy server:
# ``configure-tftpsync.sh FQDN_of_Proxy_Server``
To initiate an initial synchronization on the SUSE Manager Server run:
# ``cobbler sync``
Also can also be done after each a change within Cobbler that needs to be synchronized immediately. Otherwise Cobbler synchronization will also run automatically when needed. For more information about Cobbler, see Chapter 10, Cobbler.
SUSE Manager is using Cobbler to provide provisioning. PXE (tftp) is installed and activated by default. To enable systems to find the PXE boot on the SUSE Manager Proxy server add the following to the DHCP configuration for the zone containing the systems to be provisioned:
next-server:`IP_Address_of_SUSE_Manager_Proxy_Server`filename: "pxelinux.0"
The recommended order for migrations is to first migrate the server and then the proxies. Note that a SUSE Manager 3 Proxy cooperates just fine with SUSE Manager 3.1.
For the migration of the proxies there are two possible approaches: Existing SUSE Manager
proxies may be upgraded to version 3.1 with YaST
or zypper migration.
Alternatively, the proxies may be replaced by new ones.
This section documents both approaches.
A SUSE Manager Proxy
is dumb in the sense that it does not contain any information about the clients which are connected to it.
A SUSE Manager Proxy
can therefore be replaced by a new one.
Naturally, the replacement proxy must have the same name and IP address as its predecessor.
In order to replace a SUSE Manager Proxy and keeping the clients registered to the proxy leave the old proxy in SUSE Manager . Create a reactivation key for this system and then register the new proxy using the reactivation key. If you do not use the reactivation key, you will need to re-registered all the clients against the new proxy.
Before starting the actual migration procedure, save the data from the old proxy, if needed. Consider copying important data to a central place that can also be accessed by the new server:
Copy the scripts that are still needed.
Copy the activation keys from the previous server. Of course, it is always better to re-create the keys.
Shutdown the server.
Install a new SUSE Manager 3.1 Proxy, see Section 2.2, “Proxy Installation and Connecting Clients”.
In the SUSE Manager Web UI select the newly installed SUSE Manager Proxy and delete it from the systems list.
In the Web UI , create a reactivation key for the old proxy system: On the System Details of the old proxy click . Then click , and remember it (write it on a piece of paper or copy it to the clipboard). For more information about reactivation keys, see Section 7.3.1.4, “System Details > Details > Reactivation [Management]”.
After the installation of the new proxy, perform the following actions (if needed):
Copy the centrally saved data to the new proxy system.
Install any other needed software.
If the proxy is also used for autoinstallation, do not forget to setup TFTP synchronization.
During the installation of the proxy, clients will not be able to reach the SUSE Manager
server.
After a SUSE Manager Proxy
system has been deleted from the systems list, all clients connected to this proxy will be (incorrectly) listed as directly connected to the SUSE Manager
server.
After the first successful operation on a client such as execution of a remote command or installation of a
package or patch this information will automatically be corrected.
This may take a few hours.
In most situations upgrading the proxy will be your preferred solution as this retains all cached packages. Selecting this route saves time especially regarding proxies connected to SUSE Manager server via low-bandwith links. This upgrade is similar to a standard client migration.
Before successfully initializing the product migration, you first must make sure that the migration target channels are completely mirrored.
For the upgrade to SUSE Manager
3.1 Proxy, at least the SUSE Linux
Enterprise Server 12 SP3
base channel with the SUSE Manager Proxy 3.1
child channel for your architecture is required.
Direct your browser to the SUSE Manager{webui} where your proxy is registered, and login.
On the › › page select your proxy client system from the table.
On the system’s detail page select the tab, then the tab.
From this page you will see installed products listed on your proxy client, and the available target products. Select the wanted , which include SUSE Linux Enterprise Server 12 SP3 and SUSE Manager Proxy 3.1 .
Then confirm with .
From the menu, and then .
Check the on the system’s details when the migration is done.
refresh_pattern in /etc/squid/squid.confIf you migrate from an early SUSE Manager Proxy
3.0 add the following refresh_pattern to /etc/squid/squid.conf
:
# salt minions get the repodata via a different URL refresh_pattern /rhn/manager/download/.*/repodata/.*$ 0 1% 1440 ignore-no-cache reload-into-ims refresh-ims
Finally consider to schedule a reboot.
For the migration of SUSE Manager 2.1 Proxies there are two possible approaches—this section documents both approaches:
Existing SUSE Manager proxies may be replaced by newly installed and reconfigured proxies, see Section 2.5.1, “Replacing a SUSE Manager Proxy”. This is the recommended method.
Proxies may be auto-upgraded to version 3.1 by means of YaST auto-installation, see Section 2.5.2, “Upgrading a SUSE Manager Proxy from 2.1 to 3.1”.
The recommended order for migrations is to first migrate the server and then the proxies. A SUSE Manager 2.1 Proxy cooperates just fine with SUSE Manager 3.1.
A SUSE Manager Proxy
is dumb in the sense that it does not contain any information about the clients which are connected to it.
A SUSE Manager Proxy
can therefore be replaced by a new one.
The replacement proxy must have the same name and IP address as its predecessor.
In order to replace a SUSE Manager Proxy and keeping the clients registered to the proxy leave the old proxy in SUSE Manager . Create a reactivation key for this system and then register the new proxy using the reactivation key. If you do not use the reactivation key, you will need to re-registered all the clients against the new proxy.
Before starting the actual migration procedure, save the important data from the old proxy. Copy the data to a central place that also the new server can access:
Copy the scripts that are still needed.
Copy the activation keys from the existing server. Of course, it is always better to re-create the keys.
Shutdown the server.
Install a new SUSE Manager 3.1 Proxy, see Section 2.2, “Proxy Installation and Connecting Clients”.
During the installation of the proxy, clients will not be able to reach the SUSE Manager
server.
After a SUSE Manager Proxy
system has been deleted from the systems list, all clients connected to this proxy will be (incorrectly) listed as directly
connected to the SUSE Manager
server.
After the first successful operation on a client such as execution of a
remote command or installation of a package or patch this information will automatically be corrected.
This may take a few hours.
In the SUSE Manager Web UI select the newly installed SUSE Manager Proxy and delete it from the systems list.
In the Web UI , create a reactivation key for the old proxy system: On the System Details of the old proxy click . Then click , and remember it (write it on a piece of paper or copy it to the clipboard). For more information about reactivation keys, see Section 7.3.1.4, “System Details > Details > Reactivation [Management]”.
After the installation of the new proxy, perform the following actions (if needed):
Copy the centrally saved data back to the new proxy system.
Install any other needed software.
If the proxy is also used for autoinstallation, do not forget to setup TFTP synchronization.
In other situations upgrading the proxy will be the preferred solution as it retains all cached packages. This route saves time especially regarding proxies connected to a SUSE Manager server via low-bandwith links. This upgrade can be automated by using the YaST auto-installation feature.
Create an auto-installable distribution based on SLES 12 SP3. SUSE Manager 3.1 Proxy is an Add-On for SLES 12 SP3. Refer to the Chapter 8, Autoinstallation on creating an auto-installable distribution.
To start the auto-installation of a proxy, some additional packages must be installed that are only available in the SUSE Manager Tools channel. These tools were not available for proxies when in the past the system was shipped as an appliance. To gain access to the required packages for use with proxies, the underlying SLES 11 SP3 channel (SLES11-SP3-SUSE-Manager-Tools ) needs to be cloned and assigned to the to-be-upgraded proxies. After these steps have been completed, create an auto-installation profile.
In the following example you will see an auto-install profile.
The label Proxy31 is used both for the auto-installable distribution as well as for the auto-install profile.
Use the following auto-installation as template and create the auto-installation profile by uploading the edited file:
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">
<general>
$SNIPPET('spacewalk/sles_no_signature_checks')
<mode>
<confirm config:type="boolean">false</confirm>
</mode>
</general>
<add-on>
<add_on_products config:type="list">
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/sles12-sp3-updates-x86_64/Proxy31</media_url>
<name>SLES12 SP3 Updates</name>
<product>SLES12-SP3</product>
<product_dir>/</product_dir>
</listentry>
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/sle-manager-tools12-pool-x86_64-sp3/Proxy31</media_url>
<name>SLE12 Manager Tools Pool</name>
<product>SLES12</product>
<product_dir>/</product_dir>
</listentry>
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/sle-manager-tools12-updates-x86_64-sp3/Proxy31</media_url>
<name>SLE12 Manager Tools Updates</name>
<product>SLES12</product>
<product_dir>/</product_dir>
</listentry>
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/suse-manager-proxy-3.1-pool-x86_64/Proxy31</media_url>
<name>SLE12 Proxy 3.1 Pool</name>
<product>SLES12</product>
<product_dir>/</product_dir>
</listentry>
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/suse-manager-proxy-3.1-updates-x86_64/Proxy31</media_url>
<name>SLE12 Proxy 3.1 Update</name>
<product>SLES12</product>
<product_dir>/</product_dir>
</listentry>
</add_on_products>
</add-on>
<upgrade>
<only_installed_packages config:type="boolean">false</only_installed_packages>
<stop_on_solver_conflict config:type="boolean">true</stop_on_solver_conflict>
</upgrade>
<backup>
<sysconfig config:type="boolean">true</sysconfig>
<modified config:type="boolean">true</modified>
<remove_old config:type="boolean">false</remove_old>
</backup>
<networking>
<keep_install_network config:type="boolean">true</keep_install_network>
<start_immediately config:type="boolean">true</start_immediately>
</networking>
<scripts>
<pre-scripts config:type="list">
<script>
<filename>remove_initrd_koan.sh</filename>
<source>
mount /dev/sda1 /mnt
rm -f /mnt/initrd_koan
umount /mnt
</source>
</script>
</pre-scripts>
<chroot-scripts config:type="list">
<script>
<filename>migration_fix_script.sh</filename>
<chrooted config:type="boolean">true</chrooted>
<source><![CDATA[ ln -sf /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT /etc/pki/trust/anchors/
/usr/sbin/update-ca-certificates ]]>
</source>
</script>
</chroot-scripts>
<init-scripts config:type="list">
<script>
<filename>sles_register.sh</filename>
<source>
$SNIPPET('spacewalk/sles_register')
chmod 640 /etc/sysconfig/rhn/systemid
chown root:www /etc/sysconfig/rhn/systemid
systemctl enable squid
systemctl start squid
</source>
</script>
</init-scripts>
</scripts>
</profile>Ensure all channels referenced in this file are available and fully synced.
Replace the label Proxy31 with the correct reference chosen for your auto-installation profile.
It is recommended to create a new activation key, for example: 1-sles12sp3 which has the relevant channels assigned; later this key will be used to subscribe the upgraded proxy with the correct channels.
The following base channel should be assigned:
SLES12-SP3-Pool
Also include the following child channels:
SLE-Manager-Tools12-Pool SLE-Manager-Tools12-Updates SLES12-SP3-Updates SUSE-Manager-Proxy-3.1-Pool SUSE-Manager-Proxy-3.1-Updates
In Kernel Options enter the following value:
autoupgrade=1 Y2DEBUG=1
The debug setting is not required but can help investigate problems in case something goes wrong; the autoupgrade parameter is vital! Do not remove it.
Save your changes then click on "Variables" and enter the following value:
registration_key=1-sles12sp3
Specify the name of the key which has all respective channels assigned to it.
The auto-install file contains a script named remove_initrd_koan.sh.
In this script you should specify the device name of your /boot
partition.
The purpose of this script is to act as a workaround for the following problem: During installation the initrd of the installation media (SLES12SP3) is in use. This initrd is rather large (around 50 MB), so there is not enough space left when the new kernel is being installed. Therefore this script deletes the initial ramdisk file once it has been booted. The partition of your boot partition might differ, so it should be explicitly specified in the autoinstall file.
During auto-installation this script attempts to delete the initial ramdisk file once it has booted. Your boot partition may differ, so ensure it is explicitly specified within the auto-install file.
If this step is bypassed or mixed up (for example: specifying a wrong value) it’s fine. During installation of the new kernel, YaST will detect that there is not enough space available and will stop. You may switch to another console (there is a shell running on virtual console 2) and reclaim some disk space by issuing the command:
rm /mnt/boot/initrd_koan
When you have completed this step, switch back to the console where YaST is running (console 7) and click . Installation of the kernel will continue and succeed. The system will reboot, a few automated init scripts will run and the proxy will be upgraded to the SUSE Manager 3.1 based on SLES12SP3 and will be fully functional.