How to bring new projects with less people, less money and more demands? I have the bottom of my heart after reading this article!

Time:2021-3-13

abstractIf it’s peaceful and stable, you’re not far away from being killed.

Last time, I said that at the end of the year, the development demand of each business line increased sharply, which led to the pressure of the test team and the collective resignation. I proposed a scheme to use Huawei cloud’s cloud test tools to reduce the test pressure (review:[path to API advancement] R & D demand has increased by 3 times, and the test team has left)That’s how it got through. Who knows, after this busy period, the next busy period. As a result, I suddenly remember that no celebrity once said: work is not easy. If it is peaceful and stable, you are not far away from being killed.

At the monthly review meeting, the boss directly asked, “there are so many people in your R & D department. Why does this happen?” As soon as he asked, I immediately felt that there was a situation. We had analyzed the reasons together before, and today we asked again. I’m afraid it’s not just because of this.

Sure enough, the boss went on to say that the company decided to launch a short video production tool to seize the current short video outlet and develop new business. But now there are many similar products, so we will not invest too much resources in the early stage of water test. Let’s arrange our own manpower for platform development.

This… Originally, there was a shortage of development resources. If we do new business, some people may not be able to invest in it. Many old projects were like this before. After exploring for a period of time, there was no big development, and we can’t give up easily. The R & D resources are constantly occupied. If we do well, we can’t estimate the demand in the later stage. At that time, we will face the situation of sudden increase in demand, and the pressure of development, operation and maintenance testing will be great.

Is there any way to solve this problem from the beginning of the project? After the meeting, I studied a new scheme with the R & D leader:Huawei cloud application management and operation and maintenance platform (servicestage) is used to develop and manage new projects.

Application management and operation and maintenance platform (servicestage) is an application hosting and micro service management platform, which can simplify the deployment, monitoring, operation and maintenance and governance of application life cycle management. Servicestage provides a full stack solution for microservice, mobile and web application development, which can not only improve the development efficiency, but also reduce the pressure of later management.

**

How to bring new projects with less people, less money and more demands? I have the bottom of my heart after reading this article!

**

Figure servicestage function

I brought this project myself, and the way to use servicestage is relatively simple,Servicestage provides various API interfaces, including deployment task, environment management, application management, component management, registration and discovery, to meet the needs of development, deployment, hosting, operation and maintenance. The above operations can be directly completed by calling API.

withEnvironmental managementandApplication managementAs an example, the operation steps are introduced.

prerequisite

  • Get the token of Iam, call the token authentication, and set the token value to the environment variable: export token = {token}
  • Get the endpoint of servicestage.

Example 1: operation steps of environmental management

1. Call“Create environment interface”, add basic resources.

Request example

curl -k -H “Content-Type:application/json” -H “X-Auth-Token:$Token” -X POST “https://{servicestage_endpoint}/v2/{project_id}/cas/environments” -d ‘{

“name”: “dev-env”,

“description”: “develop environment”,

“enterprise_project_id”: “0”,

“charge_mode”: “provided”,

“vpc_id”: “b9b8f9ad-1a2e-403d-83f1-cb71a3c06df8”,

“base_resources”: [

{

“id”: “b6862a62-d916-11e9-bdf1-0255ac101fd9”,

“type”: “cce”

}

]

}’

The return result is as follows, and the ID obtained is shown as {environment} in the following example_ ID}.

{

“id”: “ea011e01-2eb5-453f-87bf-874e4a855abe”,

“name”: “dev-env”,

“alias”: null,

“description”: “develop environment”,

“project_id”: “bf8523d898b64e4eb956e3be3555ca16”,

“enterprise_project_id”: “0”,

“charge_mode”: “provided”,

“vpc_id”: “b9b8f9ad-1a2e-403d-83f1-cb71a3c06df8”,

“base_resources”: [

{

“id”: “b6862a62-d916-11e9-bdf1-0255ac101fd9”,

“type”: “cce”

}

],

“creator”: “xxx”,

“create_time”: 1578984198394,

“update_time”: 1578984198394

}

2. Call“Modify environment resource interface”To add other resources needed for the environment.

According to the existing resources and requirements, we can add ECs, CCE, ELB, CSE, EIP and other types of resources to the environment.

Request example

curl -k -H “Content-Type:application/json” -H “X-Auth-Token:$Token” -X PATCH “https://{servicestage_endpoint}/v2/{project_id}/cas/environments/{environment_id}/resources” -d ‘{

“add_optional_resources”: [{

“id”: “default”,

“type”: “cse”

}]

}’

Return results

{

“id”: “ea011e01-2eb5-453f-87bf-874e4a855abe”,

“name”: “dev-env”,

“alias”: null,

“description”: “develop environment”,

“project_id”: “bf8523d898b64e4eb956e3be3555ca16”,

“enterprise_project_id”: “0”,

“charge_mode”: “provided”,

“vpc_id”: “b9b8f9ad-1a2e-403d-83f1-cb71a3c06df8”,

“base_resources”: [

{

“id”: “b6862a62-d916-11e9-bdf1-0255ac101fd9”,

“type”: “cce”

}

],

“optional_resources”: [

{

“id”: “default”,

“type”: “cse”

}

],

“creator”: “xxx”,

“create_time”: 1578984198394,

“update_time”: 1578984198394

}

3. Call“Interface for getting environment details based on environment ID”To query the environment

Request example

curl -k -H “Content-Type:application/json” -H “X-Auth-Token:$Token” -X GET “https://{servicestage_endpoint}/v2/{project_id}/cas/environments/{environment_id}”

Return results

{

“id”: “ea011e01-2eb5-453f-87bf-874e4a855abe”,

“name”: “dev-env”,

“alias”: null,

“description”: “develop environment”,

“project_id”: “bf8523d898b64e4eb956e3be3555ca16”,

“enterprise_project_id”: “0”,

“charge_mode”: “provided”,

“vpc_id”: “b9b8f9ad-1a2e-403d-83f1-cb71a3c06df8”,

“base_resources”: [

{

“id”: “b6862a62-d916-11e9-bdf1-0255ac101fd9”,

“type”: “cce”

}

],

“optional_resources”: [

{

“id”: “default”,

“type”: “cse”

}

],

“creator”: “xxx”,

“create_time”: 1578984198394,

“update_time”: 1578984198394

}

Example 2: application management operation steps

1. Call“Create application interface”To create an application.

Request example

curl -k -H “Content-Type:application/json” -H “X-Auth-Token:$Token” -X POST “https://{servicestage_endpoint}/v2/{project_id}/cas/applications” -d ‘{

“name”: “TestApp”,

“description”: “application_description”,

“enterprise_project_id”: “0”

}’

The return result is as follows, and the ID obtained is shown in the following example as {application}_ ID}.

{

“id”: “06cf2fda-af45-44b4-9e22-6294c4804515”,

“name”: “TestApp”,

“description”: “application_description”,

“creator”: “string”,

“project_id”: “bf8523d898b64e4eb956e3be3555ca16”,

“enterprise_project_id”: “0”,

“create_time”: 1578984171041,

“update_time”: 1578984171041

}

2. Call“Modify application configuration information interface”, add environment variables to the application, and the subsequent components deployed in an environment of the application will inherit the environment variables of the application.

Request example

curl -k -H “Content-Type:application/json” -H “X-Auth-Token:$Token” -X PUT “https://{servicestage_endpoint}/v2/{project_id}/cas/applications/{application_id}/configuration” -d ‘{

“environment_id”: “0fa75dfe-0d32-4bc1-848b-8008cf3f2567”,

“configuration”: {

“env”: [

{

“name”: “app-env”,

“value”: “env”

}

]

}

}’

Return results

{

“application_id”: “06cf2fda-af45-44b4-9e22-6294c4804515”,

“environment_id”: “0fa75dfe-0d32-4bc1-848b-8008cf3f2567”,

“configuration”: {

“env”: [

{

“name”: “app-env”,

“value”: “env”

}

]

}

}

3. Call“Get application details interface according to application ID”, query application details.

Request example

curl -k -H “Content-Type:application/json” -H “X-Auth-Token:$Token” -X GET “https://{servicestage_endpoint}/v2/{project_id}/cas/applications/{application_id}”

Return results

{

“id”: “06cf2fda-af45-44b4-9e22-6294c4804515”,

“name”: “TestApp”,

“description”: “description”,

“creator”: “xxx”,

“project_id”: “bf8523d898b64e4eb956e3be3555ca16”,

“enterprise_project_id”: “0”,

“create_time”: 1578984171041,

“update_time”: 1578984171041

}

It can also be realizedComponent managementRegistration discoveryAnd so on.

Learn more about Huawei cloud API:Download Huawei cloud API selection manual for free

Click follow to learn about Huawei’s new cloud technology for the first time~