.NET Oxford Meetup IX: ELK, Docker, and Kubernetes


On Tuesday, it was our last .NET Oxford of the year! And given that our first ever meetup was in January, this now marks our first whole year!

We're usually based upstairs in a larger room which can hold over 100 guests. Unfortunately, our usual room is always unavailable during the December month, due to Christmas events that the venue hold. So for this one time, we were limited to just 40 attendees. Which also meant that it was the first time we've had Meetup.com RSVPs going into the waiting list! Which isn't a bad problem to have I guess!

Being December, it would be rude to not have a bit of a Christmas theme going on, and our amazing sponsors Corriculo very kindly brought in plenty of mulled wine and mince pies! They even provided everyone with a party bag to take home! This certainly went down well with my kids the next day!

audience

Intro and Prize Draws

Matt took the stage first with the intro talk again, allowing me to focus on my talk. Doing a fantastic job again, briefly talking about .NET Oxford and what we're about, before moving onto the news items (see below).

He also reminded everyone about our plan to have a .NET Oxford celebrationary meal in January to celebrate our first year. We have a Doodle poll with some dates, and it's looking highly likely that it'll be the 26th January. We'll keep everyone posted when we have more concrete information.

Finally, he wrapped up with the prize draws! Again, braving my Prize Draw app. Details of both the prizes and the winners can be found below!

matt

News Items

Visual Studio Live Share

This is seriously cool! One of the announcements from the MS Connect was a new technology called Visual Studio Live Share. This basically allows developers to collaborate in real time on different machines, in different locations - pretty much in the same way as you'd collaborate on a document in Google Docs. This works across both Visual Studio and Visual Studio Code, and vscode can be running on different Operating Systems by each user too. You see the other user's cursor, with a tooltip showing their name. You can both interact with the code, and you can even share a debugging session, where you can both inspect variables, the callstack, etc, etc. This isn't available quite yet, but should be coming very soon. I'd highly recommend spending 10 minutes watching the video where they demo this.

Linux Containers on Windows

The next news item came from a blog post by Scott Hanselman. With the latest beta version of Docker for Windows, and the very latest version of Windows 10 - you can run Linux containers natively without a Hyper-V virtual machine! As someone who's primary laptop only has 8gb of RAM - this certainly comes as good news!

Prize Draws

After the news, Matt did the prize draw, where we had our usual three prizes from our awesome prize draw sponsors...

Jetbrains

Congratulations to Daniel Hall for winning a second time - this time taking away a year-long Jetbrains product licence of his choice! Last time, he won the Oz-Code licence.

Manning Books

The winner this time was our speaker, Shahid! I'm not sure how that one slipped through the net - as we normally do a re-draw if one of us wins - but, well, I blame Matt ;-) Anyway, congratulations to Shahid for winning the Manning eBook, where he chose Kafka in Action!

Remember that we have our special Manning coupon code (ug367) which gives all of our members a 36% discount on any of their e-books! They've also asked me to share a link to some of their new courses for their LiveVideo system.

Oz-Code

Congratulations to Andrew Heys, who won the Oz-Code licence! If you haven't used Oz-Code before, it's a Visual Studio extension that puts your debugger on steroids!

If you haven't checked it out, definitely download the trial and have a play. All our member get a free 3 month trial licence (see below) or 50% off a full licence! To claim, you can visit this link to pick up your licence!

prize sponsors

Primary Sponsors: Corriculo Recruitment

As usual, our awesome Primary sponsors Corriculo Recruitment were on hand, not only covering the venue and drinks, but also helping us out a lot on the night too. And given that this was December, they decided to go with a Christmas theme, and very kindly provided mulled wine and mince pies too! And if that wasn't enough - they even provided party bags for the guests! Something my kids loved the next day!

A massive thank you to them for being such a great part of the .NET Oxford team. Whilst being a recruitment company - they've never pushed recruitment in anyone's face, and have always gone above and beyond. So given they haven't pushed recruitment - it's only fair that I do it for them - so, if you're a developer looking for your next role, or a company looking for .NET developers - then definitely get in touch with them! And of course remember to mention .NET Oxford!

corriculo corriculo

Docker and the ELK Stack (me!)

The first talk of the night was by yours truly! This is the first longer talk I've ever done (ie. not an intro or a lightning talk). It turns out that a 55 minute talk goes just as quickly as a 20 minute lightning talk! I really enjoyed it, and luckily the demo gods did behave themselves!

A few months ago, I was investigating a bug, and found that spinning up the Elk Stack locally with Docker was both extremely fast to do, and also very useful as a development tool to dump and visualize your data. It helped me solve both this bug, and also find a few other bugs that we didn't even know about.

So I wrote a blog post about it, which can be found here.

The main topic of the evening was initially going to be all about Kubernetes - ie. Shahid's talk (see below). However, his talk assumes that the audience already has a prior knowledge of Docker and containers. So we decided that it would work well if I made a talk out of that blog post, and also introduced Docker and containers as part of it. This seemed to work well, and gave a nice prerequisite for Shahid's talk.

I started off introducing the ELK Stack and what it was. Then I moved over to talking about Docker and explaining containers, the Docker CLI, Docker Compose, images, Docker Hub, etc.

Then over to my first demo! I quickly created an MVC app using the dotnet CLI, and then used the vscode Docker extension to add Docker support to the project. I published the MVP app, built a Docker image, and pushed it to Docker Hub.

Then creating a brand new folder with just a docker-compose file in it, I showed spinning up a container from this. The purpose of this was to show how easy it is for a colleague to use your images hosted on Docker Hub on a different machine with just the docker-compose.yml file.

Back to the slides, I spoke a bit about a logging framework called Serilog, which is what I used to write data from .NET into the Elastic Search database (ie. the 'E' of ELK). Explaining how we can use the fact that Serilog writes structured typed data to our advantage.

Then demo time again to put it all together! Using a project from GitHub, I showed how easy it is to use docker-compose up to spin up the ELK Stack locally. The only change I made to that project was to add a volume so that the database files live outside of the Elastic Search container. I used this as a good place to explain Docker Volumes.

Then, I added data to the ELK Stack both from LINQPad and the MVC application I created earlier in the talk. From LINQPad, I just plotted a sine wave, and showed how to set this up as a Dashboard in Kibana (which is the 'K' of ELK, and is the web-based UI for the ELK Stack). This is what my blog post talks through.

Then, in our MVC app, I showed adding Serilog support, and rebuilt and pushed our image again to Docker hub.

Finally, modifying the docker-compose.yml file in the docker-elk project to include my MVC app - I spun up the ELK Stack again, and showed navigating, filtering, and querying the logs from our MVC app in Kibana.

It's surprising by how much work actually goes into these talks. When you're watching a talk, it's very easy to not really appreciate the time, effort, and commitment spent prior to that one single hour that you're watching it. Doing one myself has really helped me appreciate all the work that each of our speakers do to deliver these talks.

Links:

dan

Kubernetes for .NET Developers

The second talk of the night was by Shahid Iqbal, talking about Kubernetes! This is a topic I've wanted us to cover for quite a while - so was very pleased when Shahid agreed to come and speak about it.

Kubernetes is a container orchestration platform. Using containers locally using Docker is really easy, as I demonstrated in my talk. However, putting that into production in the cloud and managing scaling, health monitoring, load balancing, etc ... not so much. This is where container orchestration platforms like Kubernetes come into play. They manage all this stuff for you. You just tell it what you want, and it'll ensure that's what you have running in your Kubernetes cluster. A very "desired state" approach - ie. you just tell it what you want, instead of how to get there.

It's also quite easy to play around with locally, thanks to Minikube...

Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.

Unfortunately, the Demo Gods decided not to behave in Shahid's Minikube demo, and his pods decided not to start! Luckily, he came very well prepared with a backup, and used the amazing Katacoda site to continue his demo, so all was well! If you haven't seen Katacoda, I'd highly recommend taking a look. It's a site made by Ben Hall allowing you to interactively learn various technologies - eg. Docker, Kubernetes, and many more. The great thing is, that you actually get real command prompts on the site, each run in their own containers. So when they say 'interactive', they really mean it! Using this allowed Shahid to demo the Kubernetes in one of these shells instead of locally.

One of Shahid's very early-on slides showed some companies which currently use Kubernetes. Some of which, weren't really a surprise. But one company that really stood out was the Home Office! I don't think anyone was expecting a government site to be so cutting edge!

He then went through explaining what Kubernetes did, and some of the core concepts - before moving onto the demos. There was plenty of command line stuff - which I definitely like to see! He then discussed Kubernetes YAML files, and how you can use them to describe your application architecture.

He also demoed updating a webapp he deployed earlier, describing how rolling updates worked.

It occurred to me whilst watching his talk, it would have been cool to link my talk and his, by him spinning up in his Kubernetes cluster, the ELK Stack and MVC app that I pushed to Docker Hub in my talk. Would have made a nice little twist to link the talks that way.

A massive thank you to Shahid for making the trip, and covering a topic that I for one, am extremely excited about!

Links:

shahid

Upcoming

Whilst this was the last meetup of the year, we most certainly haven't forgotten about 2018! We have a great line-up so far, with the following meetups already announced ...

Jan 16th: Deep Diving into Razor and Async!

This one will be a bit of a .NET Southwest takeover! We have the two organisers, Joseph Woodward and Stuart Lang down. Joe will be talking about Razor in ASP.NET Core, and Stuart will be talking about Async in C#!

Feb 6th: A Piece of Cake!

In February, Gary Ewan Park, one of the main Cake contributors, will be making the trip down to tell us all about Cake! Knowing how much our sponsors like themed nights - I'm guessing there's be a bit of cake there too! If not, I'll bring some myself!

March 13th: Twelve Factor Apps

In March, Ian Cooper, one of the organisers of the London .NET user group, will also be joining us to talk all about 12 Factor Apps!

May 8th: Entity Framework Core and Performance Tuning

In may, we have Ian Smith talking about EF Core, and also delving into the performance tuning side of things. This hasn't yet been announced on Meetup.com, but should be very shortly!

Finally, on to the Pub!

As usual, after the meetup, a few of us headed down to the pub. And as usual, I completely forgot to take any pictures at the pub to include here! So here's one of me with a drink at the event instead! Thanks again to Corriculo for the Mulled wine - it went down rather well!

dan

Always great to catch up and chat at the pub afterwards though, as there's less opportunity at the event itself.

Have a great Christmas and New Years everyone, and hopefully see you at .NET Oxford in the new year!


Please retweet if you enjoyed this post ...