Transcript
Page 1: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

YaST® and AutoYaSTMake The Difference

Thomas Göttlicher Jiří Šrain

Project Manager Project Manager

[email protected] [email protected]

Page 2: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

2

YaST

Page 3: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

3

Security Center and Hardening Module

Page 4: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

4

Security Center and Hardening

yast2 security

Page 5: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

5

Security Center and Hardening (cont'd)

yast2 security

Page 6: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

6

Debugging

Page 7: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

7

Debugging

• Turn on debugging messages:Y2DEBUG=1 yast2 network

• Read YaST log file:

tail -f /var/log/YaST2/y2log

• Run the YaST debugger (byebug)

Y2DEBUGGER=1 yast2 network

Page 8: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

8

Debugging (cont’d)

Page 9: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

9

Feature: Hotkeys

Page 10: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

10

Hotkeys

• Crtl + Shift + Alt + X Run xterm

• Shift + F7 Debug level

• Print Screenshot

• Shift + F8 Save logs

• Ctrl + Shift + Alt + M Start/stop macro recorder

• Ctrl + Shift + Alt + P Play macro

• Ctrl + Shift + Alt + S Style sheet editor

Page 11: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

11

Feature: Themes

Page 12: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

12

Themes in YaST2 QT

• Support for CSS-like stylesheets

• Customize installation

• For visually impaired users

• Default is style.qss or installation.qss in /usr/share/YaST2/theme/current/wizard/

• $Y2STYLE contains name of stylesheet

• Y2STYLE=installation.qss yast2 disk --qt

Page 13: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

13

Themes in YaST2 QT (cont'd)

Page 14: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

14

Themes in YaST2 QT (cont'd)

Page 15: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

15

Themes in YaST2 QT (cont'd)

Page 16: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

16

Themes in YaST2 ncurses

• File: /etc/sysconfig/yast2

• Variable: Y2NCURSES_COLOR_THEME=”mono”

• Also “braille” available for visually impaired

Page 17: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

17

Themes in YaST2 ncurses (cont'd)

• File: /etc/sysconfig/yast2

• Variable: Y2NCURSES_COLOR_THEME=”mono”

• Also “braille” available for visually impaired

Page 18: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

18

Feature: Driver Update

Page 19: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

19

Driver Update

• Replace packages in your installation system

• Use RPM packages or cpio archives

• File on a web server contains a list of rpm packages

• Example file on http://foo.bar/list:

dud=http://foo.bar/bash.rpm dud=http://foo.bar/yast2.rpm

Page 20: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

20

Driver Update (cont'd)

Page 21: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

21

Driver Update (cont'd)

Page 22: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

22

Feature: Automated Installer Update

Page 23: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

23

Automated Installer Update

• Repository with installer updates available at updates.suse.com– Set of DUDs packaged as RPMs

• Updates applied transparently when requested– self_update=1 on kernel command-line to enable

– self_update=<url> enable with custom repository

– Restart of YaST necessary

• SMT support for networks without access to update server– Remember to mirror the installer updates repository

Page 24: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

24

Feature: Remote Installation

Page 25: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

25

Remote Installation

• Install SUSE® Linux Enterprise remotely over the network

• Configure settings at the boot prompt:

– Network:

hostip=192.168.1.123/24

– Installation source:

install=ftp://192.168.1.100/pub/suse

install=http://192.168.1.100/suse

Page 26: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

26

Remote Installation (cont'd)

• Installation via:

– VNC (Virtual Network Computing)

vnc=1

vncpassword=susecon2016

– SSH (Secure Shell)

ssh=1

sshpassword=susecon2016

Page 27: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

27

Remote Installation (cont'd)

Page 28: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

28

Remote Installation (cont'd)

• Connect to host via vncviewer hostip :1

Page 29: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

29

System Roles

Page 30: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

30

System Roles

• Predefined default configuration

• Covers partitioning and software selection– Further areas covered in next releases

– Different settings for different scenarios

• System Roles in SLES12-SP2– Standard System

– KVM virtualization host

– XEN virtualization host

Page 31: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

31

Macro Recorder

Page 32: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

32

Macro Recorder

• Recorder and player for user interaction

• Records logical actions like – OK button pressed

– Username field contains “tux”

• Macros from text interface work in graphical interface and vice versa

• Automation for QA testers and power users

Page 33: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

33

Macro Recorder (cont'd)

• Alt + Crtl + Shift + M Start recording

• Alt + Crtl + Shift + M Stop recording

Page 34: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

34

Macro Recorder (cont'd)

• Play a recorded macro:

Alt + Ctrl + Shift + P

• Run macros from the command line:/usr/lib/YaST2/bin/y2base modulename qt --macro macro.ycp

• Macros are not a substitution for AutoYaST

Page 35: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

35

AutoYaST

Page 36: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

36

AutoYaST

● AutoYaST is the SUSE® Linux Enterprise automated installation method that leverages standard installation processes with predefined rules and responses to create reproduceable OS builds

● Caution: Can reduce the time to provision a new SUSE Linux Enterprise machine to less than 10 minutes

Page 37: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

37

When to Use AutoYaST

• Linux is your primary OS or you need deployment on demand

• Dealing with a wide range of machines

• Constantly changing hardware or a wide variety of hardware

• Constantly changing software requirements

• Only installing a few machines at a time

• Staff has varying Linux expertise

Page 38: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

38

When to Use Imaging

• Need to support multiple operating systems

• Have a large number of identical systems to support

• Limited applications to support or you are using an application deployment system (I.e., thin images and SUSE® Studio)

• Limited number of hardware platforms

• Few images are needed

Page 39: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

39

SUSE® Manager

• Best of both worlds with support for AutoYaST, multi-cast and integrated support for SUSE Studio images.

Page 40: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

40

Create an Installation Server

Page 41: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

41

Installation Server Specification

• Disk Space

– 5GB plus enough disk space to hold the Linux distributions you will use

• Processor/RAM

– Any system fulfilling the requirements of SUSE Linux Enterprise Server

• Apache installed

– HTTP is easiest to use and URLs can be manipulated via Apache

– Windows and other operating systems can be used if you already have an existing web server

– Alternatively you can use FTP, NFS, or Samba for installation.

Page 42: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

42

Firewall Settings

• Disable Firewall

– You can temporarily turn it off completely

– Re-enable after installation

• Or open the necessary ports

– HTTP (80), HTTPS (443), TFTP (69), DHCPD (547)

• YaST can help you

Page 43: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

43

YaST: Configure Installation Server

YaST installs and configures Apache and copies the source media to the system

Page 44: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

44

Verify the Installation Source

• Append e.g. /README if server forbids directory listing

Page 45: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

45

Installing from Network

• Boot with standard installation DVD

Page 46: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

46

Boot Options

• install=http://hostname/path/to/DVD1

• If there is no DHCP on your network, you can use:

– hostip=<ip address> netmask=<mask>

– ie: hostip=172.17.2.1 netmask=255.255.255.0

– use gateway=<gateway> if the Installation server is on a different subnet

Page 47: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

47

Create an AutoYaST profile

Page 48: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

48

Clone an Existing Machine

• Tools→Create Reference Profile

• File → Save

Page 49: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

49

AutoYaST Profile

• Plain text, XML

• Can be customized using:– YaST Autoinstallation Module

– Text Editor (vi, emacs, kate, etc.)

• Experiment with the Autoinstallation module and view the changes made in the XML

Page 50: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

50

Sample AutoYaST Profile

<?xml version="1.0"?>

<!DOCTYPE profile>

<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">

<users config:type="list">

<user>

<username>root</username>

<user_password>myrootpassword</user_password>

<encrypted config:type="boolean">false</encrypted>

</user>

</users>

</profile>

Page 51: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

51

AutoYaST Profile (cont’d)Most often changed settings

• <software>

– Selecting patterns is usually enough

– Individual packages can be selected if necessary

• <partitioning>

– Change <size> to fixed size for swap and other partitions (ie 2GB) and “auto” to span the remainder of the disk

• When profile was created as a machine clone, review the whole profile and remove any machine-specific settings

Page 52: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

52

Starting AutoYaST installation

• install=http://hostname/path/to/DVD1

• autoyast2=http://hostname/path/to/profile.xml

Page 53: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

53

Booting Installation from Network

Page 54: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

54

Preboot Execution Environment (PXE)

Part of the firmware of most modern network cards, PXE leverages

DHCP (Dynamic Host Configuration Protocol) to find an available PXE

server to download a network bootstrap program (NBP) to the

computer's RAM using TFTP (Trivial File Transfer Protocol). Once in

RAM, the NBP can execute and download installation or other

software, removing the need for installation media.

Page 55: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

55

Setting Up a PXE Server

• Find out the requirements– Different bootloader needed for legacy, uEFI, SecureBoot,…

– Install respective packages (DHCP server, TFTP, bootloader, xinetd)

• Copy the Linux kernel and initrd (initial ramdisk) from the source media (or installation directory):

– cp boot/x86_64/loader/linux /srv/tftpboot

– cp boot/x86_64/loader/initrd /srv/tftpboot

– Similarly for other architectures

Page 56: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

56

Setting Up a PXE Server (cont’d)

• Configure the TFTP server– YaST can help you

– Create directory structure to hold the boot loader, kernel, initrd and config files

• Configure the DHCP server

– Following options need to be set:● allow booting;● allow bootp;● next-server 172.17.2.70; #TFTP server IP● filename "pxelinux.0"; #path on TFTP server

– May need to be set differently for different hosts

Page 57: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

57

Upgrade with AutoYaST

Page 58: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

58

Upgrade with AutoYaST

• Possible upgrade paths– From SLES11 to SLES12

– From one SLES12 service pack to a newer one

• Boot options

– autoupgrade=1 autoyast2=http://example/autoinst.xml

– autoupgrade=1 and leave the profile in the root of the system

Page 59: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

59

New Sections in AutoYaST profile

• upgrade

• software

• networking

• backup

Page 60: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

60

New Sections in AutoYaST profile (cont’d)

<upgrade> <only_installed_packages config:type="boolean"> false </only_installed_packages> <stop_on_solver_conflict config:type="boolean"> true </stop_on_solver_conflict></upgrade>

Page 61: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

61

New Sections in AutoYaST profile (cont’d)

<software> <packages config:type="list"> <package>autoyast2-installation</package> </packages> <patterns config:type="list"> <pattern>base</pattern> </patterns> <remove-packages config:type="list"/> <remove-patterns config:type="list"/></software>

Page 62: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

62

New Sections in AutoYaST profile (cont’d)

<networking> <keep_install_network config:type="boolean"> true </keep_install_network></networking>

Page 63: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

63

New Sections in AutoYaST profile (cont’d)

<backup> <sysconfig config:type="boolean">true</sysconfig> <modified config:type="boolean">true</modified> <remove_old config:type="boolean">false</remove_old></backup>

Page 64: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

64

Booting AutoYaST upgrade

Page 65: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

65

AutoYaST Upgrade Summary

Page 66: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

66

AutoYaST Upgrade: Dependency conflicts

• Dependency conflicts quite likely

• Require manual intervention

• Find adjusted profile in the system after upgrade

Page 67: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

67

Session References

• TUT88423 - Upgrading SLES 11 to SLES 12

• TUT88693 - System Security Hardening

• HO88467 - SUSE Manager for Dummies v.3

Page 68: YaST and AutoYaST Make The Difference - SUSE LinuxSetting Up a PXE Server (cont’d) • Configure the TFTP server – YaST can help you – Create directory structure to hold the

Top Related