SMT Sle 11 Guide
SMT Sle 11 Guide
SMT Sle 11 Guide
11
July16,2009
Contents
v 1
1 2 3
5
6 7 9 10 10
13
13 15 20 20 21
25
25 26 28 29
31
31 31 32 32 33
6 SMT Reports
6.1 6.2 6.3 Report Schedule and Recipients . . . . . . . . . . . . . . . . . . . Types of SMT Reports . . . . . . . . . . . . . . . . . . . . . . . Report Output Formats and Targets . . . . . . . . . . . . . . . . .
35
35 36 37
39
39 55 64
69
70 71 72 74
Index
75
1 Overview
This guide is divided into the following parts: SMT Installation and Configuration This chapter introduces the SMT installation process and the SM Configuration Wizard. You can install the SMT add-on together with your base program during the installation process or on top of an already installed based system. The SMT Configuration Wizard guides you through the individual installation steps. SMT Server Configuration This chapter introduces the YaST configuration module SMT Server. the YaST graphical interface lets you activate and configure. You can set and configure mirroring credentials, SMT database passwords, and e-mail addresses to send SMT reports, or set the SMT job schedule, and activate or deactivate the SMT service. Installation Mirror and Source Updates with YaST. This chapter introduces the option to mirror the installation and update sources with YaST. Management for Client Machines to use SMT This chapter introduces the option to register client machines on Novell Customer Center. The Client machines must be configured to use SMT.
SMT Reports This chapter introduces generated reports based on SMT and Novell Customer Center data. Generated reports contain statistics of all registered machines and products used and of all active, expiring, or missing subscriptions. SMT Tools and Configuration Files This chapter introduces the most important scripts, configuration files and certificates shipped with SMT. Configuration for Clients to Use SMT This chapter introduces the option to configure any client machine to register against SMT and download software updates from there instead of communicating directly with the Novell Customer Center and the NU servers.
3 Feedback
Several feedback channels are available: To report bugs for a product component or to submit enhancement requests, please use https://bugzilla.novell.com/. If you are new to Bugzilla, you might find the Bug Writing FAQs helpful, available from the Novell Bugzilla home page Submitting Bug Reports articleavailable under http://en.opensuse .org/Submitting_Bug_Reports helpful. Frequently asked questions on reporting bugs are available under http://en.opensuse.org/Bug _Reporting_FAQ.
vi
We want to hear your comments and suggestions about this manual and the other documentation included with this product. Please use the User Comments feature at the bottom of each page of the online documentation and enter your comments there.
4 Documentation Conventions
The following typographical conventions are used in this manual: /etc/passwd: directory names and filenames placeholder: replace placeholder with the actual value PATH: the environment variable PATH ls, --help: commands, options, and parameters user: users or groups Alt, Alt + F1: a key to press or a key combination; keys are shown in uppercase as on a keyboard File, File > Save As: menu items, buttons amd64 em64t: This paragraph is only relevant for the specified architectures. The arrows mark the beginning and the end of the text block. Dancing Penguins (Chapter Penguins, Another Manual): This is a reference to a chapter in another manual.
vii
SMT Installation
SMT is distributed as an add-on product for SUSE Linux Enterprise Server 11 system. To install it, install the SUSE Linux Enterprise Server 11 base system. You can choose to install the SMT add-on together with your base system during the initial installation process, or you can install the SMT add-on on top of an already-installed base system at any later time.
SMT Installation
4 If you are installing from a CD, insert the SMT add-on product CD. If you are installing from a different source, provide the necessary source. Click Continue. 5 Confirm the SMT license agreement and click Next. 6 The SMT add-on product is displayed in the overview. Continue with the installation as usual. Make sure that the SMT: Subscription Management Tool for SLE installation pattern is selected automatically and do not remove it. 7 A two-step SMT Configuration Wizard is shown during the final steps of the installation workflow. Configure SMT as described in Section 1.3, SMT Configuration Wizard (page 3) and continue with the SUSE Linux Enterprise Server installation as usual.
SMT Installation
YaST (page 9) and Section 2.4, Setting E-mail Addresses to Receive Reports with YaST (page 10). 5 In the Scheduled SMT Jobs tab, set a schedule of periodic SMT jobs, such as synchronization of updates, Novell Customer Center registration, and SMT report generation. For more information, see Section 2.5, Setting the SMT Job Schedule with YaST (page 10). 6 If satisfied with the configuration, click Finish. YaST adjusts the SMT configuration and starts or restarts necessary services. If you want to abort the configuration and cancel any changes, click Abort. NOTE When the SMT Server applies configuration changes, it checks for the existence of the common server certificate. If the certificate does not exist, you will be asked if the certificate needs to be created.
To deactivate SMT with YaST, follow these steps: 1 Open the Customer Center Access tab of the SMT Server. 2 Uncheck the Enable Subscription Management Tool service (SMT) option. 3 Click Finish to apply the changes and leave the SMT Server . When activating SMT, the following important operations are performed by YaST: The Apache configuration is changed by creating symbolic links in the /etc/ apache2/conf.d/ directory. Links to the /etc/smt.d/nu_server.conf and /etc/smt.d/smt_mod_perl.conf files are created there. The Apache Web server is started (or reloaded if already running). The MySQL server is started (or reloaded if already running). If it does not exist, smt user and all necessary tables in the database are created. The schema of the SMT database is checked. If the database schema is obsolete, the SMT database is upgraded to conform to the current schema. Cron is adjusted by creating a symbolic link in the /etc/cron.d/ directory. A link to the /etc/smt.d/novell.com-smt file is created there. When deactivating SMT, the following important operations are performed by YaST: Symbolic links created upon SMT activation in the /etc/apache2/conf.d/ and /etc/cron.d/ directories are deleted. The Cron, Apache Web and MySQL servers are reloaded. Neither Apache nor MySQL are stopped, because they may be used for other purposes than the SMT service.
1 Open the Customer Center Access tab of the SMT Server . If the credentials have been already set with YaST or the /etc/smt.conf configuration file, they appear in the dialog. Otherwise, the NU User and NU Password fields are blank. 2 If you do not have your credentials, visit Novell Customer Center to obtain them. For more details, see Section 3.1, Getting Mirror Credentials (page 13). 3 Enter your NU username in NU User and the corresponding password in NU Password. 4 Press Test to check the credentials. YaST will try to download a list of available repositories with the provided credentials. If the test succeeds, the last line of the test results will read Test result: success. If the test fails, check the provided credentials and try again.
5 Enter the NCC E-mail Used for Registration. This should be the address you used to register to Novell Customer Center. Enter Your SMT Server URL if it has not been detected automatically. 6 Press Finish or continue with other configurations.
10
Job Que Cleanup Cleans up cued jobs. function unknown Uploads Spport Configs Uploads support configs, only when the SMT -Support package is installed. Figure 2.3 Setting SMT Job Schedule with YaST
To configure the schedule of SMT jobs with YaST, follow these steps: 1 Open the Scheduled SMT Jobs tab of the SMT Server . The table contains a list of all scheduled jobs, their type, frequency, date, and time to run. You can add, delete or edit these scheduled events. 2 If you want to add a scheduled SMT job, press Add. The Adding New SMT Scheduled Job dialog opens. Choose the synchronization job to schedule. You can choose between Synchronization of Updates, Report Generation, NCC Registration, Job Queue Cleanup, and Uploading Support Configs. Choose the Frequency of the new scheduled SMT job. Jobs can be performed Daily, Weekly, Monthly, or Periodically (every n-th hour or every m-th minute). Set the Job Start Time by entering Hour and Minute. In case of periodical frequency, enter the relevant periods. For weekly and monthly schedules, select Day of the Week or Day of the Month.
11
Press Add. 3 If you want to edit a scheduled SMT job (for example, change its frequency, time, or date), select the job in the table and press Edit. Then change the desired parameters and press OK. 4 If you want to cancel a scheduled job and delete it from the table, select the job in the table and press Delete. 5 Press Finish to apply the settings and quit the SMT Server, or continue with other configurations.
12
13
6 If necessary (for example if you are accessing the page for the first time), click on the Generate button. 7 The credentials and mirror sites will be listed. These values are the same for all users and subscriptions for a specific company. Figure 3.1 NU Credentials in Novell Customer Center
The obtained credentials should be set in the SMT Server module or manually written in the /etc/smt.conf file. For more information about the /etc/smt.conf file, see Section 7.2.1, /etc/smt.conf (page 55) To request a merge, the customer or their sales rep send an email emea_pic@novell.com [mailto:emea_pic@novell.com] (for EMEA-based customers only) with the applicable customer and site IDs. The EMEA PIC team will verify the records. The contact for NALAAP is cmf@novell.com [mailto:cmf@novell.com]
14
15
For more information about setting which repositories should be mirrored, see Section 3.2.4, Selecting Repositories to be Mirrored (page 17).
You can also list only repositories with a particular name or show information about a repository with a particular name and target. To list repositories with a particular name, use the smt-repositories repository_name command. To show information
16
about a repository with a particular name and target, use the smt-repositories repository_name target command.
17
If you want to choose the repository to be disabled from a shorter list, or if you want to disable all repositories from a limited group, you can use any of the available options to limit the list of the repositories. To limit the list to only enabled repositories, use the -o option: smt-repositories -o -d. To limit the list to only repositories with a particular name, use the smt-repositories -d repository_name command. To list only a repository with a particular name and target, use the smt-repositories -d repository_name target command. 2 If more than one repositories is listed, choose which one you want to disable by specyfing its ID listed in the repository table shown and pressing Enter. If you want to disable all the listed repositories, use a and press Enter.
18
--productid 424 --productid 425 --name 'My_repository' --exturl 'http://example.com/My_repository'. NOTE: Mirroring Unsigned Repositories In its default configuration, SUSE Linux Enterprise 10 does not allow the use of unsigned repositories. Therefore, if you want to mirror unsigned repositories and use them on client machines, you have to allow this explicitly by executing the following command on the client machines:
rug set security-level checksum
To remove an already-set custom repository from the SMT database, use smt-setup-custom-repositories --delete ID, where ID represents the ID of the repository to be removed.
19
14:00 ./ 17:14 ../ 15:17 $RCE -> 12:36 repoindex.xml 15:37 RPMMD ->
The links can be created using the ln -s commands. For example: ln -s '/MirrorTo/repo/$RCE/' '/srv/www/htdocs/repo/$RCE'
To register a client in the testing environment, modify the /etc/suseRegister .conf on the client machine by setting:
register = command=namespace=testing
To move the testing environment to the production environment, manually copy or move it using the cp -a or mv command. You can enable "staging" for a repository in the Repositories tab of the SMT Management module or with the smt repos command. The mirroring happens automatically to repo/full/. If you have a SLE11-based Update repository with patches, SMT tools can help you with the management. With these tools you can select patches and create a snapshot and put it into repo/testing/. After tests are finished you can put the content of repo/testing into the production area /repo. SLE10-based Update repositories are not supported by SMT tools. Not all of these repositories support selective staging. In this case you need to mirror the complete package. Recommended work flow:
repo=>repo/full, repo/full => repo/testing, repo/testing => repo/
21
generate a testing environment of this repository, which goes to /mirrorTo/repos directory If you have a SLE11 based Update repository with patches, SMT tools can help you with the management. With these tools you can select patches and create a snapshot and put it into repo/testing/. After tests are finished you can put the content of repo/testing into the production area /repo. SLE10 based Update repositories are not supported by SMT tools. Not all of these repositories support selective staging. In this case you need to mirror the complete package. >Enabling Staging To enable or disable the staging use the smt repos command: smt repos --enable staging smt repos -s. You can enable the required repositories by entering the ID number or by entering the name and target. If you want to enable all repositories enter a. Generating Testing and Production Snapshots To create the testing repository enter the $ smt staging createrepo Repository_ID -testing . Now, you can test the installation and functionality of the patches in testing clients. If no problems are discovered during testing, create the production repository by entering $ smt staging createrepo Repository_ID --production. Filtering Patches You can allow or forbid all or selected patches with the allow or forbid commands by their ID or Category: $ smt staging forbid --patch ID $ smt staging forbid --category Categoryname
22
Signing Changed Repositories If you filter one or more patches from a repository,the original signature becomes invalid. The repository needs to be singed again. The smt creeaterepo command takes care of that automaticaly if you configure the SMT server. In order to enable signing of changed metadata, the admin needs to generate new signing key. This can be done with gpg like this: $ mkdir $some-dir $ sudo mv $somedir /var/lib/smt/.gnupg $ sudo chown smt.users -R /var/lib/smt/.gnupg $ sudo chmod go-rwx -R /var/lib/smt/.gnupg $ sudo chown smt.users -R /var/lib/smt/.gnupg $ sudo chmod go-rwx -R /var/lib/smt/.gnupg Then, the ID of the newly generated key must be written into smt.conf, option 'signingKeyID'. At this point the clients do not know about this new key. In order to import the new key to clients during their registration, the following can be done: $ sudo -u smt gpg --homedir /var/lib/smt/.gnupg --export -a 48730C7A \> $MirrorTo/repo/keys/smt-signing-key.key Registering Clients in the Testing Environment To register a client in the testing environment, modify the /etc/suseRegister .conf on the client machine by setting: register = command=namespace=testing
23
25
26
27
28
Before creating a repository of packages that are available in the production environment, you need to create and test the testing repository. Click on the Create Snapshot dropdown menu and select From Full Mirror to Testing menu item. A small pop-up window appears informing you about the staging process. After the testing repository snapshot is created, the relevant check marks in the Testing column will be displayed. Figure 4.3 Testing Snapshot Created
After you have examined the newly created testing repository, you can safely create a production one. Click on the Create Snapshot drop-down menu and select From Testing to Production menu item. A small pop-up window appears informing you about the linking the testing repository to the production one. After the production snapshot is created, the relevant check marks in the Production column will be displayed. Also, a green check mark appears in the Repository Name drop-down list.
29
You can read the client's host name, the date and time of the last network contact with the SMT server, and its update status. The update status can be one of the following: Up-to-date The client packages are updated to their last version available in the production repository. Updates available This status means that there are updates available for the client that either optional or recommended. Critical Either security patches or package manager patches are available for the client. In the lower part of the window, more detailed information about the highlighted client is available. It usually consists of extended status information and detailed information about the number and types of available updates. Figure 4.4 Clients Status
30
31
32
NOTE: Lowest Registration Frequency Do not set the frequency lower than 10 minutes, because the maximal value of the rndRegister is 450 (7.5 minutes). If the frequency is lower, it may occur that the started process is still sleeping when the proceeding process starts. In this case, the second request will exit. 5 Click either OK or Add and Finish. Scheduling of SMT jobs in general is covered in Section 2.5, Setting the SMT Job Schedule with YaST (page 10) YaST uses cron to schedule Novell Customer Center registrations and other SMT jobs. If you do not want to use YaST, you can use cron directly. To disable automatic registration, change the forwardRegistration value in the [LOCAL] section of the /etc/smt.conf configuration file to false.
33
SMT Reports
SMT allows you to register client machines on Novell Customer Center. Client machines must be configured to be able to use SMT. For information about configuring clients to be able to use SMT, SMTlets you generate reports based on SMT and Novell Customer Center data. Generated reports contain statistics of the registered machines and products used and of the active, expiring, or missing subscriptions. If the number of registered machines and products exceeds the number of available subscriptions, warnings are given. NOTE: Assignment of Reports If you are using more than one SMT server in your environment, generated reports may not represent all of the SMT servers or machines in your environment. For the complete statistics of all your registered machines, refer to the information in the Novell Customer Center.
SMT Reports
35
The list can also be edited manually in the reportEmail option of the /etc/smt .conf configuration file. For more information about editing the list of addresses directly, see Section [REPORT] Section of /etc/smt.conf (page 60). To set the frequency of reports manually, you can directly edit the /usr/lib/SMT/bin/smt-gen-report line(s) of the crontab in /etc/cron .d/novell.com-smt. For more information about the crontab format, see man 5 crontab. Reports, including those created as a scheduled SMT job, are created by the smt-report command. This command has various parameters. To edit parameters used with scheduled commands, edit the /etc/smt.d/smt-cron.conf configuration file. For more information, see Section 7.2.2, /etc/smt.d/smt-cron.conf (page 63).
36
If you are creating a report based on local SMT data and you do not want local data to be synchronized with the Novell Customer Center at all, use the --nonccsync option together with --local option.
SMT Reports
37
--attach or -a Attach the report to the mails in CSV format. This option should only be used together with the --mail option. --pdf The report will be exported to multiple files in pdf format. --xml The report will be exported to multiple files in xml format. NOTE: Disabling Sending Attachments If you want to disable sending CSV attachments with report mails, edit the /etc/smt.d/smt-cron.conf configuration file as follows: remove the --attach option from the REPORT_PARAMS value. The default line reads: REPORT_PARAMS="--mail --attach -L /var/log/smt-report.log". To disable CSV attachments, change it to: REPORT_PARAMS="--mail -L /var/log/smt-report.log". If you have disabled CSV attachments but need them occasionally, you can send them manually with the smt-report --mail --attach -L /var/log/smt-report.log command.
38
39
will expire. A job may also be persistent. It is run repeatedly with a delay. For example, a patch status job is a persistent job that runs once a day. For each client, a patch status job is automatically generated after it registers successfully against an SMT 11 server. The patchstatus information can be queried with the smt client command. For the already registered clients, you can add the patchstatus jobs manually with the smt job command. You can manipulate, list, create or delete the jobs. For this reason, the command line tool smt job was introduced. For more details on, see Section smt-job (page 43) NOTE: Overriding the Automatic Creation of Patchstatus Job When creating a softwarepush or an update job, normally a non-persistent patchstatus job will be added automatically with the parent id set to the id of the new job. To disable this behavior, use the --no-autopatchstatus option. NOTE: Job Timelag Limitation The client will process one job at a time, report back the result, and then ask for the next job. If you create a persistent job with a timelag of only a few seconds, it will be repeated forever and block other jobs of this client. Therefore, adding jobs with a timelag smaller than one minute is not supported. SMT is not intended to be a system to directly access the clients or to immediately report the results back. It is rather a longtime maintenance and monitoring system than a live interaction tool.
40
smt-delete-registration smt-job smt-list-products smt-list-registrations smt-mirror smt-ncc-sync smt-register smt-report smt-repos smt-setup-custom-repos smt-staging smt-support smt-mirror-sle9 There are two syntax types you can use with the smt command: either use smt followed by a sub-command or use a single command (composed of smt, dash, and the subcommand of choice). For example, it is possible to use either smt mirror or smt-mirror, as both have the same meaning. NOTE: Conflicting Commands Depending on your $PATH environment variable, the SMT smt command (/usr/sbin/smt) may collide with the smt command from the star package (/usr/bin/smt). Either use the absolute path /usr/sbin/smt, create an alias, or set your $PATH accordingly. Another solution is to always use the smt-subcommand syntax (connected with a minus sign) instead of smt subcommand (separated by a space).
41
smt-client
The smt-client command shows information about registered clients. The information includes: guid hostname patch status timestamps of the patch status last contact with the SMT server The smt-client understands the following options: --verbose or -v Show detailed information about the client. The last contact date is shown as well. --debug or -d Enable debugging mode. --logfile or -Lfile Specify the file the log will be written to. --hostname or -hname Only the entries whose hostname begins with name will be listed. --guid or -gguid Only the entries whose GUID is guid will be listed. --severity or -slevel Filter the result by the patch status information. The value level can be one of 'packagemanager', 'security', 'recommended' or 'optional'. Only those entries are listed which have patches of the respective level.
42
smt-delete-registration
The smt-delete-registration command deletes one or more registrations from SMT and Novell Customer Center. It will deregister machines from the system. The following options are available: --guid ID or -gID Delete the machine with the guid ID from the system. You can use this option multiple times. --debug or -d Enable debugging mode.
smt-job
The smt-job script manages jobs for individual SMT clients. You can list, create, edit, or delete jobs with it. The following options are available: --list or -l List all client jobs. This is the default if the operation mode switch is omitted. --verbose or -vlevel Show detailed information about a job or jobs in a list mode. The level value can be a number from 0 to 3. The bigger the value, the more verbose the command is. --create or -c Create a new job. --edit or -e Edit an existing job. --delete or -d Delete an existing job. --guid or -gguid Specify the client's guid. This parameter can be used multiple times to create a job for more than one client.
43
--jobid or -jid Specify the job ID. You need to specify job ID and client's guid when editing or deleting a job, because the same job for multiple clients has the same job ID. --deleteall or -Aid Omit either the client's guid or the job ID in this delete operation. The missing parameter will match all clients respective jobs. --type or -ttype Specify the job type. The type can be one of 'patchstatus', 'softwarepush', 'update', 'execute', 'reboot', 'wait', 'eject'. On the client, only 'patchstatus', 'softwarepush' and 'update' are enabled by default. --descriptiondescription Specify a job description. --parentid Specify the job ID of the parent job. Use it to describe a dependency. A job will not be processed until its parent has successfully finished. --name or -nname Specify a job name. --persistent Specify if a job is persistent. Non-persistent jobs are processed only once, while persistent jobs are processed again and again. Use --timelag to define the time that elapses until the next run. --finished Search option for finished jobs. --targetedtime Specify the earliest execution time of a job. Note that the job most likely will not run exactly at that point in time, but probably some minutes or hours after. The reason is that the client polls in a fixed interval for jobs. --expirestime Define when the job will no longer be executed anymore.
44
--timelagtime Define the time interval for persistent jobs. For a complete list of possible options and their explanation, see the manual page of smt-job command (man smt-job).
Examples
To list all finished jobs, enter the following: # smt-job --list --finished To create a 'softwarepush' job that installs xterm and bash on client 12345 and 67890, enter the following: # smt-job --create -t softwarepush -P xterm -P bash -g 12345 -g 67890 To change the timing for a persistent job with job ID 42 and guid 12345 to run every 6 hours, enter the following: # smt-job --edit -j 42 -g 12345 --targeted 0000-00-00 --timelag 06:00:00 To delete all jobs with job ID 42, enter the following: # smt-job --delete -jobid 42 --deleteall
smt-list-products
The smt-list-products script lists all software products in the SMT database. The following options are available: --used or -u Show only used products. --catstat or -c Show whether all repositories needed for a product are locally mirrored.
45
smt-list-registrations
The smt-list-registrations script lists all registrations. There are two options available for this command. --verbose or -v Show detailed information about the registered devices. --format or -fformat Format the output. Possible types of formats are asciitable and csv
smt-mirror
The smt-mirror command performs the mirroring procedure and downloads repositories that are set to be mirrored. You can run the smt-mirror with the following options: --clean or -c Remove all files no longer mentioned in the metadata from the mirror. No mirroring occurs before cleanup. --debug or -d Enable the debugging mode. --deepverify Turn on verifying of all package checksums. --hardlink size Search for duplicate files with a size greater than the size specified in kilobytes. Creates hard links for them. --directory path Define the directory to work on. If you use this option, the default value configured in the smt.conf configuration file is ignored. --dbreplfile file Define the path to the *.xml file to use as database replacement. You can create such a file with the sync-ncc command.
46
smt-ncc-sync
The smt-ncc-sync or smt ncc-sync command gets data from the Novell Customer Center and updates the local SMT database. It can also save Novell Customer Center data to a directory instead of the SMT database, or read Novell Customer Center data from such a directory instead of downloading it from Novell Customer Center itself. You can run the smt-ncc-sync with the following options: --fromdir directory Read Novell Customer Center data from a directory instead of downloading it from Novell Customer Center. --todir directory Write Novell Customer Center data to the specified directory without updating the SMT database. --createdbreplacementfile Create a database replacement file for using smt-mirror without database. --logfile file or --L file Specify the path to a log file. --debug Enable debugging mode.
smt-register
The smt-register or smt-register command registers all currently unregistered clients at the Novell Customer Center. It also registers all clients whose data has changed since the last registration. The following options are available: --logfile file or --L file Specify the path to a log file.
47
smt-report
The smt-report or smt report command generates a subscription report based on local calculation or Novell Customer Center registrations. The following options are available: --local Force the creation of a report based on a local calculation without accessing Novell Customer Center data. --ncc Force the creation of a report based on Novell Customer Center data. --nosync Disable synchronizing with Novell Customer Center before creating the report. --mail or -m Activate mailing the report to the addresses configured with the SMT Server and written in /etc/smt.conf. The report will be rendered as tables. --attach or -a Append the report to the e-mails in CSV format. This option should only be used together with the --mail option. --quiet or -q Suppress output to STDOUT and runs smt-report in quiet mode. --csv or -c The report will be exported to multiple files in CSV format. The first line of each *.csv file consists of the column names, the data starts on line two. The --csv parameter should only be used together with the --file parameter. If the specified filename contains .csv as extension, the report format will be CSV (as if the --csv parameter was used).
48
--pdf or -p The report will be exported in PDF format. Use it only together with the -file option. --xml The report will be exported in XML format. Use it only together with the -file option. For a detailed description of this XML format, see the manual page of the smt-report command. --file or -F Export the report to one or several files. By default, the report will be written to a single file rendered as tables. Optionally, the filename or whole path may be specified after the parameter: --file filename. If no filename is specified, a default filename containing a timestamp is used. However, SMT will not check if the file or files already exist. In CSV mode the report will be written to multiple files, therefore, the specified filename will expand to [path/]filename-reportname.extension for every report. --logfile filename or -L filename Specify path to a logfile. --debug Enable debugging mode.
smt-repos
You can use the smt-repos (or smt repositories) script can to list all available repositories and for enabling or disabling repositories. The following options are available: --enable-mirror or -e Enable repository mirroring. --enable-by-prod or -p Enable repository mirroring by giving product data in the following format: Product[,Version[,Architecture[,Release]]].
49
--disable-by-prod or -P Disable repository mirroring by giving product data in the following format: Product[,Version[,Architecture[,Release]]]. --enable-staging or -s Enable repository staging. --disable-staging or -S Disable repository staging. --disable-mirror or -d Disable repository mirroring. --only-mirrorable or -m List only repositories that can be mirrored. --only-enabled or -o List only enabled repositories. --verbose or -v Show detailed repository information.
smt-setup-custom-repos
The smt-setup-custom-repos or smt setup-custom-repos script is a tool to set up custom repositories (repositories not present in NU) to be used with SMT. You can this script to add a new repository to the SMT database or to delete a repository from the database. The script recognizes the following options: --productid ID of a product the repository belongs to. If a repository should belong to multiple products, use this option multiple times to assign repository to all relevant products. --name The name of the custom repository. --description The description of the custom repository.
50
--exturl The URL where this repository can be mirrored from. Only HTTP and HTTPS protocols are supported (no directory, file, or FTP). --delete Remove a custom repository with a given ID from the SMT database. To set up a new repository, use the following command:
smt-setup-custom-repos --productid Product_ID --name Catalog_Name --exturl URL
For example:
smt-setup-custom-repos --productid 434 --name My_Catalog --exturl http://my.domain.top/My_Catalog
For example:
smt-setup-custom-repos --delete 1cf336d819e8e5904f4d4b05ee081971a0cc8afc
smt-staging
A patch is an update of a package or group of packages. The term update and patch are often interchangeable. With the smt-staging script, you can set up patch filters for update repositories. It can also help you generate both testing repositories, or repositories for the production environment. The first argument of smt-staging is always the command. It must be followed by a repository. The repository can be specified either by its ID, or by Name and Target from the table scheme returned by the smt-repos command. The smt-staging script understands the following commands: listupdates List available patches and their allowed/forbidden status. allow/forbid Allow or forbids specified patches.
51
createrepo Generate both testing and production repository with allowed patches. status Give information about both testing and production snapshots, and patch counts. The following options apply to any smt-staging command: --logfile or -Lfile path Write log information to the specified file. If it does not exist, it is created. --debug or -d Turn on the debugging output and log. --verbose or -v Turn more detailed output on. The following options apply to specific smt-staging command: --patch Specify a patch by its ID. You can get a list of available patches with the listupates command. This option can be used multiple times. Use it with the allow, forbid, and listupdates commands. If used with listupdates, the command will print detailed information about the specified patches. --category Specify the patch category. The following categories are available: 'security', 'recommended' and 'optional'. Use it with the allow, forbid, and listupdates commands. --all Allow or forbid all patches in the allow or forbid commands. --testing Use with the createrepo command to generate a repository for testing. The repository will be generated from the full unfiltered local mirror of the remote repository. It will be written into <MirrorTo>/repo/testing directory, where MirrorTo is the value taken from smt.conf.
52
--production Use with the createrepo command to generate a repository for production use. The repository will be generated from the testing repository. It will be written into <MirrorTo>/repo directory, where MirrorTo is the value taken from smt .conf. If the testing repository does not exist, the production repository will be generated from the full unfiltered local mirror of the remote repository. --nohardlink During the repository creation with the createrepo command, avoid creating hard links instead of copying files. If not specified, hard links are created instead. --nodesc Do not print patch descriptions and summaries to save some screen space and make the output more readable.
smt-support
The smt-support command manages uploaded support data usually coming from the supportconfig tool. You can forward the data to Novell, either selectively or all. This command understands the following options: --incoming or -idirectory Specify the directory where the supportconfig archives are uploaded. You can also set this option with the SMT_INCOMING environment variable. The default SMT_INCOMING directory is /var/spool/smt-suppor --list or -l List the uploaded supportconfig archives in the > incoming directory --remove or -rarchive Delete the specified archive. --empty or -R Delete all archives in the incoming directory. --upload or -uarchive Upload the specified archive to Novell. If you specify -s, -n, -c, -p, and -e options, the archive is repackaged with contact information.
53
--uploadall or -U Upload all archives in the incoming directory to Novell. --srnum or -sSR number Accept the Novell Service Request 11 digit number. --name or -nname Enter the first and last name of the contact, in quotes. --company or -ccompany Enter the company name. --storeid or -did Enter the store ID, if applicable. --terminalid or -tid Enter the terminal ID, if applicable. --phone or -pphone Enter the phone number of the contact. --email or -eemail Enter the email address of the contact.
54
rcsmt restart Restart the SMT services. rcsmt try-restart Check whether the SMT is enabled and if so, restarts the SMT services. You can enable and disable SMT with the SMT Server.
7.2.1 /etc/smt.conf
The /etc/smt.conf file has several sections. The [NU] section contains the NU credentials and URL. The [DB] section contains the configuration of the MySQL database SMT uses. The [LOCAL] section includes other configuration data. The [REPORT] section contains the configuration of SMT reports. You can find the configuration for the smt-mirror-sle9 command in the YOU9-* sections. WARNING The /etc/smt.conf contains passwords in clear text and its default permissions (640, root, wwwrun) make its content easily accessible with scripts running on the Apache server. Be careful with running other software on the SMT Apache server. The best policy is to use this server only for SMT.
55
NUUrl URL of the NU service. In most cases, it should contain the https://nu.novell.com/ URL. NURegUrl URL of the NU registration service. It is used by smt-ncc-sync. If this option is missing, the URL from /etc/suseRegister.conf is used as a fallback. NUUser NUUser should contain the username for NU service. For information about getting mirroring credentials, see Section 3.1, Getting Mirror Credentials (page 13). You can set this value with the SMT Server. NUPass NUPass is the password for the user defined in NUUser. For information about getting mirroring credentials, see Section 3.1, Getting Mirror Credentials (page 13) You can set this value with theSMT Server.
where smt is the name of the database and localhost the hostname of the database server. user The user for the database. The default value is smt. pass The password for the database user. You can set the password with the SMT Server.
56
57
rndRegister Specify a delay in seconds before registration of clients at Novell Customer Center. The value is a random number between 0 and 450, generated by the SMT Server. The purpose of this random delay is to prevent a high load on the Novell Customer Center server that would occur if all smt-register cron jobs connected at the same time. HTTPProxy If you do not want to use global proxy settings, specify the proxy to be used for HTTP connection here. Use the following form: http://proxy.example.com:3128. If the proxy settings are not configured in /etc/smt.conf, the global proxy settings configured in /etc/syconfig/proxy are used. You can configure the global proxy settings with the YaST Proxy module. The HTTPProxy also applies to the smt-mirror-sle9 script. HTTPSProxy If you do not want to use global proxy settings, specify the proxy to be used for HTTPS connection here. Use the form : http://proxy.example.com:3128. If the proxy settings are not configured in /etc/smt.conf, the global proxy settings configured in /etc/syconfig/proxy are used. You can configure the global proxy settings with the YaST Proxy module. The HTTPSProxy also applies to the smt-mirror-sle9 script. ProxyUser If your proxy requires authentication, specify a username and password here, using the username:password format. If the proxy settings are not configured in /etc/smt.conf, the global proxy settings configured in /etc/syconfig/proxy are used. You can configure the global proxy settings with the YaST Proxy module. Neither the ProxyUser value nor the global proxy authentication settings apply to the smt-mirror-sle9 script. For user authentication in smt-mirror-sle9
58
write the following in the $HOME/.wgetrc file: proxy_user=username proxy_password=password. requiredAuthType Specify an authentication type to access the repository. There are three possible types: none - no authentication is required. This is the default value lazy - only username and password are checked. A valid user can access all repositories. strict - checks also if the user has access to the repository. smtUser Specify a username of a Unix user under which all smt commands will run. signingKeyID Specify ID of the GPG key to sign modified repositories. The user specified under smtUser needs to have access to the key. If this option is not set, the modified repositories will be unsigned.
59
60
mirror_prod A product to be mirrored. For example Novell-Linux-Desktop. mirror_archs Comma-separated list of architectures to be mirrored. For example i386,x86_64. Remove any architectures that do not need to be mirrored. mirror_version The version of the product to be mirrored, for example 9. mirror If you want to mirror this product, set mirror to true. credentials If you want to mirror this product, provide credentials in the user:password format.
Example /etc/smt.conf
Example 7.1 config/smt.conf
[NU] NUUrl = https://nu.novell.com/ NURegUrl = https://secure-www.novell.com/center/regsvc/ NUUser = exampleuser NUPass = examplepassword [DB] config = dbi:mysql:database=smt;host=localhost user = smt pass = smt [LOCAL] # Default should be http://server.domain.top/ url = http://smt.example.com/ # This email address is used for registration at NCC nccEmail = exampleuser@example.com MirrorTo = /srv/www/htdocs MirrorAll = false MirrorSRC = true forwardRegistration = true rndRegister = 410 # specify proxy settings here, if you do not want to use the global proxy settings # If you leave these options empty the global options are used.
61
# # specify which proxy you want to use for HTTP connection # in the form http://proxy.example.com:3128 HTTPProxy = # specify which proxy you want to use for HTTPS connection # in the form http://proxy.example.com:3128 HTTPSProxy = # specify username and password if your proxy requires authentication # in the form username:password ProxyUser = # # require authentication to access the repository? # Three possible authtypes can be configures here # 1) none : no authentication required (default) # 2) lazy : check only username and password. A valid user has access to all repositories # 3) strict : check also if this user has access to the repository. # requiredAuthType = none # # the smt commands should run with this unix user # smtUser = smt # # ID of the GPG key to be used to sign modified (filtered) repositories. # The key must be accessible by the user who runs SMT, i.e. the user specified # in the 'smtUser' configuration option. # # If empty, the modified repositories will be unsigned. # signingKeyID = [REPORT] # comma separated list of eMail addresses where the status reports will be sent to reportEmail = exampleuser@example.com # from field of report mails - if empty it defaults to "root@<hostname>.<domainname>" reportEmailFrom = # relay mail server - leave emtpy if mail should be sent directly mailServer = mailServerPort = # mail server authentication - leave empty if not required mailServerUser = mailServerPassword = [YOU9-SLES-SDK] mirror_prod = SLES-SDK mirror_archs = i386,ia64,ppc,s390,s390x,x86_64 mirror_version = 9 mirror = false credentials =
62
[YOU9-SUSE-CORE] mirror_prod = SUSE-CORE mirror_archs = i386,ia64,ppc,s390,s390x,x86_64 mirror_version = 9 mirror = false credentials = [YOU9-SUSE-SLES] mirror_prod = SUSE-SLES mirror_archs = i386,ia64,ppc,s390,s390x,x86_64 mirror_version = 9 mirror = false credentials =
7.2.2 /etc/smt.d/smt-cron.conf
The /etc/smt.d/smt-cron.conf configuration file contains options of the SMT commands launched as SMT scheduled jobs set with YaST (see Section 2.5, Setting the SMT Job Schedule with YaST (page 10)). Cron is used to launch these scheduled jobs. The cron table is located in the /etc/cron.d/novell.com-smt file. NCC_SYNC_PARAMS Contains parameters of the smt ncc-sync command, if called as a part of an SMT scheduled job via cron. The default value is "-L /var/log/smt/smt-ncc-sync.log --mail". MIRROR_PARAMS Contains parameters of the smt mirror command, if called as a part of an SMT scheduled job via cron. The default value is "-L /var/log/smt/smt-mirror.log --mail" . REGISTER_PARAMS Contains parameters of the smt register command, if called as a part of an SMT scheduled job via cron. The default value is "-r -L /var/log/smt/smt-register.log --mail" . REPORT_PARAMS Contains parameters of the smt report command, if called as a part of an SMT scheduled job via cron. The default value is "--mail --attach -L /var/log/smt/smt-report.log" .
63
JOBQUEUECLEANUP_PARAMS Contains parameters for smt jobqueue cleanup, if called as a part of an SMT scheduled job via cron. The default value is "--mail -L /var/log/smt/smt-jobqueuecleanup.log".
64
5 Enter the fully qualified domain name of the server as Common Name. Add a valid e-mail address of the server administrator. Other fields, as Organization, Organizational Unit, Locality, and State are optional. Click Next to proceed.
65
IMPORTANT: Hostname in Server Certificate The server certificate must contain the correct hostname. If the client requests server https://some.hostname/, then some.hostname must be part of the certificate. The hostname must either be used as the Common Name, see Step 5 (page 65), or as the Subject Alternative Name, see Step 7 (page 66):DNS:some.hostname and/or IP:<ipaddress>. 6 Enter a Password for the private key of the certificate and reenter it in the next field to verify it. 7 If you want to define a Subject Alternative Name, click Advanced Options, select Subject Alternative Name from the list and click Add. 8 If you want to keep the default values for the other options, like Key Length and Valid Period, click Next. An overview of the certificate to be created is shown. 9 Click Create to generate the certificate. 10 To export the new certificate as the common server certificate, select it in the Certificates tab and select Export > Export as Common Server Certificate. 11 After having created a new certificate, restart SMT using the rcsmt restart command. Restarting SMT ensures that the new certificate is copied from /etc/ssl/certs/YaST-CA.pem to /srv/www/htdocs/smt .crt, the copy SMT uses. Restarting SMT also restarts the Web server. For detailed information about managing certification and further usage of the YaST CA Management module and the Common Sever Certificate module, refer to the Administration Guide.
66
67
69
URL with the YaST2 registration module during installation. These methods are described in the following sections:
regcert Location of the SMT server's CA certificate. Specify one of the following locations: URL Remote location (http, https or ftp) from which the certificate can be downloaded. Example:
regcert=http://smt.example.com/smt.crt
Floppy Specifies a location on a floppy. The floppy has to be inserted at boot timeyou will not be prompted to insert it if it is missing. The value has to start with the string floppy, followed by the path to the certificate. Example:
regcert=floppy/smt/smt-ca.crt
Local Path Absolute path to the certificate on the local machine. Example:
regcert=/data/inst/smt/smt-ca.cert
70
Interactive Use ask to open a pop-up menu during installation where you can specify the path to the certificate. Do not use this option with AutoYaST. Example:
regcert=ask
Deactivate Certificate Installation Use done if either the certificate will be installed by an add-on product, or if you are using a certificate issued by an official certificate authority. Example:
regcert=done
WARNING: Beware of Typing Errors Make sure the values you enter are correct. If regurl has not been specified correctly, the registration of the update source will fail. If a wrong value for regcert has been entered, you will be prompted for a local path to the certificate. In case regcert is not specified at all, it will default to http://FQDN/smt.crt with FQDN being the name of the SMT server. WARNING: Change of SMT Server Certificate If the SMT server gets a new certificate from a new and untrusted CA, the clients need to retrieve the new CA certificate file. This is done automatically with the registration process but only if a URL was used at installation time to retrieve the certificate, or if the regcert parameter was omitted and thus, the default URL is used. If the certificate was loaded using any other method, such as floppy or local path, the CA certificate will not be updated.
71
To configure SMT specific data using AutoYaST, follow these steps: 1 As root, start YaST and select Miscellaneous > Autoinstallation to start the graphical AutoYaST front-end. From a command line, you can start the graphical AutoYaST front-end with the yast2 autoyast command. 2 Open an existing profile using File > Open, create a profile based on the current system's configuration using Tools > Create Reference Profile, or just work with an empty profile. 3 Select Software > Novell Customer Center Configuration. An overview of the current configuration is shown. 4 Click Configure. 5 Set the URL of the SMT Server and, optionally, the location of the SMT Certificate. The possible values are the same as for the kernel parameters regurl and regcert (see Section 8.1, Using Kernel Parameters to Access an SMT Server (page 70)). The only exception is that the ask value for regcert does not work in AutoYaST, because it requires user interaction. If using it, the registration process will be skipped. 6 Perform all other configuration needed for the systems to be deployed. 7 Select File > Save As and enter a filename for the profile, such as autoinst .xml.
72
To configure a client machine to use SMT with the clientSetup4SMT.sh script, follow these steps: 1 Copy the /usr/share/doc/packages/smt/clientSetup4SMT.sh script at your SMT server to the client machine. 2 As root, execute the script on the client machine. The script can be executed in two ways. In the first case, the script name is followed by the registration URL: ./clientSetup4SMT.sh registration_URL For example, ./clientSetup4SMT.sh https://smt.example.com/center/regsvc. In the second case, the script name is followed by the --host option followed by hostname of the SMT server: ./clientSetup4SMT.sh --host server_hostname. For example, ./clientSetup4SMT.sh --host smt.example.com. 3 The script downloads the server's CA certificate. Accept it by pressing y. 4 The script performs all necessary modifications on the client. However, the registration itself is not performed by the script. 5 Downloads and asks to accept additional GPG keys to sign repositories with. 6 Perform a registration by executing suse_register or running yast2 inst_suse_register module on the client. The clientSetup4SMT.sh script works with SUSE Linux Enterprise 10 SP1, 10 SP2 and SLE11 systems. This script is also provided for download. You can get it by calling: $> wget http://FQDN/repo/tools/clientSetup4SMT.sh
73
files from the web server. If this package is installed on the server, clientSetup4SMT .sh fails to download the keys stored under /repo/keys. You can solve this problem by either editing robots.txt, or uninstalling the apache2-example-pages package. If you choose to edit the robots.txt file, open it in your favorite text editor and add the Allow: /repo/keys line before the Disallow: / line. Then save the changes and quit the editor.
For more information about using SMT with a test environment, see Section 3.4, Using the Test Environment (page 20).
74
Index