Welcome!

@DevOpsSummit Authors: Pat Romanski, Liz McMillan, Zakia Bouachraoui, Elizabeth White, Yeshim Deniz

Related Topics: @DevOpsSummit, Java IoT, @CloudExpo

@DevOpsSummit: Blog Feed Post

SBT, Scrooge, Intellij and You By @VictorOps | @DevOpsSummit [#DevOps]

We are going through the process of overhauling the serialization framework that we use for inter & intra process communication

How to Set Up a Playdate Between Scala, Thrift, Scrooge, SBT and Intellij
By Nick Isaacs

Here at VictorOps, we are going through the process of overhauling the serialization framework that we use for inter and intra process communication. We evaluated several great options including Kryo (and its Scala companion Chill), Protobuffers, and Thrift.

In the process, we put together a little test project to help us decide which of these choices was right for us. Testing Thrift posed some challenges as the tooling, while quite mature, wasn’t quite as plug-n-play with our local development environment as we would have liked. The following instructions assume a basic knowledge of the Scala/SBT framework, Thrift, and (optionally) Intellij.

What is needed:

Steps:

1. Create a new project with a build.sbt file and add the following lines:

libraryDependencies ++= Seq( "org.apache.thrift" % "libthrift" % "0.8.0", "com.twitter" % "scrooge-core_2.11" % "3.17.0" )

com.twitter.scrooge.ScroogeSBT.newSettings unmanagedSourceDirectories in Compile += baseDirectory.value / "target" / "scala-2.11" / "src_managed"

This will add the Thrift and Scrooge dependencies to your sbt project.

2. If you do not already have a project/plugins.sbt file, create one and add the following line:

addSbtPlugin("com.twitter" % "scrooge-sbt-plugin" % "3.14.1")

3. Create a new directory to hold your Thrift files (by default, Scrooge will check in src/main/thrift, which worked fine for us)

4. Define some Thrift files, if you want, here is a simple example:

namespace java com.example.thrift.java
#@namespace scala com.example.thrift.scala

typedef list<string> friendList

struct NastyCaseClass {
1: string firstName,
2: string lastName,
3: bool ownsPetOtter,
6: friendList listOfFriends,
}

5. By default, Intellij marks everything in the target/ directory as ‘excluded’ for builds. We are gonna have to do something about that.

  • Open up the “project structure” window & click “modules in the right hand menu

Screenshot 2015-03-03 15.16.27

  • Click on the name of your project, you should see the directory structure appear

Screenshot 2015-03-03 15.17.05

  • Click “target” and uncheck “Excluded”

Screenshot 2015-03-03 15.17.13

  • Expand “target” and mark all subfolders as “Excluded” except for scala-version.no

screenshot_2015-03-05_13.05.49

  • Expand “scala-version.no” and mark all folders as “Excluded” except for “src_managed” which you should mark as “Source”

Screenshot 2015-03-03 15.18.30

6. Run an SBT clean, scrooge-gen, and compile. All generated files should now be visible to both SBT and Intellij (hooray for syntax highlighting)

Hope this helps anyone in a similar situation. Another thing to note was that updating *.thrift files would cause SBT to become a bit “unhappy”. To rectify this, simply run a scrooge-gen and a clean after making edits.

Happy serializing  :)

The post SBT, Scrooge, Intellij and You appeared first on VictorOps.

Read the original blog entry...

More Stories By VictorOps Blog

VictorOps is making on-call suck less with the only collaborative alert management platform on the market.

With easy on-call scheduling management, a real-time incident timeline that gives you contextual relevance around your alerts and powerful reporting features that make post-mortems more effective, VictorOps helps your IT/DevOps team solve problems faster.

@DevOpsSummit Stories
Contino is a global technical consultancy that helps highly-regulated enterprises transform faster, modernizing their way of working through DevOps and cloud computing. They focus on building capability and assisting our clients to in-source strategic technology capability so they get to market quickly and build their own innovation engine.
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the benefits of the cloud without losing performance as containers become the new paradigm.
DevOpsSUMMIT at CloudEXPO will expand the DevOps community, enable a wide sharing of knowledge, and educate delegates and technology providers alike. Recent research has shown that DevOps dramatically reduces development time, the amount of enterprise IT professionals put out fires, and support time generally. Time spent on infrastructure development is significantly increased, and DevOps practitioners report more software releases and higher quality. Sponsors of DevOpsSUMMIT at CloudEXPO will benefit from unmatched branding, profile building and lead generation opportunities.
You want to start your DevOps journey but where do you begin? Do you say DevOps loudly 5 times while looking in the mirror and it suddenly appears? Do you hire someone? Do you upskill your existing team? Here are some tips to help support your DevOps transformation. Conor Delanbanque has been involved with building & scaling teams in the DevOps space globally. He is the Head of DevOps Practice at MThree Consulting, a global technology consultancy. Conor founded the Future of DevOps Thought Leaders Debate. He regularly supports and sponsors Meetup groups such as DevOpsNYC and DockerNYC.
In addition to 22 Keynotes and General Sessions, pick from 40 technical sessions in two tracks: (1) DevOpsSUMMIT (2) Cloud-Native & Serverless. EXPIRES AUGUST 31, 2018. Ticket prices: ($295-Aug 31) ($395-Oct 31) ($495-Nov 12) ($595-Walk-in) Does NOT include lunch. DevOps Institue Certification DevOps Institute Two-Day DevOps Certification Program EXPIRES AUGUST 31, 2018. Ticket prices: ($995-Aug 31) ($1,095-Oct 31) ($1,195-Nov 12) ($1,395-Walk-in)