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.
Planujesz omówić też w przyszłości w tej serii jak korzystasz ze slacka ?
Slacka można podpiąć jako webhook np. do wysyłania wiadomości o pomyślnym (albo i nie) buildzie projektu. W sumie nie myślałem o tym ale może uwzględnię.
Pingback: Dew Drop - October 23, 2017 (#2587) - Morning Dew
Super sprawa że zająłeś się dockerem. właśnie zaczynam z nim przygodę.
Samym Dockerem już dawno temu, teraz chcę pokazać jak to wszystko można ze sobą powiązać :).
Pingback: The Morning Brew - Chris Alcock » The Morning Brew #2449
Pingback: .NET Core DevOps with Docker, Travis CI and Rancher – part 2 | Piotr Gankiewicz
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
Very helpful advice in this particular post! It’s the little changes that make the largest changes. Thanks for sharing!
I like this article, it is very meaningful and detailed, I hope you will have many good articles like this to share.