Posts

Showing posts with the label CD

Continuously deploy infrastructure with GitLab Pipeline

Continuously deploy infrastructure with Gitlab Pipeline Few weeks ago we saw how we could Setup continious integration and deployment to deploy an application using Gitlab Pipeline . We configured a service with systemd and had an ASP NET Core application automatically deployed when code was pushed to the repository. This automation allows us to reduce interaction with the server and reducing the manual work. The “infrastructure” configurations like systemd service files and nginx site files must also be created or edited on the server therefore it makes sense to also have them automatically deployed. On top of that, it makes even more sense to have them save in repository and source controlled. Today we will see how we can leverage Gitlab Pipeline to setup a continuous deployment for our infrastructure files in three parts: Setup the repository Setup the runner job Deploy the configurations 1. Setup the repository We start first by creating a repository with the same struct...

Setup a CI/CD pipeline with Gitlab for ASPNET Core on Ubuntu

Setup a CI/CD pipeline with Gitlab for ASPNET Core on Ubuntu Few weeks ago I explained how we could setup a CI/CD pipeline whereby the runner would be on Windows and the last stage was to package the application. Today we will see how we can setup a runner on Ubuntu CI server and use it to build and deploy an ASP MET Core application onto a Ubuntu 16.04 server. This post will be composed by three parts: Setup the runner on the CI server Setup the application on the server Setup the job in our project If you are unfamiliar with Gitlab pipeline and its terminology, you can read my previous post where I explain the main concepts behind GitLab pipeline with runner, jobs and stages . If you are unfamiliar with ssh and systemd, you can read my previous blog post on useful ssh commands and my previous blog post on how to manage Kestrel process with systemd . 1. Setup the runner on the CI server Setup the runner on your CI server by getting the package with apt-get. curl -L https...

How to setup Continuous Integration/Deployment with GitLab for ASP NET Core application

Image
How to setup Continuous Integration/Deployment with GitLab for ASP NET Core application In any application, Continuous Integration and Continous Deployment environments are important to setup to remove respectively the risking of breaking your application while pushing code to master branch and having to manually deploy your application each time you need to either test it or deliver it. GitLab comes with a set of features to integrate quickly CI/CD to your application for free! Today we will see how we can setup CI/CD by leveraging the free services from GitLab. This post will be composed by 4 parts: 1. Overview of the scenario 2. Setup a runner 3. Configure your job 4. Monitor your deployment on GitLab 1. Overview of the scenario The example that I will take is an ASP NET Core application which runs as a Windows service. My scenario is the most simplistic one may have: I want to setup CI, meaning build and running test and detect break in my code at each push to master branc...