Welcome to the first part about DevOps and automating the deployment for the .NET Core apps with the usage of Docker, Travis CI (I’ll also mention how to use BitBucket Pipelines) and Rancher. The purpose of this tutorial is to show you that setting up the CI & CD for the projects that you’re working on is not as complex as it may seem at the first glance. The slides for the presentation can be found here.
At first, let’s discuss what is the aim and what technologies are we going to use. In the first part, we will not make use of the Rancher, which is a topic that will be covered in the second episode.
The cross-platform and open source framework for building the applications using C# language. In this tutorial, we will make use of the Fibon project, which is a simple, distributed application that we’ve built during the .NET Core Tour in order to show, what .NET Core is capable of and how easily such application can be deployed later on to the cloud.
An open platform to build, deploy and run your applications in a distributed way by using the concept of containers. Thanks to this technology, we are able to create a so-called image of our application and then run it inside a container, which will make use of the underlying operating system and provide a separate environment for the application that we want to start. It is a much faster (and different) approach than using the typical virtual machines.
One of the available build servers (amongst other ones such as TeamCity, Jenkins, BitBucket Pipelines – this one is also mentioned in the video) that is capable of building our project whenever there’s a new push to the Git repository. Easy to start with, includes powerful extensions and is free for the open source projects.
During the first part, we want to achieve the following goals:
- Travis CI builds the project once the code is pushed to the Git repository.
- Docker image will be pushed to the Container Registry.
- Docker Image will be ready to deployed on the server.
- Application will run on the Linux VM (Ubuntu Server) via Docker Compose.
- Nginx will handle the incoming HTTP requests via reverse proxy mechanism.
As you can see, although there are quite a few things that are fully automated, we are still missing the part related to the automated deployment of the new Docker images, orchestration and services management. This is something that we will cover in the next part with the help of Rancher. For now, follow the screencast available above (you can also download it here) and take a look at the slides.