Fluent Bytes

"The only source of knowledge is experience" - Albert Einstein-

Just released: Introduction to Docker on Windows with Visual Studio 2017

In this new course, I teach you how to use Docker to deliver solutions to the Windows platform. First, you’ll explore the options and capabilities Docker offers on the Windows platform. Next, you’ll delve into how Visual Studio 2017 simplifies the use of Docker in the development cycle. Finally, you’ll learn how to implement a delivery pipeline with Visual Studio Team Services (VSTST) or TFS to deploy to any of the target platforms, ranging from single windows server to a cluster of machines managed by cluster managers like Kubernetes or Service Fabric. By the end of this course, you’ll be able to explain how containers work on windows, how to build Docker containers to run new or existing workloads, and how to deploy your applications to different container hosting solutions on premise or in the cloud.

Here is a brief video introduction that gives you an idea of the course.

Here is the outline of the course:

Module 1: Introduction to Docker on Windows with Visual Studio 2017

  • Running Containers and Docker
  • What Is a Container?
  • Containers vs. Virtual Machines
  • Containers vs. Docker
  • Docker Command-line
  • Difference Between an Image and a Container
  • Inspecting Images and Layers
  • Running on Windows
  • Development Tools
  • Docker Compose
  • Docker Commands Needed to Understand Visual Studio
  • Which .Net Framework to Choose?
  • Container Clusters

Module 2: Docker and Visual Studio

  • Using the Docker Tools in Visual Studio 2017
  • Docker Files Added
  • The Docker file Debug/Release Trick
  • Yaml Files Added
  • The Yaml File Trick
  • Volume Maps on the Containers
  • Use the Visual Studio 2017 IDE to Build Containers
  • Debugging Your Cross-container Solutions with Visual Studio 2017

Module 3: Handling Data in Containers & Testing

  • Handling Data in Containers
  • Setting up Volume Mappings to Manage State
  • Using the Volume Mapping Commands
  • Running SQL Server in a Container
  • Creating and Running SQL Server Images
  • Leveraging Immutability for Testing
  • Integration Test Using a SQL Container That Resets After the Tests

Module 4: Docker and Your Continuous Delivery Pipeline in VSTS

  • Understanding Containerized Builds
  • Running a Build in VSTS
  • Setting up the Build
  • Configuring Build Agents to Build Containers
  • Setup a Custom Build Agent
  • Setup a VSTS Build for Your Containers
  • Understanding Tags
  • Deploying Your Containers Using the Release Pipeline
  • Deploy Your Containers to a Container Host
  • Pushing Images to Azure Container Registry or Dockerhub
  • Create and Use an Azure Container Registry

Module 5: Deploying to Azure Container Services (ACS)

  • Why Do You Need Clusters?
  • Understanding Azure ACS
  • Create an ACS Cluster Running Kubernetes
  • Deploying Your App to the Cluster by Hand
  • Kubernetes Cluster Anatomy
  • Deploy Containers to Kubernetes Cluster by Hand
  • Deploying Your App to the Cluster Using VSTS
  • Zero Downtime Deployment Using VSTS and ACS with Kubernetes
  • Scaling Your Apps and the Cluster
  • Alternative Cluster Solutions

Module 6: Deploying to Azure Service Fabric

  • Understanding Azure Service Fabric
  • Same Rules Apply as to ACS
  • Create a Service Fabric Cluster
  • Deploy Containers to Service Fabric by Hand
  • Deploy Containers to Service Fabric with VSTS

You can find the course here at the PluralSight website: https://app.pluralsight.com/library/courses/docker-visual-studio-2017-windows

Not yet a PluralSight subscriber? No worries, you can still watch the course for free with a trial subscription.

Hope it helps to get you up to speed with Docker on Windows!

My Session Slides from Techorama: “Architecting systems for continuous delivery”

Last week I presented a session at Techorama in Belgium with the title “Architecting systems for continuous delivery”. It was a fully packed room and was great to do.

I got multiple requests to share the slides, so here goes

Enjoy !

Slides are here

Optimizing your (Windows) docker images with multi staged Docker builds

Last week I visited Docker con 2017 where Docker announced a whole lot of new features, under which a new feature in the docker build command, called multi staged builds.

These multi staged builds are extremely convenient to create images that are of minimum size. I am mostly using Docker on Windows, but this feature works on any version of Docker. When using Windows images, you might have noticed they are pretty large in size. Making your image as small as possible makes a big difference. So I will show you, based on the example I have used multiple times, how to create an optimized image to run an existing ASP.NET MVC 4.x on Windows Server Core.

Continue reading

How to work around docker-compose DNS issue with docker on windows

When you create a new docker image that is part of a container composition that you want to run on one and the same host, you can run into the issue that the independent containers are not able to reach each other via DNS resolving.

So lets assume you have the following compose file where you want the web tier to be able to reach the database tier given the following compose file:

Continue reading

Fixing “HNS failed with error : Unspecified error” on docker-compose for Windows

The past few days I worked quite a lot with docker-compose on my windows machine and after something strange happened to my machine that crashed it, I was not able to start any containers anymore that had connectivity over the network with each other.

Every time I used the command-line docker-compose up, I would get a message telling me it failed to start the container. the full message I got was:

“ERROR: for web  Cannot start service web: failed to create endpoint aspnetblogapplication_web_1 on network nat: HNS failed with error : Unspecified error”

Continue reading

Testing web apps on Edge using CodedUI

Recently Microsoft added the capability to CodedUI to test on the Edge browser. For this they extended the cross browser playback capability. This uses Selenium under the hood. So the steps to make this work are as follows:

 

  • Install the plugin “Selenium components for Coded UI Cross Browser Testing” from the Visual Studio Gallery (found here)
  • Download the Edge driver that matches your windows 10 version (found here)
  • Install the driver to the following location : %ProgramFiles(x86)%\Microsoft Web Driver

And finally in the code you need to switch the browser you want to launch. You need to provide the following name to start edge:”MicrosoftEdge”

BrowserWindow.CurrentBrowser = “MicrosoftEdge”; 

And that is it!

Happy testing on Edge Smile

My VSLive Sessions

If you attended one of my sessions, I hope you enjoyed them. I had a great time.

czkn1fvw8aey3mm

For your reference you can find the PDF’s here and the accompanying demo code.

Continuous delivery on azure: A/B testing, Canary releasing and Dark launching

If you are more interested in Continuous delivery, you also might like my just published course at Pluralsight called “Building a Continuous Delivery Pipeline with TFS and Visual Studio 2015” which you can find here: https://www.pluralsight.com/courses/tfs-visual-studio-2015-implementing-continuous-delivery

My second session was on Micro Services and you can find the PDF here:

VSH11 Exploring Microservices in a Microsoft Landscape

And the final session was on building maintainable cross browser UI tests with either selenium or codedUI. The PDF can be found here:

VSH16 Writing Maintainable X-Browser Automated Tests

and you can find the demo’s here: Search google

Also if you want to learn more about CodedUI, you can also watch one of my two courses I build for Pluralsight here:Test Automation with CodedUI Pluralsight which explains in detail all that can be done with CodedUI and Testing Web Applications with CodedUI Pluralsight which is focused on testing web applications.

if you don’t have a subscription yet, you can watch it for free with the free trial

Hope you enjoyed it, if you have comments or feedback let me know!

Cheers,

Marcel

Devintersection sessions

Last week I presented two talks at Devintersection europe. My first talk was about Modern Application architectures and you can find the pdf of the deck here

the second session was on Cross browser testing of web applications using CodedUI. I also have the pdf of the deck available here

And here are the two demo’s I showed to build maintainable test automation using Page Objects and the concept of DAMP testing (Descriptive And Meaningful Phrases).

Search Google

MVC Music Store

Also if you want to learn more about CodedUI, you can also watch one of my two courses I build for Pluralsight here:Test Automation with CodedUI Pluralsight which explains in detail all that can be done with CodedUI and Testing Web Applications with CodedUI Pluralsight which is focused on testing web applications.

Hope this helps!

How to fix “Error: This access control list is not in canonical form and therefore cannot be modified. Error count: 1”

In my previous post about Deploying ASP.NET 4.5 to Docker on Windows I forgot to mention that you might run into an issue when running webdeploy.

Julian Perrott, commented on my post and asked if this is an issue. I think it is an issue and that the install does not complete correctly. But there is an easy fix for this as well. What you can do is add a small PowerShell script to your Docker image and run that after the first attempt to deploy the website. Then the next step is to run the script to fix the ACL’s and then again run web deploy. I have not yet tried this on the latest Windows server 2016 bits, but on the Technical preview 5 this worked like a charm.

You need the following script to fix the ACL’s:

This script doe nothing more then getting the ACL on the path and then re-apply it. this will make windows fix the ACL and make them in canonical form again.

You can add this to your dockerfile and make it part of your standard install of a website in your release pipeline.

So this does nothing more then adding the little PowerShell script to the container and then using that in the step after deploying your website

Hope this helps!

How to Fix Application insights Live Metrics stream on Azure Mobile Apps

In preparation for Tech Days 2016, I was working with my colleagues on the Techdays app and for this we also have a backend system. This system is running for some time now and we want to have better insights into the usage of the website and the mobile app.

One of the latest additions to application insights is the capability of Live Metrics, where you can see the current traffic coming into your website or API.

For this you can simply add a NuGet package, which is currently in pre-release, but works great.

Once you install the package and run the website, you will see the Live Stream tile light up in the Azure portal and when you click it you will see a couple of live graphs showing actual traffic on the site or API

Of course we wanted to host our backend very simply on Azure Web apps and for this specific purpose on Azure Mobile Services, Since that is what we use as the mobile backend of the application. But apparently there are some subtle differences that prevent AppInsights to work properly if it comes to Live Metrics.

Continue reading

« Older posts

© 2017 Fluent Bytes

Theme by Anders NorenUp ↑