- Continuous Integration,Delivery,and Deployment
- Sander Rossel
- 840字
- 2021-07-02 15:42:11
Setting Up a CI Environment
In the remainder of this book, we're going to implement Continuous Integration, Delivery, and Deployment. However, before we start, we must choose some software to work with. As I have mentioned, we have multiple choices for our source control and for our CI server and, of course, we can use a ton of programming languages and databases. Additionally, we need to create some project to work with. This chapter will lay out the technologies that are used in the remainder of the book, as well as a high-level overview of how they all work together. For the test project, we'll create a simple to-do list web app. We'll implement it in Node.js with a MongoDB database and in C# Core with a PostgreSQL database. That way, we'll see CI in action in both frontend and backend development, as well as the popular JavaScript language, the compiled C# .NET Core language, SQL, and NoSQL.
We'll start by building a frontend using JavaScript and the npm package manager, creating unit tests and UI tests in Selenium and Jasmine, and automating these using Karma and Gulp. After that, we'll hook it up to a JavaScript-driven Node.js and MongoDB backend.
With the same frontend, we can build a C# .NET Core and PostgreSQL database backend. We'll use NuGet and Microsoft's unit testing framework as well as MSBuild and MSTest.
Chapter 1, Continuous Integration, Delivery, and Deployment Foundations, starts with source control. For this book, I have chosen Git, as it is a widely used source control system. As for the CI server, we are going to use Jenkins. Both Git and Jenkins are free and can be downloaded and used privately and professionally at no cost. In a real-world scenario, you would install Git and Jenkins on one or two servers that your entire team can access. Likewise, your database may get a separate server as well. However, since you and I, as poor programmers, probably do not have an idle server (or two) laying around, we will make use of Virtual Machines (which is like a computer on your computer). Later on, we will also need an environment to deploy to, so that could be a second or third Virtual Machine (VM). For our VMs, we are going to use Oracle VM VirtualBox. This software is also free to use. Of course, any VM is going to need an operating system, just like a normal computer. I may have given it away earlier, but I am a Windows user. Unfortunately, I don't have some spare Windows licenses laying around and I am guessing you haven't either. Luckily, there is another popular operating system that is free to use and can run Git, Jenkins, JavaScript, and anything we are going to use throughout this book. You have probably guessed that the operating system is Linux. As for the Linux distribution, I am using Ubuntu Server, as it is one of the most used Linux distributions out there (if not the most used). Do not worry, I expect no prior knowledge of any of the tools I mentioned, so I will be taking you through the installations step by step.
I should mention that running a VM is pretty heavy work for your computer, let alone running two. After all, your computer will be running multiple operating systems and all the programs in it. If you have less than 8 GB RAM memory, I recommend not installing everything on your VM (it is possible, but it will not run very smoothly). There is one tool in this book, GitLab for Git, that really needs Linux to run on. You will also need some space on your hard disk. The minimum recommended size for a new VM is 8 GB, but that is not enough for our environment. I would use 30 GB just to be safe (especially if you plan on installing a user interface). We are going to install some other software as well, so reserve at least 40 GB to be on the safe side (for two VMs).
My own system runs Windows 10 and has 16 GB RAM memory, so all of the examples in this book are guaranteed to work on Windows 10 (probably 8 and even 7 as well). The examples may work on Linux and even Mac, but I have not tested them. Some of the explanations are Windows-specific, but most of it is pretty generic.
- 案例式C語言程序設計
- Vue.js 2 and Bootstrap 4 Web Development
- Mastering Entity Framework
- ASP.NET Core 2 and Vue.js
- C#程序設計教程
- SSM輕量級框架應用實戰
- Mastering Apache Maven 3
- Learning Hunk
- RabbitMQ Cookbook
- PHP從入門到精通(第4版)(軟件開發視頻大講堂)
- Python High Performance Programming
- Getting Started with Python
- Mastering Android Studio 3
- Deep Learning for Natural Language Processing
- 趣學數據結構