Packaging for Mageia Linux with Docker Containers

Total Page:16

File Type:pdf, Size:1020Kb

Packaging for Mageia Linux with Docker Containers Packaging for Mageia Linux with Docker containers Bruno Cornec – FLOSSITA January 2019 Introducing myself ● Software engineering and Unices since 19!!" – #ost$y Configuration #anage%ent Systems (C#S), Bui$d sy te% ( qua$ity tool , on %u$ti*$e com%ercia$ Uni+ syste% – ,isco-ered O*en Source & Linux &OSL) . made first contri/utions in 1990 – Fu$$ ti%e on OSL since 1991 ● Current$y" – OSL Tec2no$ogy Strategist , Grenob$e, France – FLOSSITA board chair – 4OSS conference, OpenStac56fr, AFUL previous board member. – Conferences at 77 le-e$ at LinuxCon, Linu+6conf.au, Fosde%, ... – #ondoRescue, 4roject-Bui$der6org( pyt2on:redfi 2, UUWL and PUS; Project Lead – Linu+CO<, mre*o, te$$ico, rinse, fosso$ogy, col$ect$, Ironic contributor – FOSSBa=aar>S4,X and OSL overnance ent2usiast – #andri-a( #ageia packager ● And a$so" – A%ateur singer (A$to / Tenor), recorder p$ayer since 19@A and C2oir director since 19!@, C, col$ector &A000B', Concert ( 42otogra*2y Some reminders Bare"Metal vs VM vs Container Bare metal #irtualized $ontainerized application layer application layer application layer &machine virtuali%ation' &process virtualization' )pps )pps $ o n t )pps )pps uest OS )pps )pps a i n e *ost"+S *ypervisor *ost"OS r Server Server Server Infra Storage structure Storage Storage (etwork (etwork (etwork ,hat is Docker value"add ? 8un a**lications in a neutra$( lightweight and *orta/$e way !undle. E-eryt2ing packed toget2er for a new de$i-ery %ode$ )pproch. One *roce s =C One container Layers: I%ages (ro) & containers (rw) using a union FS /egistry: pu/$ic/*ri-ate registry of shared images Dockerfile" descri*ti-e /ui$d of an image #olumes: loo*/ack %ounting host FS into container Ports: e+*o e container services *ort to t2e host Portable: created once, run e-erywhere (on a gi-en OS' $omposition. Si%*$e DA#L fi$es *). Swarm and>or K! Management: 8<ST A4I>CLI Language. Go and some pyt2on Solomon Hyke ( ,oc5er « creator G6 License: A*ache v260 A layered approach $ontainer (rw' Instance Scripts Images (ro' Pkgs Instance $ontainer (rw' Mageia !usybox Image (ro' 0ernel *ost 1 application B it de* == 1 container Images $ontainers Loca$ or remote reference content Last layer providing rw access to to initiate a container t2e cu%u$ated set of images #u$ti*$e i%ages can /e layered adding content at each ti%e using Copy on Write FS Cache to speed u* re*eated operation ,hy building distribution packages with Containers vs VMs- $ontainers like VMs bring isolation Ho pol$ution of your running environment <asi$y scratc2 and redo if *rob$e% <asier refinement & automation of the bui$d environment with the Docker fi$e $ontainers like VMs bring multi"distribution support <a y to bui$d for another distri/ution than your Usefu$ a$so for your own distro: not e-erybody uses an unsta/$e distro $ontainers can use natively your home directory A$$ow 2aring of your *ackage sources for loca$ and in container /ui$d A$$ow 2aring of your .rp%macros, .rpmrc fi$es, #ageia SSE 5eys (or Fedora cert ' #Ms are mandatory if you need a di1erent kernel Basic Docker workflow to build distribution packages Images Mageia Cauldron Mageia 6 ... Fedora Rawhide Docker registry Dockerfiles Fedora 29 ... Distri/ution 8epository Containers Mageia Cauldron Mageia 6 ... Fedora Rawhide Fedora 29 ... Loca$ ,oc5er <ngine SIH > Git sources Loca$ co%*uter 4ackage %ngt Building distribution images with a Dockerfile mkdir -p $TMPDM cd $TMPDM MUID=`getent passwd $USER | cut -d: -f3` MGID=`getent passwd $USER | cut -d: -f4` # Build the Dockerfile cat > Dockerfile << EOF FROM mageiaofficial:$MGAVER MAINTAINER [email protected] RUN urpmi.update -a -c -f # Not useful if using mageiaofficial:$MGAVER #RUN urpmi.removemedia -a #RUN urpmi.addmedia --probe-hdlist --distrib mga $MGAMIRROR/$MGAVER/$MGAARCH RUN urpmi --auto --auto-select --no-recommends RUN urpmi --auto bm subversion mgarepo colordiff sudo RUN useradd $USER -u $MUID -g $MGID -N -M -d $HOME RUN echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers RUN mkdir -p $HOME WORKDIR $WORKDIR USER $USER CMD /bin/bash EOF fi /unning distribution containers with a Docker stat=0 docker inspect pb:mageiabuild$MGAVER 2>&1 > /dev/null if [ $? -eq 0 ]; then if [ "$FORCE" = "1" ]; then docker rmi pb:mageiabuild$MGAVER fi else docker build --file=Dockerfile -t pb:mageiabuild$MGAVER . stat=$? fi if [ $stat -eq 0 ]; then docker run --rm -v "$SSH_AUTH_SOCK":/ssh-agent -v $HOME:$HOME -e SSH_AUTH_SOCK=/ssh- agent -ti pb:mageiabuild$MGAVER fi 8eference scri*t: htt* ">>git2u/6co%>/cornec/mageia:docker>/$ob>%aster>run-mageia Show Time ! $ontinuous Packaging with Docker & project"builder5org 4ac5agers Loca$ Bui$d Server Docker Containers 4ro9ect Bui$d + 8epository %etadata 4roject Local build ,e-elopers FLOSSCon 2019 - 03/02/2019 Contact" bruno@flossita5org THANK YOU Linus Tor-a$ds, Richard Sta$$%an( <ric Raymond, Hat #a5are-itch( 8ené Cougnenc( <ric ,u%as, RJ%y Card, Bda$e Garbee, So$omon Hykes, Bryan Gartner, Andree Leidenfro t, Phi$ Ro//, Bo/ 3o/ei$$e, Martin #ic2$mayr among ot2ers, for their work and de-otion to the O*en Source Software cause... and %y fami$y for their patience :-).
Recommended publications
  • Leafpad Download
    Leafpad download LINK TO DOWNLOAD Download Leafpad Latest Version for Linux – The last but not least software you can take as an option for a text editor is Leafpad. Have you ever heard about it before? If not, let’s come to define it based on Wikipedia. Well, it is stated that Leafpad is an open source . Download Leafpad for Linux - Leafpad is a GTK based simple text editor. 11/5/ · I n this article, we are going to learn How to install Leafpad Linux text editor in Ubuntu. Leafpad is a nice open-source text editor for Linux. It’s not an advanced text editor like vi but a simple lightweight GTK+ based user-friendly text editor application comes with some basic features mentioned below.. Print documents. Search for any phrase or word & replace it. The Leafpad program tool can be installed in such operational systems, as Linux, FreeBSD and Maemo. Among the disadvantages of the utility is the absence of syntax highlight and the capability of non- printed (system) symbols display. For close acquaintance with the app abilities, just download Leafpad for free from the official web-resource. Leafpad - posted in Linux How-To and Tutorial Section: Leafpad is a basic text renuzap.podarokideal.rues: Display line numbers - Limitless undo/redo Installation instructions are provided below by. Leafpad is not available for Windows but there are plenty of alternatives that runs on Windows with similar functionality. The most popular Windows alternative is Notepad++, which is both free and Open renuzap.podarokideal.ru that doesn't suit you, our users have ranked more than 50 alternatives to Leafpad and loads of them are available for Windows so hopefully you can find a suitable replacement.
    [Show full text]
  • Fedora Astronomy the Benefits for Astronomical Software from Integration Into Linux Distributions
    Fedora Astronomy The benefits for astronomical software from integration into Linux distributions Christian Dersch AG Astronomie, Philipps-Universität Marburg June 27, 2018 History of Fedora Astronomy 2003 Fedora has been founded, successor of Red Hat Linux, some basic packages like cfitsio right from beginning 2008 Fedora SciTech Special Interest Group (SIG) has been founded Fedora Astronomy SIG has been founded 2008 - Packaging of many important astronomical software 2016 Fedora Astronomy Lab released with Fedora 24 Christian Dersch (Uni Marburg) Fedora Astronomy June 27, 2018 2 / 17 Fedora Science & Technology SIG As many packages and tasks are not unique to a specific scientific domain: Fedora SciTech (Science & Technology) SIG has been founded Takes care of packaging of general packages, e.g. Python SciPy-Stack, TeXLive and Sage Package groups for scientific applications Handles questions like handling of BLAS/LAPACK implementations Contact for user questions https://fedoraproject.org/wiki/Category:SciTech_SIG Christian Dersch (Uni Marburg) Fedora Astronomy June 27, 2018 3 / 17 Fedora Astronomy SIG The Astronomy SIG works on top of SciTech: Takes care of software and tasks specific for astronomy Creates ready to use live environment (installable): Astronomy Lab Coordinates collaboration with other distribution projects Fedora is “bazaar” style: everyone can follow and contribute, development is transparent, currently 4-5 active members Point of contact for users (Mailing list, IRC etc.) Important: Be interesting for both amateurs and professionals
    [Show full text]
  • Article, Written by Wobo in Early October 2010, Published in Print in Linux User, Issue # 11/2010 (In German)
    Article, written by wobo in early October 2010, published in print in Linux User, issue # 11/2010 (in German) (translated to English for Mageia by wobo) Introduction Numerous economical problems in the French company Mandriva SA have finally been answered by the community: former employees and free developpers have decided to build a plattform to continue the development of the distribution as a free and open community project. Article The 19th September marked a turning point in the history of the Distribution currently known as Mandriva Linux: Several former employees of Mandriva SA announced the intention to found a nonprofit organization that wishes to continue the distribution Mandriva Linux in a fork as a community project [1 ]. The reasons for this step go back to the year 2005: at that time the newcomer Ubuntu appeared on the scene simultaneously with the restructuring of the ailing Mandriva SA (see box of MandrakeSoft to Mandriva on the next spread). While this newcomer gained more and more popularity Mandriva failed to start a positive trend in its business and critical voices in the community arose about the Mandriva management. Mandriva©s business and communication policy met a rising reluctance of users and free developers. A key moment in this crisis was certainly the lay-off of company co-founder Gael Duval, along with popular community leaders (like Adam Williamson) and well known freelancers [2]. Downward trend Despite numerous cuts in various business areas the decline of Mandriva SA continued unabated. In spring 2010 the company was on the brink of bankruptcy and started initial negotiations with interested buyers.
    [Show full text]
  • Introduction to Fmxlinux Delphi's Firemonkey For
    Introduction to FmxLinux Delphi’s FireMonkey for Linux Solution Jim McKeeth Embarcadero Technologies [email protected] Chief Developer Advocate & Engineer For quality purposes, all lines except the presenter are muted IT’S OK TO ASK QUESTIONS! Use the Q&A Panel on the Right This webinar is being recorded for future playback. Recordings will be available on Embarcadero’s YouTube channel Your Presenter: Jim McKeeth Embarcadero Technologies [email protected] | @JimMcKeeth Chief Developer Advocate & Engineer Agenda • Overview • Installation • Supported platforms • PAServer • SDK & Packages • Usage • UI Elements • Samples • Database Access FireDAC • Migrating from Windows VCL • midaconverter.com • 3rd Party Support • Broadway Web Why FMX on Linux? • Education - Save money on Windows licenses • Kiosk or Point of Sale - Single purpose computers with locked down user interfaces • Security - Linux offers more security options • IoT & Industrial Automation - Add user interfaces for integrated systems • Federal Government - Many govt systems require Linux support • Choice - Now you can, so might as well! Delphi for Linux History • 1999 Kylix: aka Delphi for Linux, introduced • It was a port of the IDE to Linux • Linux x86 32-bit compiler • Used the Trolltech QT widget library • 2002 Kylix 3 was the last update to Kylix • 2017 Delphi 10.2 “Tokyo” introduced Delphi for x86 64-bit Linux • IDE runs on Windows, cross compiles to Linux via the PAServer • Designed for server side development - no desktop widget GUI library • 2017 Eugene
    [Show full text]
  • SNOWMASS21-Compf2 Compf5-034.Pdf 68.77KB 2020-08-31 13:15:49
    Key4hep Letter of Interest – Snowmass 2021 August 31, 2020 1 Key4hep 2 Letter of Interest 3 Authors: b a b f 4 Placido Fernandez Declara , Frank Gaede , Gerardo Ganis , Paolo Giacomelli , Benedikt b b a b b 5 Hegner , Clement Helsens , Thomas Madlener , Andre Sailer , Graeme A Stewart , Valentin b c;1 d d d d e 6 Volkl , Joseph Wang , Wenxin Fang , Weidong Li , Tao Lin , Jiaheng Zou , Xingtao Huang , g 7 Alexey Zhemchugov 8 a b c d e f 9 DESY; CERN; Twofish Enterprises (Asia) Limited; IHEP; Shandong University; INFN g 10 Bologna; JINR Dubna 11 Introduction 12 Future HEP experiments require detailed simulation and advanced reconstruction algorithms to ex- 13 plore and maximise the physics reach of their proposed machines and to design, optimise, and 14 study detector geometry and performance. To synergize such developments the CEPC [1], CLIC [2], 15 FCC [3], ILC [4], and SCT [5], communities have started the creation of a “Turnkey Software Stack” 16 (Key4hep), which would provide all the necessary ingredients, from simulation to analysis, for future 17 experiments. This approach is based on the positive experience of the linear collider projects ILC 18 and CLIC, that have developed and used a common software stack iLCSoft [6] over the last decade. 19 This would cover most if not all future linear and circular machines colliding electrons, muons and 20 hadrons. The software stack will facilitate writing specific components for experiments ensuring co- 21 herency and maximising the re-use of established packages to benefit from existing solutions and 22 community developments, for example, ROOT, Geant4, DD4hep, Gaudi and podio.
    [Show full text]
  • Mageia, Successes and Lessons Learned 6 Years After Forking (Slides)
    Mageia, successes and lessons learned 6 years after forking Anne Nicolas – Samuel Verschelde A brief presentation of Mageia How to define Magiea community and distribution Essentials ● A GNU/Linux-based, Free Software operating system, easy for both users and contributors ● A community project, supported by a nonprofit organisation of elected contributors Some figures ● 100 packagers accounts, 3 000 Bugzilla accounts, more than 20 000 bugs ● dev mailing-list (250), general dicussion mailing-list (300), forums (5 600 accounts, 66 000 posts) Why this fork What we wanted ● Give back the control to the community ● Setup all the project organization: governance, teams and collaboration ● Setup a technical and dedicated infrastructure (reliable, maintainable, scalable, replicable) ● Ship a first independant, stable and reliable version without major innovation, upgradable from Mandriva Linux ● Long term goals were not that defined except rescue more than 10 years of history Our organization The autocongratulation slide What we achieved and we are proud of it ● 5 distributions have been released and 6th is on it way ● A real community of users and contributers ● No nasty issues for now on released versions no apocaliptic headline ever:) OK… We may now be using the debian way of releasing : « released when ready » From user to contributer Lowering the entry barriers Facts ● A healthy community project always needs to renew or grow its contributors base. ● Need to attract potential contributors and have them stay. In Mageia ● Welcoming teams (even packagers). ● Joining teams is not just for elite. Anyone motivated and able to work in a team is welcome. ● Mentoring. Help them start in good conditions and learn our way of working together.
    [Show full text]
  • What Is Linux?
    What is Linux? ● A computer operating system (OS). ● Based on the UNIX OS (a major server OS). ● Free and open source software (FOSS). ● Available free of cost. ● Runs on nearly every hardware platform: – mainframes, PCs, cell phones, embedded processors ● Heavily used for servers. ● Heavily used in devices with embedded processors. CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept. SIUC Linux?? ● “But I have never heard of Linux, so it must not be very commonly used.” ● “Nobody uses Linux.” ● “Everyone runs Windows.” ● “Linux is too hard for anyone but computer scientists to use.” ● “There's no malware for Linux because Linux is so unimportant.” CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept. SIUC Have You Used Linux? ● Desktop OS? – many distributions: Ubuntu, Red Hat, etc. CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept. SIUC Have You Used Linux? ● Desktop OS? – many distributions: Ubuntu, Red Hat, etc. CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept. SIUC Have You Used Linux? ● Cell phones or tablets or netbooks? – Android and Chrome OS are Linux based CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept. SIUC Have You Used Linux? ● Routers? – many routers and other network devices run Linux – projects like DD-WRT are based on Linux CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept. SIUC Have You Used Linux? ● NAS (Network Attached Storage) devices? – most run Linux CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept. SIUC Have You Used Linux? ● Multimedia devices? – many run Linux CS Day 2013: Linux Introduction © Norman Carver Computer Science Dept.
    [Show full text]
  • YOUR LETTERS Got Something to Say? an Idea for a New Magazine Feature? Or a Great Discovery? Email Us: [email protected]
    MAIL YOUR LETTERS Got something to say? An idea for a new magazine feature? Or a great discovery? Email us: [email protected] LINUX VOICE STAR LETTER STUCK IN A RUT I’ve been messing about with information from the internet different kinds of Linux for is at times like drinking water a while now – I started with out of a fire hose. So come Ubuntu, then Kubuntu, which on, Linux Voice – spare me was the easiest way to try the flame wars and let me KDE, then Mageia, because know what I should try next. I figured that it was built for David Jahović, Melbourne KDE, rather than having KDE bolted on to it like Kubuntu. Andrew says: We’ve had a few But now I’m stuck. I know emails in this vein, so we’re that there’s loads of choice planning a distro comparison out there, but sometimes for next issue. Until then, give I feel like using the dread Elementary OS a try. It’s pretty, phrase: “There is too much it’s fast, and we love it! choice”. Truly, getting Elementary OS provides a fresh new spin to the Linux desktop. I ALWAYS FEEL LIKE SOMEBODY’S WATCHING ME I wonder if the seeming lack methods can I use to protect my The only way to be sure of privacy and security on the online life? that you’re not being internet due to either breaches I think all this falls into a larger spied on is to use free or even government agencies category such as even being software.
    [Show full text]
  • Mageia Netinstall
    Mageia NetInstall Het hulpprogramma om Mageia te installeren met behulp van externe pakketbronnen De teksten en de screenshots in deze handleiding zijn beschikbaar onder de CC BY-SA 3.0 licentie http://creativecommons.org/licenses/by-sa/3.0/ Deze handleiding werd geproduceerd met behulp van het Calenco CMS [http:// www.calenco.com], ontwikkeld door NeoDoc [http://www.neodoc.biz] It was written by volunteers in their free time. Please contact the Documentation Team [htt- ps://wiki.mageia.org/en/Documentation_team], if you would like to help improve this manual. Mageia NetInstall Mageia NetInstall 2 Mageia NetInstall Inhoudsopgave Installing Mageia using a Tiny Boot Image ..................................................................................... 1 1. Introductie ........................................................................................................................ 1 1.1. NetInstall Media ..................................................................................................... 1 1.2. Installatie fasen ...................................................................................................... 1 2. Stage 1 (Pre-installation Stage) ........................................................................................... 2 2.1. Opstarten ............................................................................................................... 2 2.2. Installatiemethode ................................................................................................... 3 2.3. Netwerkverbinding
    [Show full text]
  • Debian and Its Ecosystem
    Debian and its ecosystem Stefano Zacchiroli Debian Developer Former Debian Project Leader 20 September 2013 OSS4B — Open Source Software for Business Prato, Italy Stefano Zacchiroli (Debian) Debian and its ecosystem OSS4B — Prato, Italy 1 / 32 Free Software & your [ digital ] life Lester picked up a screwdriver. “You see this? It’s a tool. You can pick it up and you can unscrew stuff or screw stuff in. You can use the handle for a hammer. You can use the blade to open paint cans. You can throw it away, loan it out, or paint it purple and frame it.” He thumped the printer. “This [ Disney in a Box ] thing is a tool, too, but it’s not your tool. It belongs to someone else — Disney. It isn’t interested in listening to you or obeying you. It doesn’t want to give you more control over your life.” [. ] “If you don’t control your life, you’re miserable. Think of the people who don’t get to run their own lives: prisoners, reform-school kids, mental patients. There’s something inherently awful about living like that. Autonomy makes us happy.” — Cory Doctorow, Makers http://craphound.com/makers/ Stefano Zacchiroli (Debian) Debian and its ecosystem OSS4B — Prato, Italy 2 / 32 Free Software, raw foo is cool, let’s install it! 1 download foo-1.0.tar.gz ñ checksum mismatch, missing public key, etc. 2 ./configure ñ error: missing bar, baz, . 3 foreach (bar, baz, . ) go to 1 until (recursive) success 4 make ñ error: symbol not found 5 make install ñ error: cp: cannot create regular file /some/weird/path now try scale that up to ≈20’000 sources releasing ≈3’000
    [Show full text]
  • Getting Started with LINUX a Personal Experience
    Getting Started with LINUX a personal experience IWPCUG March 7th 2018 Mike Hoar Have been on the fringes of Linux for some years (I pronounce it the Scandinavian way Lee-nux a combination of Linnus Thorvald and UNIX). This presentation provides an introduction to Linux in the form of a record of my investigations and experience of installing, configuring and initial use of a Linux setup. 1 Part 1: The Background • What is Linux? • What do I want to use it for? • What hardware do I have? 2 What is LINUX? An Operating System Just like Windows, iOS and UNIX Computers need an OS, software and peripheral hardware to perform. The OS enables the software to run and communicate with the printers, monitors and other media devices. Just like Windows XP, Windows 7, Windows 8, and Mac OS X, Linux is an operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply – the operating system manages the communication between your software and your hardware. Without the operating system (often referred to as the “OS”), the software wont function. Operating systems have been around since general purpose computers were first developed. They have just got more sophisticated and complex. The first home computers such as the Commadore64 and Sinclair ZX machines had the OS hard wired into the machine. When the IBM PC was developed it came with the first OS which was installed every time you started up the machine, this was Microsofts DOS. Other versions were soon developed which were compatible with software written to run on MS-DOS .
    [Show full text]
  • Mageia 4 a first-Class Mandriva Spin-Off with Over 4,400 Packages
    DVDPAGES DVD 002 Distros, videos, applications, games, podcasts and more… SHOWCASING THE BEST OF FOSS Welcome to the second Linux Voice a whopping nine desktop And then there are videos, apps DVD. It’s been fantastic to hear environments and window and other gems to explore – open your feeback about the first issue, managers. It’s a great way to index.html for the full lowdown. so thank you to everyone who got explore the different interfaces in We hope you enjoy the disc, and if in touch. This issue’s DVD, like last the Linux and open source world. you have a digital subscription to month’s, is an 8GB dual-layer beast Then we have gNewSense, a Linux Voice, you can get the DVD jam-packed with software, videos, completely pure distribution (ie ISO image from our website at podcasts and much more. without a single byte of non-free www.linuxvoice.com. We have the latest release software) that even the notoriously of Mageia, a superb desktop picky Richard Stallman doesn’t Mike Saunders, Disc Editor distribution that boasts have a beef with. [email protected] Complete desktop distro Mageia 4 A first-class Mandriva spin-off with over 4,400 packages. ne of the biggest reasons for distro you’re a long-time Linux user or are new to hopping is trying out a new desktop the operating system, it’s well worth a try. Oenvironment. Sure, most big-name The minimum system requirements are: distros have a range of desktops, but they’re 32 or 64-bit x86 CPU often not integrated very well, so you have to 512MB RAM choose a specific distro to get a good 6GB hard drive space version of, say, KDE or Gnome.
    [Show full text]