.NET Days in Zurich, Shift Conf in Split

Last week was a quite interesting week in terms of travel. First I got to visit Zurich again after a while for .NET Day and then I got to visit the Croatian coastal town Split for the first time for Shift Conference.

.NET Days in Zurich

When I used to work at Adobe, part of my team was based in Basel, Switzerland. As a result, I used to visit Basel, Zurich and other Swiss cities quite often. Since I left Adobe, I visited Switzerland only once 2 years ago. I was naturally excited to visit Zurich again for .NET Day.

I arrived a day early for the conference and explored Zurich a little bit. Google has a big office in Zurich with strong engineering. I got to visit that office as well for the first time and spent half day there working from the office.

Talk & Questions

.NET Day is a small .NET focused conference with 2 tracks and about 200 attendees. It was the first time presenting there. I did my “Google Home meets .NET Containers” talk where I show how to connect Google Home mini to a .NET container running in Google Cloud. It’s a fun talk and always get a good reaction from the crowd.

Conference organizers did a couple of special things for speakers. First, we got speaker t-shirts with our names on it. I think this was the first time I got a t-shirt with my name which was nice. Second, they organized a photo shoot with the conference photographer, Irene Bizic. She did an amazing job and as a result, I got a few very nice pictures of myself.

After my talk, I got some questions on the pricing model of Vision API. Someone also asked me about how to test Dialogflow end to end.

Shift Conference in Split

After Zurich, I flew to Split, Croatia. As you might remember, I was in Zagreb, the Croatian capital last October but this was the first time I got to visit the coastal part of Croatia.

I have to say I was impressed with Split. It’s a small town with rich history, great food and good beaches. The weather was very good with 30 degrees and sunny almost every day. I tried food in 3-4 different places and every place was very good. I had opened the beach season back in January in Rio but it had been a while since then and it was nice to swim again one afternoon in Split.

Talk & Questions

This was the first time I spoke at Shift Conference. I was expecting a small conference in a small town but I was totally wrong. Shift is a big well-organized conference (1000+ attendees) with a single track (and a workshop) over 2 days. There were lots of speakers from all over the place, a ton of technical content. The conference happens in an old theatre kind of place and I was super impressed with the stage. It was probably the most impressive stage I ever spoke at.

I did my “Google Home meets .NET containers” talk again. It was super fun again and I got reaction from the crowd both during and after my talk. After the conference, I got some general questions about Google Cloud and Dialogflow.

I have to say the organizers did an amazing job with the conference. There were speaker dinners and parties every night and they really tried to make it a fun event not just for attendees but for speakers as well.

I hope to visit Split again next year and explore more of Croatia and surroundings.

Deploying ASP.NET Core apps on Kubernetes/Container Engine

In my previous post, I talked about how to deploy a containerised ASP.NET Core app to App Engine (flex) on Google Cloud. App Engine (flex) is an easy way to run containers in production: Just send your container and let Google Cloud figure out how to run it at scale. It comes with some nice default features such as versioning, traffic splitting, dashboards and autoscaling. However, it doesn’t give you much control.

Sometimes, you need to create a cluster of containers and control how each container is deployed and scaled. That’s when Kubernetes come into play. Kubernetes is an open source container management platform that helps you to manage a cluster of containers and Container Engine is Kubernetes managed by Google Cloud.

In this cloud minute, I show how to deploy an ASP.NET Core app to Kubernetes running on Container Engine.

If you want to go through these steps yourself, we also have a codelab for you that you can access here.

Deploying ASP.NET Core apps on App Engine

I love how easy it is to deploy and run containerized ASP.NET Core apps on App Engine (flex). So much so that, I created a Cloud Minute recently to show you how, here it is.

It basically involves 3 steps:

  1. Create your ASP.NET Core app using dotnet command line tool inside Cloud Shell and publish your app to get a self-contained DLL.
  2. Containerize your app by creating a Dockerfile, relying on the official App Engine image and pointing to the self-contained DLL of your app.
  3. Create an app.yaml file for App Engine and use gcloud to deploy to App Engine.

That’s it! If you want to go through these steps yourself, we also have a codelab for you that you can access here.

Capture

Windows and .NET on Google Cloud Platform

 

Originally published in SDN Magazine 131 in February 2017.

Introduction

Until recently, there were two distinct camps in the software world: the Windows (A.K.A. closed) world and the Linux (A.K.A. open) world. In the Linux world, we had tools like the bash shell, Java programming language, Eclipse IDE, MySQL database, and many other open-source projects by Apache. In the Windows world, we had similar, yet distinct tools mainly developed by Microsoft, such as the C# programming language, Visual Studio IDE, SQL Server and PowerShell.

picture0

These two worlds existed side-by-side for many years with minimal interaction. You had to pick your side and stick with it. If you had to switch sides, you had to go through a slow process of readjusting your existing tools with similar-yet-quite-different counterparts and it was painful.

In the last few years, the tech world has gone through a gradual revolution. In 2014, Microsoft open-sourced the .NET framework to everyone’s surprise. This was followed by OpenSSH running on Windows in 2015. 2016 was probably the most exciting year with SQL Server and PowerShell running on Linux, Bash running on Windows, and most imporantly ASP.NET Core, the new cross-platform version of ASP.NET, running on Linux, Mac and Windows.

As Microsoft opened up its technology to the world, we were very busy at Google ensuring that .NET has first-class support on Google Cloud Platform (GCP). In 2016, we added support for deploying traditional ASP.NET apps to Windows Servers on Compute Engine. We introduced a Visual Studio plugin and PowerShell cmdlets to manage GCP resources. We made Microsoft SQL Server available on Compute Engine. Last but not least, we started supporting containerised ASP.NET Core apps on App Engine and on Kubernetes running on Container Engine. I cover both in detail later in the article. As a result of our work, Google joined the .NET foundation in November 2016. It was a busy year!

It is very exciting that the Windows and Linux worlds are coming together, and opening up many opportunities for .NET developers. In the rest of the article, I want to talk specifically about what GCP is doing for .NET.

Google Cloud Platform

GCP provides a number of services and tools for developers to build on top of Google’s infrastructure. Java, Python, Go, Node.js, Ruby, PHP and of course C# are some of the supported languages. Let’s take a look at the options you have when it comes to application development.

picture1

At top of the chain is Cloud Functions. This is the serverless platform for event-driven microservices. It currently supports Node.js functions. The beauty of Cloud Functions is that you only need to worry about writing and deploying your function and Google takes care of running that function at scale. This is perfect for simple apps with a limited number of specialised microservices.

Sometimes, you need more than a function. You need an application with frontend and backend talking to different services. For those kind of apps, GCP offers App Engine. The idea behind App Engine is similar to Cloud Functions, in that you write your app and let Google manage and auto-scale it as required. The underlying infrastructure is abstracted away from you which means you don’t have to deal with DevOps.

If you already made the switch to containerised apps using Docker and need more control in how your app is structured and run, there’s Kubernetes and Container Engine (GKE). You can very easily get a Kubernetes cluster running on GKE with a single command and deploy your containers in any configuration you like.

Finally, if you want full control, GCP has Linux and Windows Server virtual machines (VM) running on Compute Engine. Since they are VMs, you have full control on what gets installed however, you also have full responsibility which means that you need to manually configure auto-scaling, patch software, and so on.

GCP provides a number of ways to support your app development. Let’s take a look at how GCP specifically supports .NET apps.

Windows Server, SQL Server, traditional ASP.NET on Compute Engine

If you have a traditional ASP.NET app running on Windows, you can easily take that app and migrate it to Compute Engine on GCP.

First, you need a Windows Server with the ASP.NET framework installed. Thankfully, GCP has Cloud Launcher which makes it really easy to explore, launch, and manage production-grade solutions. It is literally a couple of clicks to get a Windows Server with ASP.NET framework installed in a Compute Engine VM.  

picture2.png

If your app uses SQL Server, there are pre-configured SQL Server images that you can install on Compute Engine VMs and you can use Visual Studio to publish your ASP.NET app to your Compute Engine VMs.

picture3

ASP.NET Core on App Engine and Container Engine

ASP.NET Core is the next generation, multi-platform version of ASP.NET. It is the leaner version of traditional ASP.NET framework and runs on Linux, Mac and Windows.

picture4

App Engine has been around as a PaaS offering from Google for a while but it wasn’t available to .NET developers until ASP.NET Core came along. It is now possible to wrap an ASP.NET Core app into a Docker container and deploy that container to App Engine to run. The main advantage of App Engine is that it abstracts away the infrastructure, so developers simply deploy their app and the day-to-day running and scaling of that app is done by Google.

If you want more fine-grained control on how your containers are structured and deployed, you can always create a Kubernetes cluster on Container Engine (GKE). GKE makes it trivial to create a cluster and Kubernetes makes running containers easier by providing a high level API to automate deployment, scaling and running of containers in production.

.NET libraries for Google Cloud services

Once you have your app running in Google Cloud, many services automatically become available to your app through native .NET client libraries.

picture5

You can integrate with services like Cloud Storage for binary storage, Pub/Sub for messaging, BigQuery for incredibly fast queries, Vision API to detect images, and many other machine learning APIs such as the Natural Language Processing API, Speech API, and Translate API.

By running on Google Cloud, you will automatically gain access to these new capabilities as new services are added, and that’s the beauty of the cloud.

Cloud Tools for Visual Studio

GCP has a Visual Studio plugin to manage cloud resources directly from Visual Studio. It is available from the Visual Studio Gallery and can be installed directly within Visual Studio. It provides some ASP.NET MVC and Web API templates to work with GCP projects. It also has a Google Cloud Explorer where you manage see and manage Compute Engine and Cloud SQL instances, as well as Cloud Storage resources.

picture6

Cloud Tools for PowerShell

PowerShell is a command-line shell and associated scripting language built on the .NET Framework. It’s the default task automation and configuration management tool used in the Windows world.


Cloud Tools for PowerShell is a collection of cmdlets for accessing and manipulating Google Cloud resources such as Google Compute Engine, Google Cloud Storage, Google Cloud SQL and Google Cloud DNS —with more to come!

picture7.png

Conclusion

We’re going through some exciting times. With Windows ecosystem opening up and ASP.NET Core’s multi-platform story, there are a lot of new opportunities for .NET world. At Google, we’re serious about supporting Windows and .NET workloads on Google Cloud Platform. It’s a great time to be a .NET developer for sure!

Links

https://cloud.google.com

https://cloud.google.com/dotnet

https://cloud.google.com/windows

https://codelabs.developers.google.com/windows

Google Cloud Next’17

In my previous post, I promised to talk about some good conferences I’m attending or speaking over the coming months. One of those conferences that I’m most excited about is Google Cloud Next’17: Google’s main cloud conference happening March 8-10 in San Francisco.

google-next-logo

Last year, I attended that conference as a Noogler. There were a lot of developers and great technical content. This year’s schedule has just been published and it looks even more exciting, especially if you’re a .NET developer!

First, a shameless plug. I’m speaking at Next’17 and my session is called Take your ASP.NET apps to the next level with Google Cloud.  I will talk about how to migrate existing ASP.NET apps to Google Cloud and what kind of benefits you get by running your ASP.NET apps on Google Cloud. It should be an informative and fun talk for .NET developers.

I’m also excited about Running .NET and containers in Google Cloud Platform session by Jon Skeet and Chris Smith. This session will be about deploying ASP.NET Core apps to App Engine and Kubernetes on Container Engine. ASP.NET Core and Kubernetes are both hugely popular in the development world and I’m so happy that Google Cloud supports ASP.NET Core apps on Kubernetes in a big way.

You probably didn’t know but you can run Windows Server and Microsoft SQL Server on Google Cloud and there’re sessions for both of them on Next’17. Deploying Windows-based infrastructure on Google Compute Engine and Microsoft SQL Server on Google Compute Engine should both be interesting sessions to get to know about all the details.

Apart from all of the great Windows and .NET sessions, sessions on Serverless architectures (cloud functions), Machine Learning, big data processing with Dataflow all sound very interesting. Not to mention, we will have a ton of codelabs at Next for people to get hands-on experience with Google Cloud.

As a .NET developer, I have a lot of reasons to be excited about Next’17. Hope to see some of you there!