AutoYaST Guide - OpenSUSE Leap 15

2y ago
33 Views
2 Downloads
1.30 MB
259 Pages
Last View : 18d ago
Last Download : 3m ago
Upload by : Julia Hutchens
Transcription

AutoYaST GuideopenSUSE Leap 15.2

AutoYaST GuideopenSUSE Leap 15.2AutoYaST is a system for unattended mass deployment of openSUSE Leap systems.AutoYaST installations are performed using an AutoYaST control le (also called a“pro le”) with your customized installation and con guration data.Publication Date: December 16, 2020SUSE LLC1800 South Novell PlaceProvo, UT 84606USAhttps://documentation.suse.comCopyright 2006– 2020 SUSE LLC and contributors. All rights reserved.Permission is granted to copy, distribute and/or modify this document under the terms of the GNU FreeDocumentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being thiscopyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNUFree Documentation License”.For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are theproperty of their respective owners. Trademark symbols ( , etc.) denote trademarks of SUSE and itsa liates. Asterisks (*) denote third-party trademarks.All information found in this book has been compiled with utmost attention to detail. However, this doesnot guarantee complete accuracy. Neither SUSE LLC, its a liates, the authors nor the translators shall beheld liable for possible errors or the consequences thereof.

Contents11.11.2I22.1Introduction to AutoYaST 1Motivation 1Overview and Concept 1UNDERSTANDING AND CREATING THE AUTOYAST CONTROL FILE 4The AutoYaST Control File 5Introduction 52.2Format 52.3Structure 6Resources and Properties 7 Nested Resources 7 Attributes 83Creating an AutoYaST Control File 93.1Collecting Information 93.2Using the Configuration Management System (CMS) 9Creating a New Control File 103.3Creating/Editing a Control File Manually 113.4Creating a Control File via Script with XSLT 12IIAUTOYAST CONFIGURATION EXAMPLES 144Configuration and Installation Options 154.1General Options 15The Mode Section 16 Configuring the Installation SettingsScreen 20 The Self-Update Section 20 The Semi-AutomaticSection 22 The Signature Handling Section 22 The WaitSection 24 Examples for the general Section 264.2iiiReporting 28AutoYaST Guide

4.3The Boot Loader 29Loader Type 29 Globals 30 Device map 354.4Partitioning 35Automatic Partitioning 36 Guided Partitioning 36 ExpertPartitioning 37 Advanced Partitioning Features 54 LogicalVolume Manager (LVM) 58 Software RAID 60 MultipathSupport 66 bcache Configuration 67 Multi-device BtrfsConfiguration 69 NFS Configuration 714.5iSCSI Initiator Overview 724.6Fibre Channel over Ethernet Configuration (FCoE) 734.7Country Settings 744.8Software 76Package Selection with Patterns and Packages Sections 76 DeployingImages 77 Installing Additional/Customized Packages orProducts 77 Kernel Packages 84 Removing AutomaticallySelected Packages 84 Installing Recommended Packages/Patterns 85 Installing Packages in Stage 2 85 Installing Patterns inStage 2 86 Online Update in Stage 2 864.9Upgrade 864.10Services and Targets 884.11Network Configuration 89Interfaces 92 Persistent Names of Network Interfaces 96 DomainName System 97 Routing 98 s390 Options 99 Proxy 100iv4.12NIS Client and Server 1004.13NIS Server 1014.14Hosts Definition 1034.15Windows Domain Membership 1044.16Samba Server 1054.17Authentication Client 106AutoYaST Guide

4.18NFS Client and Server 1074.19NTP Client 1084.20Mail Server Configuration 1094.21Apache HTTP Server Configuration 1114.22Squid Server 1204.23FTP Server 1274.24TFTP Server 1314.25Firstboot Workflow 1324.26Security Settings 132Password Settings Options 133 Boot Settings 134 LoginSettings 134 New user settings (useradd settings) 1344.27Linux Audit Framework (LAF) 1344.28Users and Groups 137Users 137 User Defaults 142 Groups 143 Login Settings 1444.29Custom User Scripts 145Pre-Install Scripts 145 Post-partitioning Scripts 146 ChrootEnvironment Scripts 147 Post-Install Scripts 147 InitScripts 147 Script XML Representation 149 Script Example 1524.30System Variables (Sysconfig) 1544.31Adding Complete Configurations 1554.32Ask the User for Values during Installation 157Default Value Scripts 166 Scripts 1674.33Kernel Dumps 172Memory Reservation 173 Dump Saving 174 E-MailNotification 177 Kdump Kernel Settings 178 Expert Settings 180v4.34DNS Server 1804.35DHCP Server 183AutoYaST Guide

4.36Firewall Configuration 186General Firewall Configuration 187 Firewall Zones Configuration 188 AFull Example 1894.37Miscellaneous Hardware and System Components 190Printer 190 Sound devices 1914.38Importing SSH Keys and Configuration 1924.39Configuration Management 193Connecting to a Configuration Management Server 193 Running in Standalone Mode 195 SUSE Manager Salt Formulas Support 196IIIMANAGING MASS INSTALLATIONS WITH RULES AND CLASSES 1975Rules and Classes 1985.1Rule-based Automatic Installation 198Rules File Explained 199 Custom Rules 202 MatchTypes for Rules 202 Combine Attributes 203 Rules FileStructure 203 Predefined System Attributes 204 Rules withDialogs 2065.2Classes 2095.3Mixing Rules and Classes 2115.4Merging of Rules and Classes 211IVUNDERSTANDING THE AUTO-INSTALLATION PROCESS 2146The Auto-Installation Process 2156.1Introduction 215X11 Interface (graphical) 215 Serial Console 215 Text-based YaSTInstallation 2156.2Choosing the Right Boot Medium 216Booting from a Flash Disk (for example, a USB stick) 216 Booting from theSUSE Linux Enterprise Installation Media 217 Booting via PXE over theNetwork 217viAutoYaST Guide

6.3Invoking the Auto-Installation Process 218Command Line Options 218 Auto-installing a SingleSystem 224 Combining the linuxrc info File with the AutoYaST ControlFile 2256.4System Configuration 225Post-Install and System Configuration 226 System Customization 226VUSES FOR AUTOYAST ON INSTALLED SYSTEMS 2277Running AutoYaST in an Installed System 228VIAPPENDICES 230AHandling Rules 231BAutoYaST FAQ—Frequently Asked Questions 232CAdvanced linuxrc Options 236C.1Passing Parameters to linuxrc 236C.2info File Format 237C.3Advanced Network Setup 239DD.1Differences Between AutoYaST Profiles in SLE 42.3 and15 241Partitioning 241GPT Becomes the Default Partition Type on AMD64/Intel 64 241 SettingPartition Numbers 241 Forcing Primary Partitions 242 Btrfs: DefaultSubvolume Name 242 Btrfs: Disabling Subvolumes 242 Reading anExisting /etc/fstab Is No Longer Supported 243 Setting for AligningPartitions Has Been Dropped 243 Using the type to Define an VolumeGroup 243D.2Firewall Configuration 243Assigning Interfaces to Zones 245 Opening Ports 247 Openingfirewalld Services 248 For More Information 249viiAutoYaST Guide

D.3NTP Configuration 249D.4AutoYaST Packages Are Needed for the Second Stage 250D.5The CA Management Module Has Been Dropped 250D.6Upgrade 251Software 251viiiAutoYaST Guide

1 Introduction to AutoYaST1.1 MotivationStandard installations of openSUSE Leap are based on a wizard work ow. This is user-friendlyand e cient when installing on few machines. However, it becomes repetitive and timeconsuming when installing on many machines.To avoid this, you could do mass deployments by copying the hard disk of the rst successfulinstallation. Unfortunately, that leads to the issue that even minute con guration changesbetween each machine need to later be dealt with individually. For example, when using staticIP addresses, these IP addresses would need to be reset for each machine.A regular installation of openSUSE Leap is semi-automated by default. The user is promptedto select the necessary information at the beginning of the installation (usually language only).YaST then generates a proposal for the underlying system depending on di erent factors andsystem parameters. Usually—and especially for new systems—such a proposal can be used toinstall the system and provides a usable installation. The steps following the proposal are fullyautomated.AutoYaST can be used where no user intervention is required or where customization is required.Using an AutoYaST control le, YaST prepares the system for a custom installation and does notinteract with the user, unless speci ed in the le controlling the installation.AutoYaST is not an automated GUI system. This means that usually many screens will be skipped—you will never see the language selection interface, for example. AutoYaST will simply passthe language parameter to the sub-system without displaying any language related interface.1.2 Overview and ConceptUsing AutoYaST, multiple systems can easily be installed in parallel and quickly. They need toshare the same environment and similar, but not necessarily identical, hardware. The installationis de ned by an XML con guration le (usually named autoinst.xml ) called the “AutoYaSTcontrol le”. It can initially be created using existing con guration resources easily be tailoredfor any speci c environment.1MotivationopenSUSE Leap 15.2

AutoYaST is fully integrated and provides various options for installing and con guring asystem. The main advantage over other auto-installation systems is the possibility to con gurea computer by using existing modules and avoiding using custom scripts which are normallyexecuted at the end of the installation.This document will guide you through the three steps of auto-installation:Preparation: All relevant information about the target system is collected and turned intothe appropriate directives of the control le. The control le is transferred onto the targetsystem where its directives will be parsed and fed into YaST.Installation: YaST performs the installation of the basic system using the data from theAutoYaST control le.Con guration: After the installation of the basic system, the system con guration isperformed in the second stage of the installation. User-de ned post-installation scriptsfrom the AutoYaST control le will also be executed at this stage.Note: Second StageA regular installation of openSUSE Leap 15.2 is performed in a single stage. The auto-installation process, however, is divided into two stages. After the installation of the basicsystem the system boots into the second stage where the system con guration is done.The packages autoyast2 and autoyast2-installation need to be installed to run thesecond stage in the installed system correctly. Otherwise an error will be shown beforebooting into the installed system.The second stage can be turned o with the second stage parameter: general mode confirm config:type "boolean" false /confirm second stage config:type "boolean" false /second stage /mode /general 2Overview and ConceptopenSUSE Leap 15.2

The complete and detailed process is illustrated in the following gure:FIGURE 1.1: AUTO-INSTALLATION PROCESS3Overview and ConceptopenSUSE Leap 15.2

I Understanding and Creating theAutoYaST Control File2The AutoYaST Control File 53Creating an AutoYaST Control File 9

2 The AutoYaST Control File2.1 IntroductionThe control le is a con guration description for a single system. It consists of sets of resourceswith properties including support for complex structures such as lists, records, trees and largeembedded or referenced objects.Important: Control Files from OS Releases Older Than SLES12 GA and openSUSE 42.0 Are IncompatibleMany major changes were introduced with SLES 12 and openSUSE Leap 42.0, such asthe switch to systemd and GRUB 2. These changes also required fundamental changes inAutoYaST Therefore you cannot use AutoYaST control les created on SLES 11 to installopenSUSE Leap 15.2 and vice versa.2.2 FormatThe XML con guration format provides a consistent le structure, which is easy to learn and toremember when attempting to con gure a new system.The AutoYaST control le uses XML to describe the system installation and con guration. XMLis a commonly used markup, and many users are familiar with the concepts of the language andthe tools used to process XML les. If you edit an existing control le or create a control leusing an editor from scratch, it is strongly recommended to validate the control le. This canbe done using a validating XML parser such as xmllint or jing , for example (see Section 3.3,“Creating/Editing a Control File Manually”).The following example shows a control le in XML format:EXAMPLE 2.1: AUTOYAST CONTROL FILE (PROFILE) ?xml version "1.0"? !DOCTYPE profile profilexmlns "http://www.suse.com/1.0/yast2ns"xmlns:config "http://www.suse.com/1.0/configns" partitioning config:type "list" 5IntroductionopenSUSE Leap 15.2

drive device /dev/sda /device partitions config:type "list" partition filesystem config:type "symbol" btrfs /filesystem size 10G /size mount / /mount /partition partition filesystem config:type "symbol" xfs /filesystem size 120G /size mount /data /mount /partition /partitions /drive /partitioning scripts pre-scripts script interpreter shell /interpreter filename start.sh /filename source ![CDATA[#!/bin/shecho "Starting installation"exit 0]] /source /script /pre-scripts /scripts /profile 2.3 StructureBelow is an example of a basic control le container, the actual content of which is explainedlater on in this chapter.EXAMPLE 2.2: CONTROL FILE CONTAINER ?xml version "1.0"? !DOCTYPE profile profile6StructureopenSUSE Leap 15.2

xmlns "http://www.suse.com/1.0/yast2ns"xmlns:config "http://www.suse.com/1.0/configns" !-- RESOURCES -- /profile The profile element (root node) contains one or more distinct resource elements. Thepermissible resource elements are speci ed in the schema les2.3.1Resources and PropertiesA resource element either contains multiple and distinct property and resource elements, ormultiple instances of the same resource element, or it is empty. The permissible content of aresource element is speci ed in the schema les.A property element is either empty or contains a literal value. The permissible property elementsand values in each resource element are speci ed in the schema lesAn element can be either a container of other elements (a resource) or it has a literal value (aproperty); it can never be both. This restriction is speci ed in the schema les. A con gurationcomponent with more than one value must either be represented as an embedded list in aproperty value or as a nested resource.An empty element, such as foo /foo or bar/ , will not be present in the parsed datamodel. Usually this is interpreted as wanting a sensible default value. In cases where you needan explicitly empty string instead, use a CDATA section: foo ![CDATA[]] /foo .2.3.2Nested ResourcesNested resource elements allow a tree-like structure of con guration components to be builtto any level.There are two kinds of nested resources: maps and lists. Maps, also known as associative arrays,hashes, or dictionaries, contain mixed contents, identi ed by their tag names. Lists, or arrays,have all items of the same type.EXAMPLE 2.3: NESTED RESOURCES. drive device /dev/sda /device partitions config:type "list" partition 7Resources and PropertiesopenSUSE Leap 15.2

size 10G /size mount / /mount /partition partition size 1G /size mount /tmp /mount /partition /partitions /drive .In the example above, the drive resource is a map consisting of a device property anda partitions resource. The partitions resource is a list containing multiple instances ofthe partition resource. Each partition resource is a map containing a size and mountproperty.The default type of a nested resource is map. Lists must be marked as such using theconfig:type "list" attribute.2.3.3AttributesGlobal attributes are used to de ne metadata on resources and properties. Attributes are usedto de ne context switching. They are also used for naming and typing properties as shown inthe previous sections. Attributes are in a separate namespace so they do not need to be treatedas reserved words in the default namespace.The config:type attribute determines the type of the resource or property in the parsed datamodel. For resources, lists need a list type whereas a map is the default type that does notneed an attribute. For properties, boolean , symbol , and integer can be used, the defaultbeing a string.Attributes are not optional. It may appear that attributes are optional, because variousparts of the schema are not very consistent in their usage of data types. In some placesan enumeration is represented by a symbol, elsewhere a string is required. One resourceneeds config:type "integer" , another will parse the number from a string property. Someresources use config:type "boolean" , others want yes or even 1 . If in doubt, consult theschema le.8AttributesopenSUSE Leap 15.2

3 Creating an AutoYaST Control File3.1 Collecting InformationTo create the control le, you need to collect information about the systems you are going toinstall. This includes hardware data and network information among other things. Make sureyou have the following information about the machines you want to install:Hard disk types and sizesGraphical interface and attached monitor, if anyNetwork interface and MAC address if known (for example, when using DHCP)Also verify that both autoyast2-installation and autoyast2 are installed.3.2 Using the Configuration Management System(CMS)To create the control le for one or more computers, a con guration interface based on YaSTis provided. This system depends on existing modules which are usually used to con gure acomputer in regular operation mode, for example, after openSUSE Leap is installed.The con guration management system lets you easily create control les and manage arepository of con gurations for use in a networked environment with multiple clients.9Collecting InformationopenSUSE Leap 15.2

FIGURE 3.1: CONFIGURATION SYSTEM3.2.1Creating a New Control FileThe easiest way to create an AutoYaST pro le is to use an existing openSUSE Leap systemas a template. On an already installed system, start YaST Miscellaneous Autoinstallation.Now select Tools Create Reference Pro le from the menu. Choose the system components youwant to include in the pro le. Alternatively, create a pro le containing the complete systemcon guration by running sudo yast clone system from the command line.Both methods will create the le /root/autoinst.xml . The version created on the commandline can be used to set up an identical clone of the system on which the pro le was created.However, usually you will want to adjust the le to make it possible to install several machinesthat are very similar, but not identical. This can be done by adjusting the pro le using yourfavorite text/XML editor.With some exceptions, almost all resources of the control le can be con gured using thecon guration management system. The system o ers exibility and the con guration of someresources is identical to the one available in the YaST control center. In addition to the existingand familiar modules new interfaces were created for special and complex con gurations, forexample for partitioning, general options and software.10Creating a New Control FileopenSUSE Leap 15.2

Furthermore, using a CMS guarantees the validity of the resulting control le and its direct usefor starting automated installation.Make sure the con guration system is installed (package autoyast2 ) and call it using the YaSTcontrol center or as root with the following command (make sure the DISPLAY variable is setcorrectly to start the graphical user interface instead of the text-based one):/sbin/yast2 autoyast3.3 Creating/Editing a Control File ManuallyIf editing the control le manually, make sure it has a valid syntax. To check the syntax, use thetools already available on the distribution. For example, to verify that the le is well-formed(has a valid XML structure), use the utility xmllint available with the libxml2 package:xmllint control file If the control le is not well for

3 Overview and Concept openSUSE Leap 15.2. I Understanding and Creating the AutoYaST Control File 2 The AutoYaST Control File 5 3 Creating an AutoYaST Control File 9. 2 The AutoYaST Control File 2.1 Introduction The control le is a conguration descript

Related Documents:

AutoYaST is a system for unattended mass deployment of openSUSE Leap systems using an AutoYaST prole containing installation and conguration data. The manual guides you through the basic steps of auto-installation: preparation, installat

Furthermore, it also has pre-installed DNS and DHCP servers. Therefore, Linux OpenSUSE is selected for the development for ACME Company. 3.1.1.1. Linux OpenSUSE The openSUSE is a P operating system based on GNU and Linux (Opensuse-guide.org, 2015). It is licence free and an alternative to Microsoft Windows and Mac; it possess several advantages.

Program, Lead Developer of LEAP October 27 th 2021 https://leap.sei.org. leap@sei.org . https://leap.sei.org Outline Quick introduction to the LEAP . LEAP's User Interface is being updated to take advantage of the new 4K resolution monitors, including newly high-res icons and an optional dark mode.

www.novell.com novdocx (en) 26 August 2007 openSUSE 10.3 GNOME User Guide openSUSE 10.3 October 12, 2007 GNOME USER GUIDE

openSUSE Tumbleweed Tumbleweed is openSUSE's rolling release openQA is an integral part of Tumbleweed development In depth testing is then carried out on the whole distribution before release openSUSE Tumbleweed snapshots released after successful testing New Tumbleweed release every 2-3 days, often faster.

Preparing the Host Operating System (openSUSE) The following example is based on openSUSE 12.2. Newer versions may differ. Begin with a standard installation. Download an ISO for the distribution of your choice (i.e. www.opensuse.org) and burn it to a blank DVD. Boot your server to the installation DVD and follow the on-screen prompts.

openSuse The Haxe Foundation maintains the Haxe and Neko RPM packages in the openSUSE:Factory repository. The packages are up-to-date most of the time. However, when a new version of Haxe is released, it will take a few days, up to 2 weeks, to be accepted by openSUSE:Factory.

Alfredo Lopez Austin/ Leonardo Lopeb anz Lujan,d Saburo Sugiyamac a Institute de Investigaciones Antropologicas, and Facultad de Filosofia y Letras, Universidad Nacional Autonoma de Mexico bProyecto Templo Mayor/Subdireccion de Estudios Arqueol6gicos, Instituto Nacional de Antropologia e Historia, Mexico cDepartment of Anthropology, Arizona State University, Tempe, AZ 85287-2402, USA, and .