CN112860251A - Method and system for constructing website front end - Google Patents

Method and system for constructing website front end Download PDF

Info

Publication number
CN112860251A
CN112860251A CN201911100069.0A CN201911100069A CN112860251A CN 112860251 A CN112860251 A CN 112860251A CN 201911100069 A CN201911100069 A CN 201911100069A CN 112860251 A CN112860251 A CN 112860251A
Authority
CN
China
Prior art keywords
project
server
website front
website
jenkins
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911100069.0A
Other languages
Chinese (zh)
Inventor
董天天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sugon Nanjing Research Institute Co ltd
Original Assignee
Sugon Nanjing Research Institute Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sugon Nanjing Research Institute Co ltd filed Critical Sugon Nanjing Research Institute Co ltd
Priority to CN201911100069.0A priority Critical patent/CN112860251A/en
Publication of CN112860251A publication Critical patent/CN112860251A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

A method for constructing a website front end comprises the following steps: building a version control server, deploying a website front-end project, and updating a website front-end project code in real time; establishing a deployment Jenkins service and a plug-in to construct and execute an automatic deployment task of a website front-end project; establishing project configuration and developing a coding automation shell script on a Jenkins server; constructing an automatic business process according to project configuration; and building a load balancing cluster environment. According to the invention, the website front end is constructed by building and deploying Jenkins service and plug-in, constructing and executing an automatic deployment task of a website front end project on a Jenkins server, the compiling optimization processing mode of static resources of the website front end is improved, the compiling flow and the website publishing flow are automatically integrated, compiled and published based on a Jenkins integration tool, the compiling efficiency is greatly improved, and the integration tool is integrated with an SVN server, so that the website front end can be developed at any time, submitted at any time, compiled in real time, deployed and published in a single server and a cluster mode.

Description

Method and system for constructing website front end
Technical Field
The invention belongs to the technical field of information processing, and particularly relates to a method and a system for constructing a website front end.
Background
With the rapid development of information technology and the rapid advancement of internet technology, the construction of a front-end system of a website also has a positive requirement on the update of a user, and in order to reduce project cost and shorten project period, a front-end designer and a front-end development engineer in a new environment should strive to find a cross-platform front-end development solution on the basis of really understanding the requirements of Web applications.
The work content involved in the development of the front end of the website is quite complicated due to the loose characteristic of the development language, and code checking is needed to eliminate a part of low-level errors in the development process. In order to optimize network access, various optimization processes such as merging files, compressing files, compiling files and the like on front-end resources (HTML, CSS, JavaScript, Images) are required, after release, static resource cache update management is performed, and the development is performed in cooperation with a back-end server, and the work efficiency of front-end development is seriously affected by the tedious and repeated work of switching configuration … … in different development environments.
In view of the above, the present invention is particularly proposed.
Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defects of the prior art and provide a method and a system for constructing a website front end, so as to be beneficial to improving the working efficiency of website front end development.
In order to solve the technical problems, the invention adopts the technical scheme that:
a method for constructing a website front end comprises the following steps:
building a version control server, deploying a website front-end project, and updating a website front-end project code in real time;
establishing a deployment Jenkins service and a plug-in to construct and execute an automatic deployment task related to a website front-end project;
establishing project configuration and developing a coding automation shell script on a Jenkins server;
constructing an automatic business process according to project configuration;
and building a load balancing cluster environment.
Further, in the method for constructing the website front end, the updating the website front end project code in real time includes updating a version of the website project code in real time and storing an update log.
Further, in the method for constructing a website front end, the constructing a version control server, deploying a website front end project, and updating a website front end project code in real time includes:
building an SVN environment and creating a warehouse;
entering a warehouse, and creating a user group and a user;
and realizing automatic synchronization of SVN updating to the web directory.
Further, in the method for constructing a website front end, the establishing and deploying Jenkins service and plug-ins to construct and execute an automated deployment task related to a website front end project includes:
downloading a Jenkins installation package, and directly installing the Jenkins installation package through a shell command;
starting a Jenkins server, and accessing and installing through a browser;
after the access is successful, the plug-in service is installed graphically;
and instantiating the project configuration and creating the running task.
Further, in the method for constructing the website front end, the project configuration is established in the Jenkins server, and the project configuration includes one or more of a name, a description, configuration parameters, an SVN server address and a corresponding publishing server address of a project to be published at the website front end, a back end packaging configuration command, and a shell script automatic execution command.
Further, in the method for constructing the website front end, in the development coding automation shell script, the shell script uses the configuration parameters of the project configuration as an automation deployment basis to customize a deployment task.
Further, in the above method for constructing a front end of a website, the constructing an automated business process according to project configuration includes,
instantiating project configuration in a Jenkins server and creating an operation task;
newly establishing a type parameter of a deployment server;
configuring a front-end project source code synchronous address of a version control server;
configuring a project construction command;
configuring and starting an automatic shell script;
and starting to execute the automatic deployment task.
Further, in the method for constructing the website front end, the constructing of the load balancing cluster environment includes
And building a plurality of related servers, and distributing the accessed servers according to the access amount.
In a second aspect, the present invention also provides a system for constructing a website front end for executing the above method.
In a third aspect, the invention further provides a server device for carrying the system.
After adopting the technical scheme, compared with the prior art, the invention has the following beneficial effects:
according to the invention, the website front end is constructed by building and deploying Jenkins service and plug-in, constructing and executing an automatic deployment task of a website front end project on a Jenkins server, the compiling optimization processing mode of static resources of the website front end is improved, the compiling flow and the website publishing flow are automatically integrated, compiled and published based on a Jenkins integration tool, the compiling efficiency is greatly improved, and the integration tool is integrated with an SVN server, so that the website front end can be developed at any time, submitted at any time, compiled in real time, deployed and published in a single server and a cluster mode.
Drawings
FIG. 1 is a flowchart of a method for building a front end of a website according to an embodiment of the present invention.
Detailed Description
The invention will be further described with reference to the following drawings and specific examples to aid in understanding the contents of the invention.
As shown in fig. 1, a method for constructing a front end of a website includes the following steps:
building a version control server, deploying a website front-end project, and updating a website front-end project code in real time;
establishing a deployment Jenkins service and a plug-in to construct and execute an automatic deployment task related to a website front-end project;
establishing project configuration and developing a coding automation shell script on a Jenkins server;
constructing an automatic business process according to project configuration;
and building a load balancing cluster environment.
In the method of the present invention, the steps are not strictly performed in the order of the above steps. An embodiment will be described below.
When the version control server is built, in the embodiment, the version control server is an SVN server, and branch management is adopted, so that the data processing efficiency is improved. And after the construction is finished, deploying the project architecture on the SVN server, and uploading a website front-end project code for releasing the latest front-end project.
The real-time updating of the project codes at the front end of the website comprises real-time version updating and update log saving of the project codes of the website.
Specifically, S1, a version control server is built, website front-end project deployment is carried out, and website front-end project codes are updated in real time; the method comprises the following steps:
s11, building an SVN (Subversion) environment and creating a warehouse;
s12, creating a user group and a user;
and S13, realizing automatic synchronization of SVN updating to the web directory.
And after Subversion is installed and successful installation is detected, a warehouse is created, namely a version library, a version library file is generated, and the SVN environment is built.
And entering a configuration directory in the version library, wherein the configuration directory comprises a svn service integrated configuration file (svnserve. conf), a username command file (passswd) and an authority configuration file (authz). And creating a user group and a user by modifying the authority configuration file, configuring a user name command file and configuring an SVN service comprehensive configuration file.
After the steps are completed, starting the SVN service, deploying the project architecture on the SVN server, and uploading a website front-end (web) project code; testing the current server under a web directory; check out the version library in the web directory, namely downloading the files in the version library to the local so as to carry out uniform management on the files. Then, by setting environment variables, setting languages according to system language setting and the like, automatic synchronization of SVN updating to the web directory is realized.
And S2, establishing a deployment Jenkins service and plug-ins to construct and execute an automatic deployment task related to a website front-end project.
In the step, a deployment Jenkins server is established for continuously deploying codes; and installs the relevant version control server plug-in services and then starts the service for continuous integration and continuous delivery of the project.
The Jenkins server is an open-source and extensible platform based on a web interface and capable of continuously integrating, delivering and deploying (compiling, packaging and deploying software/code); the plug-in operates to allow continuous integration and continuous delivery of projects, and realizes processing, construction or continuous integration of any website platform.
The method comprises the following steps:
s21, downloading a Jenkins installation package, and directly installing the Jenkins installation package through a shell command;
s22, starting a Jenkins server, and accessing and installing through a browser;
s23, after the access is successful, graphically installing the plug-in service;
and S24, instantiating project configuration and creating an operation task.
Wherein the shell command is an automatic shell script for developing codes; and as a program file which is convenient to automatically execute at one time, the shell script takes the configuration parameters set by the project configuration in the step S24 as an automatic deployment basis, and writes a corresponding shell script flow according to specific project deployment requirements.
S3, establishing project configuration and developing an automatic shell script of a code in a Jenkins server, namely establishing an automatic deployment task of a website front-end project;
the project configuration comprises the name, description, configuration parameters, SVN server addresses, corresponding issuing server addresses, rear-end packaging configuration commands and shell script automatic execution commands of projects to be issued at the front end of the website.
In the development coding automation shell script, the shell script uses the configuration parameters of the project configuration as an automation deployment basis to customize a deployment task.
And (4) newly building project configuration service on a Jenkins server, and building an automation system for carrying out parameterization configuration to realize personalized customization.
S4, constructing an automatic business process according to the project configuration; comprises that
S41, newly building a configuration task in the Jenkins server, and modifying corresponding parameter configuration;
s42, establishing a new deployment server type parameter; wherein the parameter value of "true" represents the cluster deployment, and the parameter value of "false" represents the single server deployment;
s43, configuring a front-end project source code synchronous address of the version control server;
s44, configuring a project construction command;
s45, configuring and starting an automatic shell script;
and S46, starting to execute an automatic deployment task.
The construction of the website front-end project is completed according to the method, and the website front-end project code is stored in the version control server and is released to the release server for access.
According to the invention, the website front end is constructed by building and deploying Jenkins service and plug-in, constructing and executing an automatic deployment task of a website front end project on a Jenkins server, the compiling optimization processing mode of static resources of the website front end is improved, the compiling flow and the website publishing flow are automatically integrated, compiled and published based on a Jenkins integration tool, the compiling efficiency is greatly improved, and the integration tool is integrated with an SVN server, so that the website front end can be developed at any time, submitted at any time, compiled in real time, deployed and published in a single server and a cluster mode.
In order to avoid the server crash caused by too large access amount of the server and too large pressure, the method also comprises the step S5 of building a load balancing cluster environment; and building a plurality of related servers, and distributing the accessed servers according to the access amount.
In the step, the operation conditions of the version control server, the release server and the like are monitored, the server with abnormal operation is found in time, and the access request is transferred to other servers which can normally work.
Through the steps, the distribution of the access requests among the server groups is optimized, and the load imbalance among the servers is eliminated, so that the response speed and the overall performance of the system are improved; and monitoring the operation state of the server group, and distributing the access request according to the operation state, thereby improving the reliability of the server group.
In a second aspect, the present invention further provides a system constructed at a front end of a website, for implementing the method of the present invention, where the system is a software program system, and the implementation steps refer to the method steps.
In a third aspect, the present invention further provides a device for carrying the website front-end construction system, where the device is a computer or a computer group; the apparatus includes a processor, a memory, and a program, the program stored in the memory; the program, when executed by the processor, is capable of performing:
building a version control server, deploying a website front-end project, and updating a website front-end project code in real time;
establishing a deployment Jenkins service and a plug-in to construct and execute an automatic deployment task related to a website front-end project;
establishing project configuration and developing a coding automation shell script on a Jenkins server;
constructing an automatic business process according to project configuration;
and building a load balancing cluster environment.
When the version control server is built, in the embodiment, the version control server is an SVN server, and branch management is adopted, so that the data processing efficiency is improved. And after the construction is finished, deploying the project architecture on the SVN server, and uploading a website front-end project code for releasing the latest front-end project.
The real-time updating of the project codes at the front end of the website comprises real-time version updating and update log saving of the project codes of the website.
Specifically, the program executing the "setting up a version control server, deploying a website front-end project, and updating a website front-end project code in real time" includes:
s11, building an SVN (Subversion) environment and creating a warehouse;
s12, creating a user group and a user;
and S13, realizing automatic synchronization of SVN updating to the web directory.
And after Subversion is installed and successful installation is detected, a warehouse is created, namely a version library, a version library file is generated, and the SVN environment is built.
And entering a configuration directory in the version library, wherein the configuration directory comprises a svn service integrated configuration file (svnserve. conf), a username command file (passswd) and an authority configuration file (authz). And creating a user group and a user by modifying the authority configuration file, configuring a user name command file and configuring an SVN service comprehensive configuration file.
After the steps are completed, starting the SVN service, deploying the project architecture on the SVN server, and uploading a website front-end (web) project code; testing the current server under a web directory; check out the version library in the web directory, namely downloading the files in the version library to the local so as to carry out uniform management on the files. Then, by setting environment variables, setting languages according to system language setting and the like, automatic synchronization of SVN updating to the web directory is realized.
When a program executes a 'establishing and deploying Jenkins service and plug-ins to establish and execute an automatic deploying task related to a website front-end project', establishing a deploying Jenkins server for continuously deploying codes; and installs the relevant version control server plug-in services and then starts the service for continuous integration and continuous delivery of the project.
The Jenkins server is an open-source and extensible platform based on a web interface and capable of continuously integrating, delivering and deploying (compiling, packaging and deploying software/code); the plug-in operates to allow continuous integration and continuous delivery of projects, and realizes processing, construction or continuous integration of any website platform.
The method comprises the following steps:
downloading a Jenkins installation package, and directly installing the Jenkins installation package through a shell command;
starting a Jenkins server, and accessing and installing through a browser;
after the access is successful, the plug-in service is installed graphically;
and instantiating the project configuration and creating the running task.
Wherein the shell command is an automatic shell script for developing codes; and as a program file which is convenient to automatically execute at one time, the shell script takes the configuration parameters set by the project configuration in the steps as an automatic deployment basis, and writes a corresponding shell script flow according to specific project deployment requirements.
The method comprises the steps that a program executes a project configuration establishment and coding automation shell script development on a Jenkins server, namely, an automation deployment task of a website front-end project is established;
the project configuration comprises the name, description, configuration parameters, SVN server addresses, corresponding issuing server addresses, rear-end packaging configuration commands and shell script automatic execution commands of projects to be issued at the front end of the website.
In the development coding automation shell script, the shell script uses the configuration parameters of the project configuration as an automation deployment basis to customize a deployment task.
And (4) newly building project configuration service on a Jenkins server, and building an automation system for carrying out parameterization configuration to realize personalized customization.
The program execution of 'building an automatic business process according to project configuration' comprises
In a Jenkins server, newly building a configuration task and modifying corresponding parameter configuration;
newly establishing a type parameter of a deployment server; wherein the parameter value of "true" represents the cluster deployment, and the parameter value of "false" represents the single server deployment;
configuring a front-end project source code synchronous address of a version control server;
configuring a project construction command;
configuring and starting an automatic shell script;
and starting to execute the automatic deployment task.
The equipment of the invention implements the steps of the method to construct the front end of the website so as to improve the compiling efficiency and integrate with the SVN server, thereby being capable of developing at any time, submitting at any time, compiling in real time, deploying and releasing in a single server and a cluster type.
In order to avoid the server crash caused by too much access and too much pressure, the device of the present invention further executes the following procedures: and building a load balancing cluster environment. And building a plurality of related servers, and distributing the accessed servers according to the access amount.
The principle that the website front-end construction equipment in the embodiment implements the method to facilitate efficient implementation of single server and clustered deployment and release can be referred to the description of the method of the present invention.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for constructing a website front end is characterized by comprising the following steps: the method comprises the following steps:
building a version control server, deploying a website front-end project, and updating a website front-end project code in real time;
establishing a deployment Jenkins service and a plug-in to construct and execute an automatic deployment task of a website front-end project;
establishing project configuration and developing a coding automation shell script on a Jenkins server;
constructing an automatic business process according to project configuration;
and building a load balancing cluster environment.
2. The method of website front-end building according to claim 1, wherein the real-time updating of the website front-end project code comprises real-time version updating and update log saving of the website project code.
3. The method for constructing the website front end according to claim 1, wherein the building of the version control server, the deployment of the website front end project and the real-time update of the website front end project code comprise:
building an SVN environment and creating a warehouse;
entering a warehouse, and creating a user group and a user;
and realizing automatic synchronization of SVN updating to the web directory.
4. The method for website front-end building according to claim 1, wherein the building deploys Jenkins service and plug-ins to build and execute automated deployment tasks on website front-end projects, comprising:
downloading a Jenkins installation package, and directly installing the Jenkins installation package through a shell command;
starting a Jenkins server, and accessing and installing through a browser;
after the access is successful, the plug-in service is installed graphically;
and instantiating the project configuration and creating the running task.
5. The website front-end construction method according to claim 4, wherein in the Jenkins server project configuration establishment, the project configuration includes one or more of names, descriptions, configuration parameters, SVN server addresses and corresponding issuing server addresses of projects to be issued by the website front-end, backend packaging configuration commands and shell script automation execution commands.
6. The website front-end construction method according to claim 5, wherein in the development code automation shell script, the shell script uses the configuration parameters of the project configuration as an automation deployment basis to customize a deployment task.
7. The website front-end building method according to claim 6, wherein the building of the automated business process according to project configuration comprises,
instantiating project configuration in a Jenkins server and creating an operation task;
newly establishing a type parameter of a deployment server;
configuring a front-end project source code synchronous address of a version control server;
configuring a project construction command;
configuring and starting an automatic shell script;
and starting to execute the automatic deployment task.
8. The method for website front-end construction according to claim 1, wherein the building of the load balancing cluster environment comprises
And building a plurality of related servers, and distributing the accessed servers according to the access amount.
9. A system of website front-end constructs for performing the method of any one of claims 1-8.
10. A server device for carrying the system of claim 9.
CN201911100069.0A 2019-11-12 2019-11-12 Method and system for constructing website front end Pending CN112860251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911100069.0A CN112860251A (en) 2019-11-12 2019-11-12 Method and system for constructing website front end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911100069.0A CN112860251A (en) 2019-11-12 2019-11-12 Method and system for constructing website front end

Publications (1)

Publication Number Publication Date
CN112860251A true CN112860251A (en) 2021-05-28

Family

ID=75984187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911100069.0A Pending CN112860251A (en) 2019-11-12 2019-11-12 Method and system for constructing website front end

Country Status (1)

Country Link
CN (1) CN112860251A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434157A (en) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 Shell script-based front-end engineering deployment method and device
CN113821423A (en) * 2021-09-27 2021-12-21 杭州网易云音乐科技有限公司 Data acquisition method and device, storage medium and computing equipment
CN116400934A (en) * 2023-06-08 2023-07-07 北京随信云链科技有限公司 Project automatic deployment method based on jenkins

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434157A (en) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 Shell script-based front-end engineering deployment method and device
CN113821423A (en) * 2021-09-27 2021-12-21 杭州网易云音乐科技有限公司 Data acquisition method and device, storage medium and computing equipment
CN113821423B (en) * 2021-09-27 2023-08-11 杭州网易云音乐科技有限公司 Data acquisition method, device, storage medium and computing equipment
CN116400934A (en) * 2023-06-08 2023-07-07 北京随信云链科技有限公司 Project automatic deployment method based on jenkins
CN116400934B (en) * 2023-06-08 2023-09-15 北京随信云链科技有限公司 Project automatic deployment method based on jenkins

Similar Documents

Publication Publication Date Title
CN107515776B (en) Method for upgrading service continuously, node to be upgraded and readable storage medium
CN110413288B (en) Application deployment method, device, server and storage medium
CN111610978B (en) Applet conversion method, device, equipment and storage medium
CN112860251A (en) Method and system for constructing website front end
CN104317642A (en) Method and device for configuring software in cloud calculation environment
US9268546B2 (en) Deployment and hosting of platform independent applications
CN111580926A (en) Model publishing method, model deploying method, model publishing device, model deploying device, model publishing equipment and storage medium
JP2018530070A (en) System and method for building, optimizing and implementing a platform on a cloud-based computing environment
WO2014035309A1 (en) Re-configuration in cloud computing environments
CN107577609B (en) Embedded system dynamic module debugging system based on host end dynamic link
CN110673923A (en) XWIKI system configuration method, system and computer equipment
CN104317591A (en) OSGi (open service gateway initiative)-based web interface frame system and web business processing method thereof
WO2019056187A1 (en) Application deployment method, apparatus and system
CN114077423A (en) Airport APP development container architecture based on mobile cross-platform
CN111752581A (en) Distributed system upgrading method and device and computer system
JP6198229B2 (en) Installation engine and package format for parallelizable and reliable installation
CN103186376A (en) Method, device and equipment for establishing or updating software development environment
CN111782730B (en) File uploading method and device and storage medium
CN115061717A (en) Application management method, application subscription method and related equipment
CN111625245A (en) Inference service deployment method, device, equipment and storage medium
CN114968406B (en) Plug-in management method and device, electronic equipment and storage medium
CN114579091B (en) Cross-operating system robot flow automation system and method
CN110109684B (en) Block chain link point management proxy service installation method, electronic device and storage medium
CN116820493A (en) Mirror image file deployment method, system, equipment and storage medium
CN117112122A (en) Cluster deployment method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination