setup for HOL-4957 – Automating Your CI/CD Stack with Java and Groovy

Scott and I’ll be leading a hands on lab “Automating your Ci/CD Stack with Java and Groovy” at Oracle Code One. This is a BYOL (bring your own laptop) lab.

If you run into any trouble setting up for the lab, you can post a comment on this blog post or start a thread in the Cloud/Virtualization forum at CodeRanch.

This lab requires the following:

  1. Docker
  2. Docker images
  3. Enough disk space
  4. The ability to run curl
  5. Optional: JDK 8
  6. Optional: Groovy

1 – Docker

To install Docker, follow the instructions at: https://docs.docker.com/install/

Validation:

At the command line, run docker –version. (Small version differences are ok in the output)

$ docker --version

Docker version 18.06.0-ce, build 0ffa825

2 – Docker images

These images a little under 2GB combined. So as not to tax the conference network, please pull them in advance. This will also let you deal with any corporate internet proxies while you are still at work and can ask for help.

At the command line run:

docker pull sonatype/nexus3:3.13.0

docker pull jenkins/jenkins:2.146

docker pull sonarqube:7.1

 Note: “latest” will probably work. These version numbers are the ones we tested with.

$ docker pull sonatype/nexus3:3.13.0
3.13.0: Pulling from sonatype/nexus3
256b176beaff: Pull complete
18d124afa1e9: Pull complete
9bb412307f82: Pull complete
Digest: sha256:19d186d5bc8be1ea4f7bae72756baa830e79bf20aae0e9e7b1a0c7d3ce7ac136
Status: Downloaded newer image for sonatype/nexus3:3.13.0

$ docker pull jenkins/jenkins:2.146
2.146: Pulling from jenkins/jenkins
55cbf04beb70: Pull complete
1607093a898c: Pull complete
9a8ea045c926: Pull complete
d4eee24d4dac: Pull complete
c58988e753d7: Pull complete
794a04897db9: Pull complete
70fcfa476f73: Pull complete
806029475e0c: Pull complete
67959b355155: Pull complete
4d217ccd3d4c: Pull complete
0261bb88a4a5: Pull complete
96f2a3ae5539: Pull complete
f6bf99db32d5: Pull complete
bb47d4bbb0e1: Pull complete
4b48ec5d60cf: Pull complete
7280a8dfb767: Pull complete
91091f8d44ca: Pull complete
8ca02cad320f: Pull complete
46009bfec329: Pull complete
f9860b79812e: Pull complete
89ac8103ea67: Pull complete
Digest: sha256:161cb25fbb23a1c5ac5fdd0feebd713edd62c235e199e68b34d1a78205a42da7
Status: Downloaded newer image for jenkins/jenkins:2.146
JeanneBrskysMBP:OracleCodeOne2018-HOL-Automating-Stack-Groovy nyjeanne$ docker pull sonarqube:7.1
7.1: Pulling from library/sonarqube
55cbf04beb70: Already exists 
1607093a898c: Already exists 
9a8ea045c926: Already exists 
d4eee24d4dac: Already exists 
c58988e753d7: Already exists 
794a04897db9: Already exists 
70fcfa476f73: Already exists 
806029475e0c: Already exists 
67959b355155: Already exists 
1e6b3af7f55a: Pull complete 
e0b67c57c8e1: Pull complete 
ce12e009fbe7: Pull complete 
3edf8e47f9c4: Pull complete 
Digest: sha256:4438a37735caa24d80da31ee29e72d686abdaa8f5009746ec60e0d43519e1a57
Status: Downloaded newer image for sonarqube:7.1

4 – The ability to run curl

If you are running Mac, Linux or Windows 10, you don’t need to do anything. If you are running an older version of Windows, you can install Cygwin.

5 – Optional: JDK

If you want to run groovy locally, JDK 8 (not higher) needs to be in your path. It is possible to do the lab without having Groovy installed.

6 – Optional: Groovy

Follow the instructions at: http://groovy-lang.org/install.html

Note: Please download Groovy 2.X rather than 3.X. Version 3.X is in alpha at the time of writing this lab.

Validation:

At the command line, run groovy –version.(Small version differences are ok in the output)

$ groovy -version

Groovy Version: 2.5.2 JVM: 1.8.0_45 Vendor: Oracle Corporation OS: Mac OS X

4 – Disk space

This lab uses about 2 Gigabytes of disk space (not counting Docker itself.) The last step of the lab explains how to recover disk space.

Validation

At the command line, run curl https://www.oracle.com/code-one/index.html and ensure the output isn’t an error message.

 

jeanne conference speaking

Last year, I started speaking at conferences more. Before that, I did a lot of “applying to speak at conferences without getting accepted.”

In December 2016, one of the speakers at the NY Java SIG cancelled. Frank Greco asked some of us regulars if we could speak (on a few days notice.) I sent a list of topics I could speak about. One was mutation testing. I did a great job and Frank recorded it on YouTube. Being able to include that in my speaking proposals made a difference. Or there was a strong correlation. Who knows.

Once I started speaking more, I was able to establish a good reputation.

Last week, at QCon, I got 94% green:

And I’m listed on the featured speaker page for Oracle Code One.

I enjoy presenting. I joined Toastmasters to get better at relaying technical information in an engaging/entertaining way. I think I’ve succeeded.

QCon 2018 – Mob programming mini workshop

Title: Mob programming mini workshop: a whole team approach to the code
Speaker: Harold Shinsato

See the table of contents for more blog posts from the conference.


[I’ve heard this term before, but never experienced it. Curious to see how this goes!]

Concepts

  • “All the brilliant people working on the same thing, the the same time, in the same space, on the same computer” – Woody Zuill
  • Turn up the good.  A team would rotate who types to solve the problem.
  • Far less bugs/tech debt
  • More productive than working individually [that’s not the right comparison]
  • Harold uses at Montano code school.
  • Requires kindness, consideration and respect. Takes time to learn. Psychological safety and empathy are important.
  • The team decides what to do and how to do it. Can’t force it. Just like forced pair programming doesn’t work.
  • Important to go in with plan to experiment and see what works.
  • Mobs of three good for coaching. Hunter uses mobs of 5-8.
  • Rotation time varies. Can switch every 15 minutes or just have one driver.
  • Mob worked with 50 people with language puzzles to learn/work through koans.
  • Introverts need to check out regularly. And that is ok (for mobs larger than 5) because flow continues. A teammate catches up on what you miss.
  • Gets people up to speed faster.

Roles

  • Coach
  • Driver – typist. Can’t have ideas. Just types. Smart input device.
  • Navigator – everyone else. Helpful to start with one navigator so can practice not talking when know answer. Need others to practice leadership and develop expertise.

Problems with pairing

  • Like a date. Awkward if doesn’t work out.
  • Mobbing is safer because in a group. No one person is a single point of failure.
  • Mobbing makes it easier to pair later. Harold uses mobbing before students pair

Strong pairing – where person at keyboard can’t make decisions

Demo – FizzBuzz in JavaScript

  • Updated JavaScript to make tests pass
  • Driver rotated on time or on passing tests. Time better for teaching as rotate faster. Did short iteration of 3 minutes to practice swapping.

Group Retrospective

  • It was obvious to me what needed to be done before it was to the navigator. It felt awkward and timewasting to not say anything
  • It felt really slow [probably because we were all new]
  • As driver, I wanted to go faster than the navigator
  • Hard to see vision. In a real mob, might draw out a plan

In practice

  • Supposed to improve team in long run
  • If someone knows most, they are primary navigator and turn into a leader – helping others.
  • Get better at using tools
  • Mobs of 8 good for teaching
  • Hunter is most experienced of mobs. Switch every 15 minutes.
  • Can speak at higher level if driver understands.

An audience member at Vanguard says her team does this once a day with eight developers.

My take

It would have been helpful to explain what mob programming is before asking who does it and for details. It was interesting to try. I would have liked seeing a video of a good mob doing it too. I can see how this is helpful for learning, but not actual tasks. Which is what people said about pairing at first. (or still do.) So I recognize that I don’t  have enough information/background to appreciate that.

After the session, I talked with an attendee who works at Vanguard. She says they do mobbing at two points:

  • for an hour a day to accomplish a stretch goal (where it sounds like the whole team is learning together)
  • organically – when one person ask another for help, who pulls in another and before long the whole team is involved