pkgsrc on SmartOS Jonathan Perkin Software Engineer Saturday, 23 March 13

Similar documents
Reliability and Performance for OpenStack through SmartOS. Daniele Stroppa, ZHAW

illumos at 5 Daniel L. McDonald - OmniOS Engineering

September oi_151a Status Update + KVM Demo

Oracle Corporation 1

FreeBSD Jails vs. Solaris Zones

ovirt Node June 9, 2012 Mike Burns ovirt Node 1

Nexenta, OpenStorage and Commercial Open Source. Anil Gulecha Developer / Community Lead, Nexenta Core Platform

Pavel Anni Oracle Solaris 11 Feature Map. Slide 2

Virtualization. ...or how adding another layer of abstraction is changing the world. CIS 399: Unix Skills University of Pennsylvania.

Utilizing Oracle Solaris Containers with Oracle Database. Björn Rost

FREEBSD BASED HIGH DENSITY FILERS

/Desktop: Scalable Workstation Solutions

What's new in OpenSolaris? Roman Strobl

How we added software updates to AGL

Virtualization. Michael Tsai 2018/4/16

Increase Efficiency of Solaris Operations & Hardware Life Cycle

ovirt Node November 1, 2011 Mike Burns Alan Pevec Perry Myers ovirt Node 1

CS Operating Systems

Installation runbook for Hedvig + Cinder Driver

Alternatives to Solaris Containers and ZFS for Linux on System z

CHAPTER 16 - VIRTUAL MACHINES

PrepAwayExam. High-efficient Exam Materials are the best high pass-rate Exam Dumps

ovirt and Docker Integration

Oracle Solaris Remote Lab A Solaris 11 Adoption Tool

Linuxboot continuous integration

Managing build infrastructure of a Debian derivative

Porting FreeBSD to AArch64

MariaDB: Community Driven SQL Server. Kristian Nielsen MariaDB developer Monty Program AB

MySQL As A Service. Operationalizing 19 Years of Infrastructure at GoDaddy

Variation on AFS as root filesystem

Variation on AFS as root filesystem

Choosing Hardware and Operating Systems for MySQL. Apr 15, 2009 O'Reilly MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc

Tooling Linux for the Future of Embedded Systems. Patrick Quairoli Director of Alliance and Embedded Technology SUSE /

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Reducing the pain of Yocto development upgrades. Michael Brown NGM Firmware Lead Technologist Dell EMC Embedded Linux Conference 2017

Using MySQL in a Virtualized Environment. Scott Seighman Systems Engineer Sun Microsystems

[Docker] Containerization

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

<Insert Picture Here> Virtualisierung mit Oracle VirtualBox und Oracle Solaris Containern

Virtualization with colinux

Are you Really Helped by Upstream Kernel Code?

Learn. Connect. Explore.

An Oracle White Paper June Enterprise Database Cloud Deployment with Oracle SuperCluster T5-8

ViryaOS RFC: Secure Containers for Embedded and IoT. A proposal for a new Xen Project sub-project

Ada in *BSD. A short overview of the Ada compilers and packages available on FreeBSD, NetBSD, and DragonFly (and OpenBSD and Solaris) 1 of 35

Continuous integration & continuous delivery. COSC345 Software Engineering

High Availability for Enterprise Clouds: Oracle Solaris Cluster and OpenStack

Biocomputing II Coursework guidance

EE 660: Computer Architecture Cloud Architecture: Virtualization

Oracle on Solaris 10 Containers/Zones

Installation and setup guide of 1.1 demonstrator

Systems Programming. The Unix/Linux Operating System

Software installation is not always a trivial task

Linux Files and the File System

Red Hat Atomic Details Dockah, Dockah, Dockah! Containerization as a shift of paradigm for the GNU/Linux OS

Think Small to Scale Big

Introduction to Docker. Antonis Kalipetis Docker Athens Meetup

<Insert Picture Here> Getting Started with Solaris

#jenkinsconf. Managing jenkins with multiple components project. Jenkins User Conference Israel. Presenter Name Ohad Basan

Baremetal with Apache CloudStack

LENS Server Maintenance Guide JZ 2017/07/28

CIT 668: System Architecture. Amazon Web Services

Solaris Engineered Systems

Modern and Fast: A New Wave of Database and Java in the Cloud. Joost Pronk Van Hoogeveen Lead Product Manager, Oracle

Distributed Systems COMP 212. Lecture 18 Othon Michail

Database Virtualization and Consolidation Technologies. Kyle Hailey

Fusion Registry 9 SDMX Data and Metadata Management System

Bulk building in the many core era

Leveraging Traditional Technologies in Non-Traditional Ways

PostgreSQL on Solaris. PGCon Josh Berkus, Jim Gates, Zdenek Kotala, Robert Lor Sun Microsystems

SMF Service Management Facility Codename: Greenline

Push up your code next generation version control with (E)Git

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

Unikernels? Thomas [Twitter]

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

Submitting your Work using GIT

Linux System Management with Puppet, Gitlab, and R10k. Scott Nolin, SSEC Technical Computing 22 June 2017

Why You Will Benefit From Thinking About, And Planning For Oracle Solaris 11

Using Oracle RDBMS With Sun. Scott Canaan Rochester Institute of Technology

Continuous Integration using Docker & Jenkins

Who are we? Premium photo & video sharing. Bootstrapped in 02. $10M+ as of 07. Profitable. No debt. Top 400 website. Doubling yearly.

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

IPS Packaging for Oracle Solaris 11

Painless switch from proprietary hypervisor to QEMU/KVM. Denis V. Lunev

DHCP, DNS & IP Address Management. Bart Busschots

Simple custom Linux distributions with LinuxKit. Justin Cormack

SANE 2006 Solaris SMF 15/05/06 11:03

Experiences with OracleVM 3.3

Proxmox Virtual Environment

Chapter 5 C. Virtual machines

This course is for those wanting to learn basic to intermediate topics in Solaris 10 system administration.

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

StratusLab Cloud Distribution Installation. Charles Loomis (CNRS/LAL) 3 July 2014

Arch Linux Grub You Need To Load The Kernel First

The only open-source type-1 hypervisor

Continuous translation with Weblate. Michal Čihař

Introduction to Virtualization

CS370 Operating Systems

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Transcription:

pkgsrc on SmartOS Jonathan Perkin Software Engineer Joyent @jperkin jperkin@joyent.com jperkin@pkgsrc.org

Agenda Introduction History and background to SmartOS pkgsrc usage in SmartOS pkgsrc features we ve developed pkgsrc development at Joyent Our pkgsrc wishlist

$ whoami! Started working on pkgsrc in 2001 Used pkgsrc on Solaris internally at BBC Worked on build systems and release engineering for MySQL/Sun/Oracle Now work full-time on pkgsrc for Joyent $ uname -a SunOS www0-rth.thls.bbc.co.uk 5.7 Generic sun4m sparc SUNW,SPARCstation-20 $ uptime 12:28pm up 5000 day(s), 2 users, load average: 0.91, 0.89, 0.87

What is SmartOS - History Solaris 10 released by Sun in 2005 ZFS, DTrace, Zones, SMF Open Source OpenSolaris continued the development towards Solaris 11 IPS, Crossbow, Laptop/Desktop support, GNU environment However, Oracle made Solaris closed source and proprietary in 2010 illumos was born to continue development of the last available OpenSolaris code Replace closed-source parts needed to operate the system Continue feature development, working with other communities

What is SmartOS - illumos Distributions Diaspora of Solaris engineers from Oracle and community talent has to illumos distributions focused on specific areas of interest Delphix continue DTrace and ZFS development for database virtualisation products Nexenta and DEY focus on storage appliances and services OmniTI produce OmniOS, a general-purpose illumos distribution for servers OpenIndiana continues development of a desktop-oriented environment Joyent produce SmartOS with a specific focus on cloud computing

What is SmartOS - Joyent! Joyent operate a high performance public cloud. The key features of illumos we require which differentiate it are: ZFS. Fast, scalable, robust storage DTrace. Observability and debugging across everything Zones. Low latency and highly customisable virtualisation KVM. Ability to run customer s preferred OS (though we always recommend Zones wherever possible)

What is SmartOS - Thin Hypervisor SmartOS is a USB/network-booted thin hypervisor Open source, available on GitHub OS resides on USB stick or PXE All disks are dedicated to zones The Global Zone is a ramdisk for zone administration, nothing else /usr is a read-only lofs mount, changes to /etc, /root, etc. not permanent Upgrades are trivial, replace platform directory and reboot Latest First Customer Ship build available every 2 weeks Clear separation between OS (platform) and packages (pkgsrc) PREFER_PKGSRC=yes (except for solaris-pam, terminfo) Zone images are fully independent of OS version

What is SmartOS - Zones All work is done inside Zones Zones are created from images, made up of a file system image (ZFS snapshot) and metadata (JSON) imgadm and vmadm tools for management of images and virtual machines OS zones are sparse and mount /usr from GZ KVM systems are just images too, and run qemu process inside a thin zone Gain hosting features (throttling, resource management, etc.) Additional security

Demo Time!

pkgsrc on SmartOS - Basics We track quarterly branches for each image version 2012Q2 => base*-1.8.x, 2012Q4 => base*-1.9.x, etc Separate images for 32-bit (ABI=32, base) and 64-bit (ABI=64, base64) Self-contained layout PREFIX=/opt/local PKG_SYSCONFDIR=/opt/local/etc PKG_DBDIR=/opt/local/pkg Various package sets available base for minimal install standard for base + common utilities percona, riak etc for specific purpose

pkgsrc development Our users demand additional pkgsrc features that we have developed: Multi-architecture binaries and libraries SMF support SmartOS is Not GNU/Linux distribution (PREFIX=/usr)

pkgsrc development - multiarch Separate 32-bit and 64-bit images are a pain: Confusing for users and customers who think it refers to the kernel architecture Additional build and storage requirements Solaris has had multiarch support since Solaris 7 in 1998, old-time users have come to expect it

pkgsrc development - multiarch #2 High-level overview: For multiarch-enabled packages, perform each build stage (extract, patch,...) twice, once with ABI=32, once with ABI=64 --bindir= and --libdir= set based on ABI Install both to the same DESTDIR, default ABI installed last PLIST expansion to cover multiple entries isaexec wrapper installed to handle binaries Create package Enable with MULTIARCH=yes in mk.conf

pkgsrc development - multiarch #3 Infrastructure (mk/) changes: Each primary phase (e.g. do-extract ) has a wrapper (e.g. do-extractmulti ) which calls the primary target for each ABI mk/plist/plist-multiarch.awk handles PLIST expansion OPSYS-specific {BIN,LIB}ARCHSUFFIX.{32,64} variables BINARCHSUFFIX.32= /i86 BINARCHSUFFIX.64= /amd64 pkgtools/isaexec package created, supports ABI environment variable pkg_install supports new @link directive for isaexec hardlinks

pkgsrc development - multiarch #4 Converting a simple autoconf/cmake package requires: USE_MULTIARCH= bin lib Converting more complicated custom packages involves: USE_MULTIARCH= bin lib Change hardcoded lib to lib${libarchsuffix} Change hardcoded bin to bin${binarchsuffix} Use MULTIARCH_DIRS.{bin,lib} Use MULTIARCH_SKIP_DIRS.{bin,lib} Complicated WRKSRC handling Developers, please stop writing your own build systems!

pkgsrc development - multiarch #5 Current status Large number of packages converted (p5-* automatically handled) SmartOS trunk image uses multiarch by default, ~8,000 packages 504 files changed, 3525 insertions(+), 902 deletions(-) Developed in Joyent pkgsrc repository joyent/feature/multiarch/trunk -> joyent/release/trunk joyent/feature/multiarch/yyyyqq -> joyent/release/yyyyqq_multiarch

pkgsrc development - SMF Solaris 10 introduced the Service Management Framework as a replacement for the legacy init.d system. We need to support it. svccfg to import a new manifest svcadm to enable/disable/restart svcs to display status Small number of infrastructure changes New mk/smf.mk 4 files changed, 131 insertions(+) Manifest and method files current held externally similar to LOCALPATCHES ${SMFBASE}/${PKGPATH} Developed in joyent/feature/smf/trunk branch

pkgsrc development - SNGL SmartOS is Not GNU/Linux, aka snuggle Some users not keen on /opt/local layout, we can fix that! Flexibility of zones allows /usr -> /system/usr, /lib -> /system/lib, etc. pkgsrc built with LOCALBASE=/usr PKG_SYSCONFDIR=/etc Symlinks in /usr for compatability, overridden by packages Works surprisingly well, with caveats Most builtin checks are not LOCALBASE=/usr clean Some packages (hi perl!) make assumptions about /usr Would be great to see other users of this, e.g. Linux Developed in joyent/feature/sngl/trunk branch

pkgsrc development - gccruntime SmartOS does not provide GCC runtime (libgcc, libstdc++ etc), needs to come from pkgsrc Split runtime out to lang/gcc47-libs package Packages register full DEPENDS upon it, use GCC -specs override for RPATH USE_PKGSRC_GCC_RUNTIME=yes to enable Packages which USE_LIBTOOL handled automatically Packages which build their own shared libraries need special handling USE_GCC_RUNTIME=yes Not ideal, compiler.mk sourced early so needs to be set first Would like to integrate remaining USE_GCC_RUNTIME for 2013Q2 Currently developed in joyent/feature/gccruntime/trunk

pkgsrc development - misc OpenJDK7 Patches from SmartOS user jesse_ to get latest OpenJDK working Mostly working openjdk7-current package, would like to discuss *BSD status _PBULK_MULTI support for mysql* and percona Need a good naming scheme, p5-dbd-mysql51 / p5-dbd-percona55? Various small changes in joyent/feature/miscfix/trunk

pkgsrc development - git We develop everything with git / github https://github.com/joyent/pkgsrc (thanks joerg!) https://github.com/joyent/pkgsrc-wip https://github.com/joyent/pkgsrc-joyent Cheap and fast branching makes it all possible upstream/trunk->trunk, upstream/pkgsrc_*->pkgsrc_* (pull --rebase) trunk -> joyent/feature/*/trunk -> joyent/release/trunk pkgsrc_yyyyqq -> joyent/feature/*/yyyyqq -> joyent/release/yyyyqq joyent/feature/*/yyyyqq -> joyent/release/yyyyqq_feature Currently 5 active features (gccruntime, miscfix, multiarch, smf, sngl) Short-lived branches (joyent/bulktest/*, pkggnudir, openssl1, etc)

pkgsrc development - pbulk We build lots of binary packages /opt/pbulk bootstrap + development tools pbulk cluster of 6 client VMs (8 CPU, 8GB each), 1 master, + NFS Can perform a full clean bulk build in under 2 days with MAKE_JOBS=8 Builds done inside chroot for concurrency Some changes required (in joyent/feature/miscfix/trunk) Support creation/deletion of chroots + config file support SO_REUSEADDR for limited_list Enable rsync of RESTRICTED dependencies Add SPECIFIC_PKGS support for full pkgsrc + selected pkgsrc-wip

pkgsrc development - Jenkins We use Jenkins for triggering bulk builds Was in use by other parts of Joyent anyway GitHub plugin monitors for pushes in joyent/release/* branches Build triggered for every push Limited to one concurrent build per branch, Upstream builds triggered via Jenkins cron Tracked directly from jsonn/pkgsrc.git 4 builds per week (2 x 32-bit, 2 x 64-bit) Results sent directly to pkgsrc-bulk@netbsd.org Provides quite a nice interface, plus Jabber notification etc.

pkgsrc wishlist Things we really want at some point: Support for multiple repositories in pkgin Decent upgrade support / config file management Multi-packages (users require different PKG_OPTIONS) Additional pbulk-multi support (mysql, postgres, etc.) Things which would be nice to have: apt/dpkg backend support Better pkg_alternatives support pkgin package aliases (#1 confusion for users is scmgit, #2 is gcc47) Working (and updated) xorg server

Thank You! All this is possible thanks to the unique way the BBC is funded Thank you for all your development work and pkgsrc commits We couldn t handle the pace of upgrades ourselves Your work is used further than perhaps you realise Let s keep going! Regular binary builds for other platforms (OSX, Cygwin) Become the de-facto package manager on more platforms Users => Fixes => Developers => Users =>...

Thanks! www.joyent.com - high-performance VMs and private cloud infrastructure SmartDataCentre (SDC) powered, SmartOS + additional tooling REST APIs for managing VMs Cloud Analytics (DTrace) plus other goodies Use FREEJOY promo code for $125 free credit (2 months running a 1GB SmartMachine) www.smartos.org - open source OS for running VMs Contribute your own images to http://datasets.at/ or publish yourself Questions?