650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/89/B7/wKioL1gazNSC3xT9AADyMPyVmnw418.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 1.jpg "alt=" Wkiol1gaznsc3xt9aadympyvmnw418.jpg "/>
You crossing, this is not a story that exposes single and young people to 10,000 critical hits because of their colleagues ' Daily Show. The dog food here is not really "dog food"--of course, it's not what you think of as dog food.
On this point the author is deep experience, in the early years engaged in software services outsourcing, the discovery of delivery to the customer's products are seldom easy to use, the reason is that the implementation of software programs, has not stood to the user's point of view to think. Technicians do not act as users and will not understand the value of the products they develop. If you don't understand its value, how can you make it perfect?
The author participated in the first automation product development, we strive to contribute to this product in the daily use of gifted cloud software landing, is so-called "dog food eat much, can grow fat"! In the past, we used Jenkins and other software to build automation products, automation design goal is to automate the operation of all, then can the work done by Jenkins Automation to replace it? It should be a very easy thing to think about!
The following share of their own in the company to eat dog food experience, let us understand this is a happy thing! To successfully eat dog food, only the following steps are required:
Step One: Set goals
First set the goal of eating dog food: Use Automation to automate the build and release of the product itself. Then plan to build the release process for automation. After analysis, the whole construction and release process is divided into update code, program construction, end-to-end testing, packaging release four stages.
1) Update Code
This is easy to understand, which is to pull the latest code from the GIT remote repository to local.
2) Program Building
This phase of the automation code to implement the front-end build, we use Webpack and maven to build management, so this phase only a few lines of command to complete.
3) end-to-end testing
After the build is complete, we need to perform end-to-end testing to verify the correctness of this version. Here is the key to eating dog food: Use the latest built-in systems to complete automated testing to achieve true "bootstrap"! This fully guarantees the correctness and stability of the new version running in a real-world scenario.
The previous part of the entire build release process runs with the old version, automatically updates its own system when a new version is built, runs subsequent tasks with the new version, and automates the interface and interface testing of the newer system through end-to-end testing. The entire process needs to generate a report and notify the appropriate person to process as long as a task execution fails.
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/89/B9/wKiom1gazOrhJ4UnAAFFLGrWLY0559.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 2.jpg "alt=" Wkiom1gazorhj4unaafflgrwly0559.jpg "/>
4) Package Release
Gifted Cloud products have a unified publishing warehouse, so after testing, you need to generate a release package to the publishing warehouse as required by the company, such as a release package similar to Uyun-automation-v2.1.5.tar.gz (where the version number is automatically generated according to the rules).
Step Two: Write operations
In the automation product design, the operation is the automatic force, supports the input, the output parameter design, therefore the operation is very easy to be reused. The product itself contains many operations that are commonly used for various devops scenarios, as well as the ability to scale operations on demand through Python, shell, or batch scripts.
The first step of the analysis is that the entire process can be divided into git pull, front-end build, back-end build, deploy system, restart system, end-to-end test, build release package and upload release package and so on. One of the "end-to-end test" operations is actually a process orchestration that invokes another automated test (which is described later in the concept).
The custom action is very easy, the following with Git pull as an example, the other operation is not detailed table, I believe it is difficult to crossing you.
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/89/B9/wKiom1gazPOSdMSiAADpP20CjsE787.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 3.jpg "alt=" Wkiom1gazposdmsiaadpp20cjse787.jpg "/>
Step three: The process of compiling
With the force of automation, we are going to link each force to our goal plan, make our "dog food"-automate the build release process orchestration. Automation provides a visual Orchestration Designer, supports orchestration parameter design, supports input and output parameter references between tasks, and can set whether confirmation is required to continue after a task is executed, so it is easy to orchestrate automated processes to achieve our goals.
Because the whole system includes the front and back end, the reuse git pull operation realizes the update of the front-end code. Let's take a look at how the orchestration of the above-mentioned complete process looks like:
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/89/B7/wKioL1gazP3AnUuhAAJkdtaJPko396.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 4.jpg "alt=" Wkiol1gazp3anuuhaajkdtajpko396.jpg "/>
"End-to-end testing" calls the other orchestration, which mainly calls selenium and Automation's own API implementation interface, interface Automation testing, here is an unknown table.
Step four: Every day "Eat dog food"
Click Save and Test, "dog food" ready, open eat! After less than 10 minutes, our homework is finished:
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/89/B7/wKioL1gazQbRseBPAAIj67mX9Mw763.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 5.jpg "alt=" Wkiol1gazqbrsebpaaij67mx9mw763.jpg "/>
Build and publish successfully! What if the build fails? No hurry, automation can generate an error report and notify the development engineer via email or SMS to resolve the next automated build. According to the excellent Cloud product management regulations, set the schedule daily execution, from then on every day to live happily "Eat dog food" life.
Since eating "dog food", no longer insomnia, because each build will be automated scene testing, there are problems can be immediately detected and corrected, product quality significantly improved, single Wang can have more time to solve single problems, refused to feed the "dog food"!
In fact, the above introduction of the automated construction scene, just automation a small part of the powerful features, this product is particularly suitable for you devops talent, I do not know you see here, there is no association to more and better use of the scene? Set him a small goal to automate your application build and release! Welcome to the automation cloud product trial.
Author Profile: Coshadong
Gifted Cloud Software PRODUCT architect
4-year system analyst, 3 years of Internet finance related entrepreneurship experience
Currently responsible for the design of optimal cloud operation and maintenance Automation product architecture
This article is from the "excellent cloud dual-state Operations" blog, please be sure to keep this source http://uyunopss.blog.51cto.com/12240346/1868881
Operation and Maintenance Tips: 4 Simple steps to complete an automated build release