Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing applications with coursier

Managing applications with coursier

Scala eXchange 2017, London

Alexandre Archambault

December 14, 2017
Tweet

More Decks by Alexandre Archambault

Other Decks in Programming

Transcript

  1. Managing applications with coursier It’s not only for libraries! Alexandre

    Archambault (Criteo) github.com/alexarchambault @alxarchambault get-coursier.io
  2. Managing applications $ sbt thing/run ... Packaging: thing + all

    its dependencies • sbt-assembly: uber JARs • sbt-native-packager: RPMs, DEB, MSI, DMG, Docker, … • sbt-pack: directory with JARs, plus scripts • …
  3. Managing applications Caveats • Not one standard way • Manual

    downloads • Large files (all dependencies included) • OS-specific • How to manage updates? Several versions?
  4. Author • Packaging • Distributing: Sonatype, Bintray sbt publish •

    Done! User "org" %% "lib-name" % "version" $ sbt thing/test Managing libraries
  5. Managing libraries Advantages • One standard way • Automatic downloads

    • Small files (dependencies mentioned in metadata) • OS-agnostic • Several versions on the same machine is fine
  6. $ sbt thing/test $ sbt thing/run Author • Packaging •

    Distributing: Sonatype, Bintray sbt publish • Done! User "org" %% "lib-name" % "version" Managing libraries applications Managing libraries "org" %% "lib-name" % "version" $ coursier launch org::thing:version
  7. Managing applications • How do end users install coursier? •

    What goes on under the hood when running • coursier launch • coursier bootstrap • a generated bootstrap • “Standalone” bootstraps (kind of uber JARs, coursier bootstrap --standalone) • Scala native bootstraps (coursier bootstrap --native) • Not only for applications, Spark jobs too • Least documented, but most battle field tested feature of coursier! • coursier spark-submit --help
  8. TL;DR Author $ sbt publish User $ coursier launch org::thing:0.1.0

    Advantages • Automatic downloads • Only push / download / cache small files • OS-agnostic • Several versions on the same machine