This article is mainly to talk about Jenkins, but Jenkins, I have no way to not put it with continuous integration (continuous integration, referred to as CI) together, so I first to talk about what is continuous integration and why need continuous integration?
I give a visual example of life, the recent home has just finished decoration, found that the process of decoration, there is a lot of continuous integration of ideas, such as the floor, your house 50 flat, 80 flat, 100 flat, and a bedroom living room, but the size of the plate is unified, and are small pieces, Small and flexible is a key to continuous integration, and secondly, no matter where the floor to start from a side, a piece of the shop, spread out a piece of a knock let the ground plate tightly arranged together, and then paved another piece, if found this piece is defective, hurriedly change another piece, not all paved, and then together check. You can think of each floor as a single line of code, and continuous integration is when you write a line of code that integrates one test at a time. Again, such as home to install water pipes and circuits, the floor is finished to test whether the pipe is knocked down, the line is paved, and the water pipe is ready to use. If all the re-test, the problem may affect each other, such as the circuit can not do? may have to pry open the floor ... Then each part of the test is tested, which is part of the ongoing integration. All renovated, you go to the acceptance, found that the color of tiles and wallpaper color mismatch, the pool has cracks, toilet leaking, rework it, the cost can be too big, so as every part of the completion, you go to use the trial acceptance, this is still part of the continuous integration. You can think of the circuit, the water pipe, the floor as a feature, do not complete a feature will be an integrated acceptance, and not all finished before the integration of acceptance. The value of such continuous integration is not yet a metaphor.
The development and release of Internet software has formed a set of standard processes, the most important part of which is continuous integration. The popular point of continuous integration is the fast paced, frequent, code-in and testing. Today, the cloud computing platform is improving, the container technology is widely popularized, the micro-service transformation is in full swing, the agile development release process of small-speed running is getting more and more in-depth every business and developer's daily work, all of which derive a remarkable feature of the current Internet mode, that is extremely fast product iteration and delivery, 7* 24 hours online as well as problem response repair timely. This is very different from the traditional waterfall and other development modes, and continuous integration is the basic guarantee of all this. The core measure of continuous integration is that every line of code you write must pass automated testing when it is combined and published. As long as one test case fails, the entire process terminates, and continuous integration does not eliminate bugs, but makes them very easy to spot and correct. The emphasis here is on the "automated" integration of a keyword, and we're going to feel what happens if there's no automation.
If there is no comparison there is no harm, if there is no automated continuous integration, the first contradiction point will focus on, Dev and ops, that is, one to change, one to be stable. For a service on-line release, testing, upgrade deployment is unavoidable, as OPS personnel often exist a scene is: Do not understand the business, the developer every step of the written clear Operation Guide, step by step implementation, do not ask why, out of the problem to find development, all of your pot. Developers must be very angry, what is the use of this ops, robot? And the OPS staff most hate is the change, I wish you to develop the characteristics of the decade, ten years to change the better. Testing is also a similar problem, you write each line of code in the next if not the full amount of testing again, who can guarantee that no problem? If you follow the idea of continuous integration, the test will complain because you have to run the same test case repeatedly because of your small steps, and that is where the benefits of automation are, and Jenkins is the tool of automation integration. Finally started the text.
Jenkins is a widely used Visual Web tool for continuous building, which is more straightforward to build, such as: Automation, performance, packaging, deployment, release & release results automation validation, interface testing, unit testing, and more. Jenkins can support a variety of languages (such as Java, C #, PHP, etc.) project building, but also fully compatible with Ant, Maven, Gradle and other third-party building tools, while with SVN, git can seamlessly integrate, also support direct and well-known source code hosting site, such as GitHub, BitBucket direct integration. To put it simply, Jenkins is really a big frame set that can integrate everything you want to achieve the entire continuous integration System of the company! Everything you can think of, and can't think of, and Jenkins is free to deploy on various platforms: Windows, Linux, Mac. Such an excellent tool if you get an installation deployment to use it? With the AOS sample template, you don't need to download software, configure, really, automate, and give you a continuous, integrated experience!
This sample Template Jenkins Service (jenkins-with-cluster) helps you deploy the Jenkins service, and after successful deployment, you can access the Jenkins service through the Web URL presented through the outputs interface. The resources created by the stack include VPC (virtual Private Cloud), Subnet (subnet), Cluster (cluster), Deployment, Statefulset, service, and secret. Before using this template, you need to ensure that there is at least one key pair available, and if you do not have a key pair, click here to create it.
"Deployment results show"
- The browser opens with the following initialization interface, which can be initialized according to the Jenkins process
"Detailed Deployment Process"
- To create a stack using the Jenkins Service sample template, click Create Stack
- Fill in the stack name and description.
- Fill in the input parameters.
(1) Basic resource configuration: Fill in the availability Zone, CCE cluster specifications, node specifications, key pairs.
(2) Jenkins Configuration: Jenkins Mirror address, access port service number
Note: The Jenkins service port fills in the range 1~65535.
- Click Next, review the configuration information, view billing information, and click Create Stack.
- Confirm that the CCE service is open
- Wait for the creation to succeed.
- View stack output parameters, get Jenkins Service access address http://49.4.92.105:32129,