Managing applications with coursier

Managing applications with coursier

Scala eXchange 2017, London

53419e71ca110cf547e4104d8220a133?s=128

Alexandre Archambault

December 14, 2017
Tweet

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 Distributing • GitHub releases • Nexus • FTP…

    (which one?) • Internal stuff: ?
  4. Managing applications Caveats • Not one standard way • Manual

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

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

    • Small files (dependencies mentioned in metadata) • OS-agnostic • Several versions on the same machine is fine
  7. $ 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
  8. 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
  9. 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
  10. Thanks