Updated on 2023-11-28 GMT+08:00

Overview

Background

Huawei's end-to-end (HE2E) DevOps implementation framework is an operable, feasible, and agile development methodology developed based on years of R&D experience and industry-leading practices, as shown in Figure 1.

Figure 1 HE2E DevOps implementation framework
  • Planning and Design
    Steps 1 and 2 in the diagram represent the process of product planning between service personnel (even customers) and technicians to sort out the overall product logic, implementing product planning and design, and controlling the requirement granularity and breakdown.
    • Software development solves issues and delivers value, not simply provides functions. The impact map is used to identify user requirements and root causes.
    • During microservice design, we put objectives and requirements in user stories to facilitate information exchanges among customers, service personnel, and developers. If you view only separate requirement items, you will not think from the entire solution's perspective. User stories focus on scenarios, sort out and display stages and activities in a tree structure. In this way, you will view both requirement items and overall requirement scenarios.
  • Planning, Tracing, and Sprint
    Steps 3 to 10 are the main management practices in a Scrum framework process.
    • Scrum defines a relatively complete framework for agile process management. CodeArts well integrates the Scrum framework with daily activities of development teams. Main process deliverables include the product backlog, sprint backlog, potential deliverable product increments, and issue list. Core team activities include Sprint planning meetings, daily Scrums, Sprint reviews, Sprint retrospective meetings, and daily team updates.
  • ContainerOps
    Start from step 11 and enter the engineering practice in a CI/CD process.
    • CI/CD is based on code configuration management. It covers not only traditional security control of code assets, concurrent development, and version and baseline management, but also reflects team collaboration and communication.
    • The pipeline connects code check (or static scanning), automated build, automated testing in all stages, and automated deployment.
    • CI/CD also covers continuous artifact management and environment management at different levels, including development, test, quasi-production, and production environments.
    • The CI/CD pipeline manages stages, environments, activities, entry and pass quality gates, and input and output artifacts in each stage.

Application Scenarios

We will use the sample code for an auto part e-mall named Phoenix Mall and a DevOps full-process sample project to describe how to use CodeArts to implement the HE2E DevOps framework. This solution is applicable to agile/Scrum R&D projects.

Solution Architecture

  • Phoenix Mall Architecture

    Figure 2 shows the architecture of the Phoenix Mall sample project.

    Figure 2 Technical architecture of Phoenix Mall

    The sample project consists of five microservice components that can be independently developed, tested, and deployed, as shown in Table 1.

    Table 1 Microservice components of Phoenix Mall

    Microservice Component

    Description

    Web client server (corresponding to the Vote function in the sample code)

    • Service logic: Users can use a browser to access the web UI of this service. When a user clicks Like on a specific offering, the service saves the record of the selected offering in the Redis cache.
    • Technology stack: Python and Flask frameworks
    • Application server: Gunicorn

    Web management server (corresponding to the Result function in the sample code)

    • Service logic: Users can use a browser to access the web UI of this service. The statistics about Like clicked by users on the UI are dynamically displayed. The data is obtained from the PostgreSQL database.
    • Technology stack: Node.js and Express frameworks
    • Application server: server.js

    Background order batch processing program (corresponding to the Worker function in the sample code)

    • Service logic: This service is a background process. It monitors item records in the Redis cache, obtains new records, and saves them in the PostgreSQL database so that the management UI can extract data for statistics display.
    • Technology stack: .net core or Java (This service provides two technology stacks to implement the same function. You can modify the configuration and select one as the runtime process.)

    Order cache

    • Service logic: Persists data for the client UI.
    • Stack: Redis

    Order database

    • Service logic: Persists data for the management UI.
    • Stack: PostgreSQL
  • Composition of the DevOps Full-Process Sample Project

    This project uses Scrum and presets some service templates. Products and services involved in this project.

    Table 2 List of involved products/services

    Service

    Description

    CodeArts

    Req

    Presets three planned and completed Sprints, project module settings, and several statistical reports.

    Repo

    Presets the code repository phoenix-sample for storing sample code.

    Check

    Presets four tasks. For details, see Step 4: Checking Code.

    Build

    Presets five tasks. For details, see Step 5: Building an Application.

    Artifact

    Stores software packages generated by build tasks.

    Deploy

    Presets three applications. For details, see Step 6: Deploying an Application (CCE).

    TestPlan

    Presets more than 10 test cases in the test case library.

    Pipeline

    Presets five pipelines. For details, see Step 8: Configuring a Pipeline for CD.

    Other components and services

    Identity and Access Management (IAM)

    Manages accounts.

    SoftWare Repository for Container (SWR)

    Stores Docker images generated by build tasks.

    Cloud Container Engine (CCE)

    Deploys software packages, which is different from ECS-based deployment.

    Elastic Cloud Server (ECS)

    Deploys software packages, which is different from CCE-based deployment.

Advantages

  • We provide a one-stop cloud DevOps platform to manage the entire software development process, to address R&D pain points such as frequent requirement changes, complex development and test environments, difficult multi-version maintenance, and failure to effectively monitor the progress and quality.
  • This service provides visualized and customizable pipeline services for CD, doubling the software rollout speed.