当前位置:网站首页>Comparison and evaluation of code on cloud - devcloud

Comparison and evaluation of code on cloud - devcloud

2022-06-09 11:19:00 Hua Weiyun

1 Preface

This article is mainly through the study of Huawei “ One line of code second cloud application development training camp ” Theoretical knowledge and cloud operation practice in the course , Understand Huawei software development platform DevCloud, Then compare the code to use DevCloud Cloud and original non cloud operations , Description in project creation 、 code 、 compile 、 The similarities and differences of deployment and other steps .

Before the clouds , There are two main ways to deploy the code from development to online deployment , The first is that the whole process is made by hand ; The second one is divided into two stages , The first stage is compilation, packaging and before , It is completely handmade , The latter uses automated script .

2 Overall process comparison

The following table shows , For pure manual 、 manual + Tools to automate deployment and cloud code 、 Development machine requirements 、 Server requirements 、 Development convenience, etc .

The way

Contrast item

By hand

manual + Automated Deployment

Code on the cloud

Tools

Development : Use different development tools according to the language , Such as Eclipse、VSCode、pycharm、 Database tools, etc ;
Compile the package : Use different compilation and packaging software according to the language , Generally, it is to use development tools directly ;
Run package upload : Generally, try it first sftp The tool uploads the running package to different servers , Usually, if there are multiple servers, they need to be uploaded separately ;
Server configuration modification : According to specific operation requirements , Modify application configuration 、 Operating system configuration, etc ;
Database script : Log in to the database connection tool , Execute the database script manually , Manually check the implementation ;
Start stop service : Execute startup and shutdown scripts .

Development : It is the same as pure manual ;
Compile the package : It is the same as pure manual ;
Run package upload : Generally, try it first sftp The tool uploads the running package to the transit server , Then distribute the running package to the server to be deployed through the automation service ;
Server configuration modification : The automation service is covered according to the written full configuration ;
Database script : The automation service calls the code to connect to the database and execute the database script that needs to go online ;
Start stop service : The automation service executes the startup and shutdown scripts .

browser (DevCloud: Huawei cloud account is required )

Development machine requirements

According to the differences of development projects , There needs to be a corresponding CPU、 Memory 、 Storage and other requirements

It is the same as pure manual

You can use the browser

Server requirements

Deploy the application server , According to the single machine 、 double-click 、 Distributed and other specific methods , The number of servers varies .

Except for the content that is different from the pure manual method , It also needs to be used for deployment “ Automated services ” Machine , According to their own requirements ,1 To n The machines are unequal .

In addition to the machines required by the pure manual method , You also need a server for storing the contents of the compile run package , Usually 1 It's enough .

Development convenience

Generally, a single development tool is enough , Development 、 compile 、 debugging 、 Modify the source code

It is the same as pure manual

Jump to multiple function pages , More complicated

compile

Development tools or plug-ins have built-in compilers , One click compilation

It is the same as manual work or compilation tools , Such as java Of ant

According to the language 、 The application type , Customize the compilation process and script in a visual way . And you need to confirm the path of the stored server .

Upload the running package

Upload according to application type

Upload to the intermediate server , Then automatically distribute .( Configure related servers in advance )

According to the language 、 The application type , Customize the deployment process and scripts in a visual way .

Time consuming

Development : normal
Deploy : It's more complicated , The more servers, the longer it takes

Development : normal
Deploy : convenient , Just write the automation script for the first time , Soon after , Less time consuming

Development : tedious
Deploy : Soon , Just write the automation script for the first time , Soon after , Less time consuming


3 summary

From the perspective of comparison , By hand 、 manual + Automated Deployment and code cloud deployment have their own advantages and disadvantages , Through the overall evaluation , The main conclusions are as follows , You can choose according to different projects and deployment methods :

1. Purely manual and manual + Automated Deployment Development is more convenient , Can be very simple to code 、 debugging 、 Modify the code, etc , and Code on the cloud The operation is relatively complicated ;

2. Pure handmade and handmade + Automated Deployment The requirements for development machines are relatively high , Code on the cloud The tools that need to be prepared are simple , Usually you just need a browser ;

3. From the perspective of the servers required for deployment , Pure manual requires the least resources , Code on the cloud second , manual + Automated Deployment A lot of additional resources may be added ;

4. manual + Automated Deployment And code cloud is very convenient for uploading and running packages , Just prepare the content according to the rules .

原网站

版权声明
本文为[Hua Weiyun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091027221870.html