Engineering with SUSE Linux Enterprise Server

Transcription

Engineering with SUSE Linux Enterprise Server
Engineering with SUSE
Linux Enterprise Server
®
Hardware engineers share their experience in
developing solutions
Craig Lamparter
Linux Systems/Software Engineer
Hewlett Packard Enterprise
Bryan Gartner
Sr. Technology Strategist
SUSE
HPE's history with Linux, Unix & OSS
•
Unix (HPUX) product development since 1984
•
HPE works with SUSE on hardware enablement and
high-end server kernels
•
HPE cross-branding and marketing with SUSE
•
Linux kernel developers committing code upstream
‒
•
HPE publishes Linux tooling software under GPL
‒
•
HPE contributes to more than 60 GPL-licensed projects
HPE donates to Linux/OSS organizations
‒
2
hpsa, hpwdt, iommu, hpilo
kernel.org, OpenStack, Debian Partner, Linux Foundation,
OSDL
Overview of SUSE Linux Enterprise
Usage in HPE
•
•
•
3
HPE's factory floor uses SUSE Linux Enterprise
Server to build/init ProLiants
‒
PXE boot, sles kernel, custom ramdisc with drivers
‒
Automated diagnostics and burn-in
‒
Apply server personality, birth certificate in AMS log
HPE Information Technology
‒
Largely SAP-HANA workloads
‒
LinuxCOE Provisioning process
‒
SUSE patch distribution, lifecycle support process
Intelligent Provisioning firmware
‒
Boots a Linux environment from firmware
‒
Linux tools to configure hardware & arrays, install distribution
Typical ProLiant SUSE provisioning process
Inteligent
Provisioning
firmware
setup array
Bios configs
Optionally
Point zypper at
Insert installer
install hp
HP Software
Boot suse kiso
media,
agent
software
(bootable driver kit)
Delivery
install linux
firmware,
Repository
drivers
downloads.linux.hp.com
kiso
4
Let's install SUSE Linux Enterprise
Server on ProLiant!
Installing SUSE Linux Enterprise
Server on ProLiant
Press [F10] to enter
Intelligent Provisioning
Fun fact: This is SUSE Linux Enterprise Server
under the hood!
6
Installing SUSE Linux Enterprise
Server on ProLiant
“Array Configuration”
7
Installing SUSE Linux Enterprise
Server on ProLiant
kiso
SUSE kiso boots, loads drivers,
then prompts for traditional
installation media
8
Installing SUSE Linux Enterprise
Server on ProLiant
SLES
installation
Complete!
9
Installing SUSE Linux Enterprise Server
without a kiso driver disc
(generate custom initial ramdisc for use with proto-hardware)
Customizing the initial ramdisc
•
Hardware manufacturers aren't provided driver discs for
their new hardware
•
A quick/easy R&D approach to adding drivers is to
generate a custom initial ramdisc (initrd)
1) Compile new drivers (.ko kernel objects)
2) Loop mount an existing initrd from SUSE Linux Enterprise Server
3) Drop the newly compiled kernel objects in the initrd
4) Repackage/compress the initrd, place on PXE server or DVD.
5) Configure PXE or grub to load the new ramdisc
11
The Linux boot process
12
‒
Grub loads the Linux kernel into memory via disc or pxe roms
‒
Grub loads the initial ramdisc into memory
‒
The ramdisc is temporarily mounted as the root filesystem
‒
Boot-essential drivers (nics and storage) are in /lib/modules
on ramdisc and linked with the running kernel
‒
Physical storage media is detected and initialized
‒
The kernel runs /init from the ramdisc, which runs YaST
‒
YaST begins the installation process
Custom initrd generation example
1) Loop mount the existing SUSE initrd
susevm:/boot # cp initrd-3.0.76-0.11-craiger2 /tmp
susevm:/boot # cd /tmp
susevm:/tmp # file initrd-3.0.76-0.11-craiger2
initrd-3.0.76-0.11-craiger2: gzip compressed data, from Unix, last
modified: Fri Sep 13 10:31:58 2013, max compression
susevm:/tmp # mkdir initrd.dir
susevm:/tmp # cd initrd.dir/
susevm:/tmp/initrd.dir # zcat ../initrd-3.0.76-0.11-craiger2 | cpio -id
89290 blocks
susevm:/tmp/initrd.dir # ls
bin boot config dev etc
root run_all.sh sbin sys
13
init lib lib64
tmp usr var
mkinitrd.config
proc
Custom initrd generation example
2) Install your custom kernel objects (drivers)
susevm:/tmp/initrd.dir/lib/modules/3.0.76-0.11-craiger2/kernel/drivers #
# mkdir custom
# cd custom
# cp ~/craiger/craiger.ko .
# depmod -a -b /tmp/initrd.dir
# cd /tmp/initrd.dir/lib/modules/3.0.76-0.11-craiger2
# grep craiger.ko modules.dep.bin
Binary file modules.dep.bin matches
14
Custom initrd generation example
3) Repackage initrd, configure boot loader to use it
# cd /tmp/initrd.dir/
# vi init
/sbin/modprobe craiger
# find . | cpio -H newc -o > /tmp/initrd.new
# cp /tmp/initrd.new /boot
# vi /boot/grub/menu.lst
###Don't change this comment - YaST2 identifier: Original name: linux###
title Craiger -- SUSE with Secureboot enable 11 SP3 - 3.0.76-0.11-craiger2
root (hd0,1)
kernel (hd0,1)/boot/vmlinuz-3.0.76-0.11-craiger2 root=/dev/sda2
resume=/dev/sda1 splash=silent secureboot_enable=1 crashkernel= showopts
#
initrd /boot/initrd-3.0.76-0.11-craiger2
initrd /boot/initrd.new
15
Custom initrd generation example
4) Reboot, verify module loaded
# lsmod | grep craiger
craiger
12426
0
# dmesg | grep -i craiger
[
0.808527] craiger: module license 'unspecified' taints kernel.
[
0.808761] Craigers kernel module was loaded.
16
Installing SUSE Linux Enterprise Server
in IT/Production environment
(ie, SAP servers)
IT/Production provisioning
•
On the factory floor, everything is done in ramdisc with
the only persistent changes happening in nvram (ie,
easy)
•
In IT production environments we
•
18
HPE
IT
‒
Configure arrays
‒
Install SUSE Linux Enterprise Server on the root volume
‒
Apply patches from SUSE
‒
Install management software
‒
Install additional HP drivers if needed
‒
Assign system role, install application software
All of this must be automated in order to scale to
1000's of hosts
LinuxCOE SUSE provisioning
•
19
HPE Linux Common Operating Environment
‒
Open source project on sourceforge
‒
Automated hands-free-network-based provisioning process
‒
Design a custom system profile using a web interface
‒
Generate custom boot discs
‒
Automate installation process with SUSE AutoYaST
‒
Waystation software distribution network
•
http://instalinux.com External example
•
http://sourceforge.net/projects/linuxcoe/ Source
Patching
•
•
SUSE “smt-mirror”
‒
Create a local mirror of all SUSE updates for a distribution
‒
Generate yum index for each version of SUSE Linux
Enterprise Server you support
‒
Rsync repository globally to LinuxCOE waystations
‒
LinuxCOE automatically populates /etc/zypp/repos.d
Apply all relevant patches
‒
•
20
# zypper update
Traditional yast/zypper updates are nice but we need
one tool/process for all distros (yum/zypp/apt)
Example SUSE Linux
Enterprise Server Workload
•
SAP HANA
‒
In-memory database
‒
“appliance” servers, pre-configured, delivered to datacenter
‒
Normally 2 months from dock to production for five racks
‒
Converged/appliance systems approach is only requires three days
‒
HPE currently employs 90 racks
‒
21
180TB in-memory data
HPE Software Delivery Repository
SUSE Linux Enterprise Server Service Pack for
ProLiant
Drivers
Agent software
Firmware
Drivers, agent software, firmware
•
HPE Software Delivery Repository
‒
Service Pack for ProLiant (SPP)
‒
Management agents (array config, snmp agents, health monitoring)
‒
Kmp-packaged drivers from HP and partners
‒
Firmware updates in rpm packages
‒
Integrates with zypper & yast
http://downloads.linux.hpe.com
23
downloads.linux.hp.co
m
Configure system to
pull packages from the
Service Pack for
ProLiant
add_repo.sh
spp
24
wget
add_repo.s
h
Subscribe
to the spp
repository
Note: You
could put the
repo in YaST
just as easily
too!
25
zypper install hpsssacli
(array config utility)
Run hpssacli
26
HPE drivers for SUSE Linux Enterprise
Server
Search for suse drivers
In the spp
(zypper search kmp-default)
27
HPE firmware pack for ProLiant (fwpp)
# zypper search hp-firmware
28
29
Unpublished Work of SUSE LLC. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE LLC.
Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of
their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated,
abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE.
Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a
product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document,
and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The
development, release, and timing of features or functionality described for SUSE products remains at the sole
discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at
any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in
this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All
third-party trademarks are the property of their respective owners.