UNIX to SUSE Linux Enterprise Server : Tools and Tips for a Successful Migration
Upcoming SlideShare
Loading in...5
×
 

UNIX to SUSE Linux Enterprise Server : Tools and Tips for a Successful Migration

on

  • 4,444 views

Tired of expensive, proprietary UNIX systems? Today’s IT professionals are making strategic investments in Linux, preferring its open architecture and low cost to the proprietary—and very ...

Tired of expensive, proprietary UNIX systems? Today’s IT professionals are making strategic investments in Linux, preferring its open architecture and low cost to the proprietary—and very expensive—UNIX platform. This session will target all those who are looking to move their software application from UNIX to SUSE Linux Enterprise. We will cover the programming languages, developer tools, and programming APIs that are available for many software applications types. We will also discuss how to plan and structure a porting project for SUSE Linux Enterprise Server.

Statistics

Views

Total Views
4,444
Views on SlideShare
4,429
Embed Views
15

Actions

Likes
3
Downloads
168
Comments
0

1 Embed 15

http://www.slideshare.net 15

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

UNIX to SUSE Linux Enterprise Server : Tools and Tips for a Successful Migration UNIX to SUSE Linux Enterprise Server : Tools and Tips for a Successful Migration Presentation Transcript

  • Unix to SUSE Linux ® Enterprise Server Tools and Tips for a Successful Migration Darren R. Davis PK Mishra Sr. Manager ISV Engineering Principal Consulting Architect ddavis@novell.com Novell India pmishra@novell.com
  • Enterprises Are Migrating from UNIX to Linux Worldwide Server Operating Environment Forecast UNIX Migration Path by UNIX Platform Paid Linux vs Paid UNIX Installed Base (million servers) 100% 2% 2% 4% 4% 4% 9 10% 6% 3% 8.3 90% 21% 23% Not sure 8 7.7 10% 15% 80% Linux UNIX 26% 7 6.9 39% 70% 20% Other Installed Base 6.0 6 60% 29% 26% 5.2 5 21% 50% 47% 6% Unix 4.4 4 3.8 40% 35% 3.2 3.0 2.9 30% Linux 3 2.8 2.6 2.5 2.4 40% 40% 40% 20% 36% 2 23% 20% Windows 2006 2007 2008 2009 2010 2011 2012 10% Year 0% Source: WW Client and Server Operating Environments 2008-2012 Forecast, IDC April 2008 Solaris SCO AIX Other Unix HP UX HP Tru64 (N=343) (N=20) (N=225) (N=43) (N=249) (N=52) Source: IDC UNIX Migration Survey, 2006 Why are they migrating? More innovation Better price Less risk performance 2 © Novell, Inc. All rights reserved.
  • What is UNIX? • UNIX is a registered trademark of the Open Group – http://www.unix.org/ and http://www.opengroup.org/ – A set of specifications for defining operating system interfaces > Single UNIX Specification Version 3 > UNIX 98, UNIX 03 > IEEE POSIX > ISO C – Products are certified by the Open Group to meet the UNIX specification (AIX, HP/UX, Mac OS X, SCO, Solaris) – UNIX was a product (SVR3, SVR4), but now it is a specification. • Linux is based on the UNIX specifications – Linux standard base 3 © Novell, Inc. All rights reserved. View slide
  • Who Is Migrating? www.novell.com/success 4 © Novell, Inc. All rights reserved. View slide
  • Agenda Server Migration Considerations Application Porting Considerations Tools and Resources Next Steps 5 © Novell, Inc. All rights reserved.
  • Server Migration Considerations
  • System Administrator View • Solaris Boot Manager vs GRUB / LILO • Both support a variety of installation method – rapid install on mass scale is easier for SUSE Linux Enterprise Server ® • Filesystem types – safe, secure, scalable – Solaris (ufs, zfs..) - SLES (ext3, ext4, reiserfs, xfs, ocfs2) • /tmp by default in memory as tmpfs filesystem • Similar content in directories /etc, /lib, /sbin, /usr, /opt etc. • /boot and /proc contents are not so similar • Init process is quite similar • /usr/X11 is similar – Solaris Motif and CDE interface – JDS / KDE / GNOME also – SLES has no Motif / CDE • Solaris packages are pkgadd format – SLES is rpm format 7 © Novell, Inc. All rights reserved.
  • System Administrator View (continued) • YaST2 – A very productive GUI / CLI Tool for doing almost everything right from Installation through Optimization – Much better compared to default Solaris installation – System Update / Patching / Addon mechanisms vary quite a bit • Use YaST2 to configure and reuse most config files – Networking – DHCP / DNS / openLDAP / iptables – Authentication / Kerberos / PAM configuration – NIS Services – NFS Services – CIFS (Samba) Services – Security, Firewall and Services Enabling – MAC and DAC using AppArmor (SELinux) – Modify / Reconfig various init and inet services – System Log Management 8 © Novell, Inc. All rights reserved.
  • System Administrator View (continued) • Device naming conventions vary – Solaris /dev/dsk/c0t0d0p0 - SUSE /dev/sda1 ® – Do not assume similar device names • MySQL / PostgreSQL behave similar – little variation in clustering • Both support loadable module - In SUSE Linux Enterprise Server compile kernel and kernel modules – make config – make all • Backup / Restore strategy remain almost same • Virtualization – SLES supports Xen virtualization out-of-box – VirtualBox runs on SLES11 with some effort – VM migration ok • Most Common Open Source Management Tools – Webmin, Nagios 9 © Novell, Inc. All rights reserved.
  • Application Porting Considerations
  • Application Porting The process of taking a software application that is built for a specific operating system and machine architecture and moving that application to a new operating system and possibly machine architecture. For example, Solaris (UNIX) on SPARC to SUSE ® Linux on x86-64. 11 © Novell, Inc. All rights reserved.
  • Application Porting Process Application Scoping Porting Analysis Porting by Engineer Testing and Certification 12 © Novell, Inc. All rights reserved.
  • Application Porting Considerations Application programming language and compilers Application build environment and tools Platform dependent issues (machine architecture, OS, etc.) Platform run-time services (system services and daemons) Middleware dependencies (database, libraries, etc.) User interface dependencies (libraries) Application testing environment (test tools, resources) Application support issues 13 © Novell, Inc. All rights reserved.
  • Application Programming Language and Compilers • GNU Compiler Collection - GCC – C, C++, Fortran – ISO C (C89, C95, C99) (Flags for setting standard) – http://gcc.gnu.org • SUSE Linux Enterprise 11 versions ® – GCC 4.3 Compiler – GDB 6.8 Debugger – Glibc 2.8 Standard C Library • Java – SUSE Linux Enterprise Server 11 includes IBM Java 1.4.2 and IBM Java SE 6 – SUSE Linux Enterprise Desktop 11 includes Sun Java SE 6 14 © Novell, Inc. All rights reserved.
  • Application Build Environment and Tools Application Build Environment • Make – gmake (GNU Make 3.81) > http://www.gnu.org/software/make/ – Autoconf (GNU Autoconf) • Source Code Control – SVN (Subversion) > http://subversion.tigris.org/ – CVS (Concurrent Versions System) > http://www.nongnu.org/cvs/ • Commercial Build Tools – IBM Rational Software on SUSE Linux Enterprise Server ® – Sun Studio - C, C++, and Fortran for Solaris and Linux 15 © Novell, Inc. All rights reserved.
  • Application Build Environment and Tools Application Build Tools • GNU Binutils (binary utilities) – /usr/bin/ar (utility for maintaining archives for static libs) – /usr/bin/gprof (utility for displaying profiling information) – /usr/bin/ld (the GNU linker) – /usr/bin/nm (list symbols from object files) – /usr/bin/objdump (display information from object files) – /usr/bin/readelf (display information from ELF object files) http://www.gnu.org/software/binutils/ 16 © Novell, Inc. All rights reserved.
  • Application Build Environment and Tools Application Build Tools (continued) • The GNU Linker – /usr/bin/ld – Generally considered better to use the 'gcc' command – pass options from 'gcc' to the linker 'ld' with '-Wl' option – An example to build a Dynamic Shared Object Library > gcc -fPIC -shared libhello.c -Wl,-soname,libhello.so.1 -o libhello – Supports the use of linker scripts 17 © Novell, Inc. All rights reserved.
  • Application Build Environment and Tools Application Build Tools—objdump ~/Projects/hello> objdump -s -j .comment hello hello: file format elf64-x86-64 Contents of section .comment: 0000 00474343 3a202847 4e552920 342e312e .GCC: (GNU) 4.1. 0010 32203230 30373031 31352028 70726572 2 20070115 (prer 0020 656c6561 73652920 28535553 45204c69 elease) (SUSE Li 0030 6e757829 00004743 433a2028 474e5529 nux)..GCC: (GNU) 0040 20342e31 2e322032 30303730 31313520 4.1.2 20070115 0050 28707265 72656c65 61736529 20285355 (prerelease) (SU 0060 5345204c 696e7578 29000047 43433a20 SE Linux)..GCC: 18 © Novell, Inc. All rights reserved.
  • Application Build Environment and Tools Application Build Tools—readelf ~/Projects/hello> readelf -e hello ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: Advanced Micro Devices X86-64 Version: 0x1 Entry point address: 0x400440 Start of program headers: 64 (bytes into file) Start of section headers: 4768 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 9 Size of section headers: 64 (bytes) Number of section headers: 38 Section header string table index: 35 19 © Novell, Inc. All rights reserved.
  • Platform Dependent Issues • Machine Architecture – 32-bit and 64-bit architecture – Big/little Endian issues (SPARC to Intel) • Operating System Differences – Solaris / UNIX versus Linux signals – Network programming API (sockets versus TLI) – POSIX threads API (Linux threads, Solaris threads) – Interprocess communication (IPC) • Internationalization (I18N) and Localization (L10N) – UNICODE, UTF-8, UTF-16/UCS-2, UTF-32/UCS-4 20 © Novell, Inc. All rights reserved.
  • Platform Dependent Issues Machine Architecture • Big / little Endian portability (byte ordering) – Intel machines LE – SPARC machines BE – Network ordering is BE – Watch data format between BE and LE machines > binary data files – Check for nonuniform data references > Pointers > Unions > Structure packing – Never cast a pointer to an integer and explicitly reference data 21 © Novell, Inc. All rights reserved.
  • Platform Dependent Issues Machine Architecture (continued) • Porting from Solaris on SPARC to Solaris on Intel may be a good intermediate step to getting to Linux on Intel (though extra step) • 32-bit to 64-bit porting and migration – GCC provides compiler switches '-m32' or '-m64' – Common Issues > Data type mismatch > 64-bit architecture is LP64 > 32-bit architecture is ILP32 – Use 'sizeof' operator – Use POSIX data types <sys/types.h> > like pid_t for process ID's – Ignoring signed extensions is a common issue 22 © Novell, Inc. All rights reserved.
  • Platform Run-time Services • System daemons and resources – System startup scripts > Located in /etc/rc.d/ > Follow the LSB Standard > http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic /LSB-Core-generic/iniscrptact.html > http://www.novell.com/coolsolutions/feature/11256.html > Adds commands in comment blocks – Account for all run-time services used by application > NFS > INETD > And others... 23 © Novell, Inc. All rights reserved.
  • Middleware Dependencies • GNU glibc C Library – http://www.gnu.org/software/libc/ – Follows standards (ISO C 99, POSIX, SUS, UNIX 98) – Useful commands > /usr/bin/ldd (display shared library dependencies) > /lib/libc.so.6 (displays information about glibc) • GNU Standard C++ Library – http://gcc.gnu.org/libstdc++/ – ISO 14882 Standard C++ Library – Part of GCC 24 © Novell, Inc. All rights reserved.
  • Middleware Dependencies Useful Commands ~/Projects/hello> ldd hello libc.so.6 => /lib64/libc.so.6 (0x00002b25b80d0000) /lib64/ld-linux-x86-64.so.2 (0x00002b25b7fb4000) ~/Projects/hello> 25 © Novell, Inc. All rights reserved.
  • Middleware Dependencies Useful Commands (continued) ~/Projects/hello> /lib64/libc.so.6 GNU C Library development release version 2.4 (20070503), by Roland McGrath et al. Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Configured for x86_64-suse-linux. Compiled by GNU CC version 4.1.2 20070115 (prerelease) (SUSE Linux). Compiled on a Linux 2.6.16 system on 2007-05-03. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson GNU libio by Per Bothner NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B Thread-local storage support included. For bug reporting instructions, please see: <http://www.gnu.org/software/libc/bugs.html>. ~/Projects/hello> 26 © Novell, Inc. All rights reserved.
  • Middleware Dependencies Databases • Database support included – MySQL (Version 5 in SUSE Linux Enterprise Server 11) ® – PostgreSQL (Version 8.3.3 in SUSE Linux Enterprise Server 11) – Berkeley DB (Version 4.5 in SUSE Linux Enterprise Server 11) • Commercial databases available – Oracle – SAP – Enterprise DB (PostgreSQL) • Database interfaces – ODBC – JDBC 27 © Novell, Inc. All rights reserved.
  • Middleware Dependencies Summary • Many open source libraries and middleware – Check the SUSE Linux Enterprise SDK ® – Check the LSB specification for libraries – Follow the LSB guidelines for use if making portable application (library not in the LSB) – CORBA ORB (orbit is open source, commercial available) – Curses applications use ncurses • Commercial libraries and Middleware – Make sure they support SUSE Linux Enterprise – Account for third-party dependencies in porting 28 © Novell, Inc. All rights reserved.
  • User Interface Dependencies • Motif – The Open Motif runtime environment > http://www.motifzone.net/ • CDE (Common Desktop Environment) ® – Commercial version available for Linux • GTK (The GIMP Tool Kit) – http://www.gtk.org/ – Used by the GNOME Project > http://www.gnome.org/ 29 © Novell, Inc. All rights reserved.
  • Application Testing Environment • GDB (GNU Debugger) – http://sourceware.org/gdb/ – GUI Front End DDD (Data Display Debugger) > http://www.gnu.org/software/ddd/ • Memory debugging – Glibc provides memory debugging options > mcheck, mtrace, MALLOC_CHECK – Electric fence – Valgrind 30 © Novell, Inc. All rights reserved.
  • Application Testing Environment (continued) • Kernel debugging in SUSE Linux Enterprise ® – SystemTap – Crash – kdump • Application profiling – GNU Profiler 'gprof' part of binutils – 'strace' (system function call tracer) – 'ltrace' (library call tracer) – OProfile (system-wide profiler) – Linux commands > iostat, vmstat, ps, top 31 © Novell, Inc. All rights reserved.
  • Application Testing Environment (continued) • Commercial Tools – Allinea DDT – IBM Rational Purify – Intel Software Group – SGI ProPack – TotalView Technologies Debugger – TotalView Technologies MemoryScape 32 © Novell, Inc. All rights reserved.
  • Application Support Issues • Defect reporting – Bugzilla • Maintain SUSE Linux Enterprise Server ® test environment – Reproduce issues – Possibly maintain Solaris environment to compare • Maintain SUSE Linux Enterprise Server build environment – Rebuild update versions of applications • Novell Technical Support ® – To report any issues with SUSE Linux Enterprise 33 © Novell, Inc. All rights reserved.
  • Tools and Resources
  • SUSE Linux Enterprise SDK ® • C and C++ compiler in base SLE • SDK contains the development packages – Headers – Development libraries • Many extra packages • Download from Novell ® • http://developer.novell.com/wiki/index.php/SLES_SDK 35 © Novell, Inc. All rights reserved.
  • Books UNIX to Linux Porting Prentice Hall, ISBN 0-13-187109-9 36 © Novell, Inc. All rights reserved.
  • Internet Websites • Novell Developer Community ® – http://developer.novell.com/wiki/index.php/Developer_Home • Novell Porting and Migration Center – http://developer.novell.com/wiki/index.php/Porting_and_Migration • Linux Foundation Developer Network – http://ldn.linuxfoundation.org/ • openSUSE and openSUSE Build Service ® – http://www.opensuse.org/ 37 © Novell, Inc. All rights reserved.
  • Linux Foundation LSB Application Checker • Application details: – Web UI based on embedded web server – Both installable and unpack-and-run versions • Main features: – Accepts application as a set of components: binaries and .so possibly in various directories or/and packed in .rpm / tar.gz (arbitrary mix) – Visualizes external dependencies (libraries and interfaces) of the application (internal dependencies between components are excluded) – For libraries, it highlights differences between required (DT_NEEDED) and actually used libraries 38 © Novell, Inc. All rights reserved.
  • Linux Foundation LSB Application Checker (continued) • Results from using – Local application analysis – Optional submit info to the Linux Foundation to include in the Database Navigator – Used to apply for LSB-compliance certification • http://ldn.linuxfoundation.org/lsb/check-your-app 39 © Novell, Inc. All rights reserved.
  • Linux Foundation LSB Database Navigator • Interactive reference guide for Linux API / ABI elements: – Allows you to browse applications or distributions – Information about the Linux Ecosystem – Show Libraries and Interfaces used or available – Great for understanding how applications are built for LSB – Part of the Linux Developer Network • http://www.linuxfoundation.org/navigator/ 40 © Novell, Inc. All rights reserved.
  • Next Steps
  • Next Steps OnDemand Webcast—The Business Case for Migrating from Solaris to SUSE Linux Enterprise Server ® www.novell.com/idc Other UNIX to Linux migration resources www.novell.com/solaris Limited time offer—Zero Risk Migration Assessment www.novell.com/promo/100/solaris.html 42 © Novell, Inc. All rights reserved.
  • Unpublished Work of Novell, Inc. All Rights Reserved. This work is an unpublished work and contains confidential, proprietary, and trade secret information of Novell, Inc. Access to this work is restricted to Novell 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 Novell, Inc. 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. Novell, Inc. 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 Novell products remains at the sole discretion of Novell. Further, Novell, Inc. 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 Novell 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.