[go: up one dir, main page]

TWI710896B - Cloud system and method for integrating a cloud system - Google Patents

Cloud system and method for integrating a cloud system Download PDF

Info

Publication number
TWI710896B
TWI710896B TW108101289A TW108101289A TWI710896B TW I710896 B TWI710896 B TW I710896B TW 108101289 A TW108101289 A TW 108101289A TW 108101289 A TW108101289 A TW 108101289A TW I710896 B TWI710896 B TW I710896B
Authority
TW
Taiwan
Prior art keywords
build
code
tester
service platform
cloud service
Prior art date
Application number
TW108101289A
Other languages
Chinese (zh)
Other versions
TW202026880A (en
Inventor
邱政琦
Original Assignee
宏碁股份有限公司
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 宏碁股份有限公司 filed Critical 宏碁股份有限公司
Priority to TW108101289A priority Critical patent/TWI710896B/en
Publication of TW202026880A publication Critical patent/TW202026880A/en
Application granted granted Critical
Publication of TWI710896B publication Critical patent/TWI710896B/en

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

A local server can cooperate with a version control storage server, and a cloud service platform to form a cloud system. The local server includes a building tester. The building tester executes a predetermined building script to obtain a program code to be tested from the version control storage server, upload the program code to a testing bucket of the cloud service platform, remove a plurality of service items provided by the cloud service platform, activate a plurality of service items to be tested on the cloud service platform according to the program code for building an application environment, and perform the test in the application environment. The service items provided by the cloud service platform includes application function services and database services.

Description

整合雲端系統的方法及雲端系統 Method for integrating cloud system and cloud system

本發明是有關於一種整合雲端系統的方法,特別是指一種自動整合雲端系統以建置測試環境並測試程式碼方法。 The present invention relates to a method for integrating cloud systems, in particular to a method for automatically integrating cloud systems to build a test environment and test code.

隨著現今使用者對於網路軟體應用的功能及安全性的要求日益提高,提供服務的應用環境也越來越龐大,而常常需要花費很多人力來共同維護管理。然而當共同建立系統的工程師越多時,程式碼的管理也就變得更加複雜。舉例來說,不同工程師所撰寫的程式碼可能會因為引用的版本錯誤,導致互不相容而無法運行。為解決此一問題,在先前技術中,已有廠商提供遠端的程式碼版本管理服務,例如GitHub,以自動記錄不同版本的程式碼,並協助工程師追蹤不同版本程式碼之間的差異。 With the increasing requirements of today's users for the functions and security of network software applications, the application environment for providing services is also growing, and it often takes a lot of manpower to maintain and manage them together. However, as more engineers build the system together, the management of the code becomes more complicated. For example, the code written by different engineers may be incompatible with each other and cannot run because of the wrong version. To solve this problem, in the prior art, vendors have provided remote code version management services, such as GitHub, to automatically record different versions of the code and help engineers track the differences between different versions of the code.

此外,為減輕工程師設定伺服器以及建置應用環境的負擔,也有廠商提供了雲端運算的租用服務,以便工程師能夠專注在程式碼的撰寫,而簡化伺服器運行環境的設定程序。然而,由於工程師可能同時利用到不同廠商所提供的服務,因此在測試程式碼的時候,必須以手動的方式在不同的平台之間輪番操作。如此做法不僅耗費人力,也難免產生疏漏,而若工程師並未留下操作紀錄,更將增加日後偵錯的困難度。 In addition, in order to reduce the burden of engineers setting up servers and building application environments, some vendors also provide cloud computing rental services so that engineers can focus on writing code and simplify the process of setting up the server operating environment. However, because engineers may use the services provided by different vendors at the same time, they must manually rotate between different platforms when testing the code. This approach not only consumes manpower, but also inevitably leads to omissions, and if the engineer does not leave an operation record, it will increase the difficulty of future error detection.

本發明的一實施例提供一種整合雲端系統的方法。雲端系統包含版本控制儲存伺服器、本地伺服器及雲端服務平台。本地伺服器包含建置測試器。 An embodiment of the present invention provides a method for integrating cloud systems. The cloud system includes a version control storage server, a local server and a cloud service platform. The local server contains the build tester.

整合雲端系統的方法包含建置測試器執行預定建置指令腳本。建置測試器自版本控制儲存伺服器取得待測程式碼,建置測試器將待測程式碼上傳至雲端服務平台之測試儲存槽,建置測試器移除雲端服務平台所開放之複數個服務項目,該些服務項目包含雲端服務平台開放之至少一應用函式服務及至少一資料庫服務。建置測試器根據待測程式碼開通雲端服務平台之複數個待測服務項目以佈建應用環境,及建置測試器於應用環境進行測試。 The method of integrating the cloud system includes building a tester to execute a predetermined build command script. The build tester obtains the code to be tested from the version control storage server, the build tester uploads the code to be tested to the test storage slot of the cloud service platform, and the build tester removes multiple services opened by the cloud service platform Items, these service items include at least one application function service and at least one database service opened by the cloud service platform. The build tester activates a plurality of service items to be tested of the cloud service platform according to the test code to deploy the application environment, and builds the tester to test in the application environment.

本發明的另一實施例提供一種整合雲端系統的方法。雲端系統包含版本控制儲存伺服器、本地伺服器及雲端服務平台。本地伺服器包含建置測試器。 Another embodiment of the present invention provides a method for integrating cloud systems. The cloud system includes a version control storage server, a local server and a cloud service platform. The local server contains the build tester.

整合雲端系統的方法包含建置測試器自版本控制儲存伺服器取得待發行程式碼,建置測試器將待發行程式碼上傳至雲端服務平台之發行儲存槽,建置測試器移除雲端服務平台開放之複數個應用函式服務,並保留雲端服務平台目前運行之複數個資料庫服務,建置測試器根據待發行程式碼使雲端服務平台開啟複數個應用函式服務以佈建應用環境,建置測試器比對應用環境中所運行之該些資料庫服務及先前測試待發行程式碼時所使用到之複數個資料庫服務以判斷是否有未建立之資料庫,及當建置測試器判斷有未建立之至少一資料庫服務時,建立對應之至少一資料庫服務。 The method of integrating the cloud system includes building a tester to obtain the code to be released from the version control storage server, building the tester to upload the code to be released to the release storage slot of the cloud service platform, and building the tester to remove the cloud service platform Open multiple application function services, and retain multiple database services currently running on the cloud service platform. The build tester enables the cloud service platform to open multiple application function services to deploy the application environment according to the code to be released. The tester compares the database services running in the application environment and the multiple database services used in the previous test of the code to be released to determine whether there is an uncreated database, and when the tester is built When there is at least one database service that has not been created, create at least one corresponding database service.

本發明的另一實施例提供一種本地伺服器,適於與版本控制儲存伺服器以及雲端服務平台共同運作以形成雲端系統。版本控制儲存伺服器管理並儲存相異版本的複數個程式碼,而雲端服務平台用以提供複數個服務項目及複 數個儲存空間。 Another embodiment of the present invention provides a local server, which is suitable for operating together with a version control storage server and a cloud service platform to form a cloud system. The version control storage server manages and stores multiple codes of different versions, and the cloud service platform is used to provide multiple service items and multiple Several storage spaces.

本地伺服器包含建置測試器。建置測試器執行預定建置指令腳本以自版本控制儲存伺服器取得待測程式碼,將待測程式碼上傳至雲端服務平台之測試儲存槽,移除雲端服務平台所開放之複數個服務項目,根據待測程式碼開通雲端服務平台之複數個待測服務項目以佈建應用環境,及於應用環境進行測試。 The local server contains the build tester. The build tester executes a predetermined build command script to obtain the code to be tested from the version control storage server, upload the code to be tested to the test storage slot of the cloud service platform, and remove multiple service items opened by the cloud service platform ,According to the code to be tested, open multiple service items to be tested in the cloud service platform to deploy the application environment and test in the application environment.

雲端服務平台所開放之複數個服務項目包含雲端服務平台開放之至少一應用函式服務及至少一資料庫服務。 The plural service items opened by the cloud service platform include at least one application function service and at least one database service opened by the cloud service platform.

100:雲端系統 100: Cloud system

110:版本控制儲存伺服器 110: Version Control Storage Server

120:本地伺服器 120: local server

122:建置測試器 122: Build a tester

130:雲端服務平台 130: Cloud Service Platform

132、134:儲存槽 132, 134: storage tank

A、B:程式碼 A, B: Code

200、300:方法 200, 300: method

S210至S270、S310至S360:步驟 S210 to S270, S310 to S360: steps

第1圖是本發明一實施例之雲端系統的示意圖 Figure 1 is a schematic diagram of a cloud system according to an embodiment of the present invention

第2圖是本發明一實施例之整合第1圖之雲端系統之方法流程圖。 Figure 2 is a flowchart of a method for integrating the cloud system of Figure 1 according to an embodiment of the present invention.

第3圖是本發明另一實施例之整合第1圖之雲端系統之方法流程圖。 FIG. 3 is a flowchart of a method for integrating the cloud system in FIG. 1 according to another embodiment of the present invention.

第1圖是本發明一實施例之雲端系統100的示意圖,雲端系統100包含版本控制儲存伺服器110、本地伺服器120及雲端服務平台130。 FIG. 1 is a schematic diagram of a cloud system 100 according to an embodiment of the present invention. The cloud system 100 includes a version control storage server 110, a local server 120, and a cloud service platform 130.

版本控制儲存伺服器110可以管理並儲存相異版本的複數個程式碼,使得開發團隊中的各個開發者能夠互相審閱彼此修改後的程式碼,同時版本控制儲存伺服器110也可保留程式碼所需的完整資料庫,以方便開發者能夠將整個系統轉移到新的伺服器上運作。版本控制儲存伺服器110可以例如但不限於利用版本控制系統Git作為底層,並執行程式碼審查軟體,如Gerrit,以利開發者進行編輯及統整。 The version control storage server 110 can manage and store multiple codes of different versions, so that each developer in the development team can review each other's modified codes, and the version control storage server 110 can also retain the code The complete database required to facilitate developers to transfer the entire system to a new server for operation. The version control storage server 110 can, for example, but not limited to use the version control system Git as the bottom layer, and execute code review software, such as Gerrit, to facilitate editing and integration by developers.

雲端服務平台130可以提供複數個服務項目及複數個儲存空間。也就是說,透過雲端服務平台130,開發者就可以減少自行設定伺服器以及建置應用環境的程序,而能夠利用雲端服務平台130所提供的服務來執行所需的運算。舉例來說,雲端服務平台130可例如但不限於是亞馬遜雲端運算服務(Amazon Web Services,AWS)。 The cloud service platform 130 can provide a plurality of service items and a plurality of storage spaces. In other words, through the cloud service platform 130, developers can reduce the process of setting up servers and building application environments by themselves, and can use the services provided by the cloud service platform 130 to perform required operations. For example, the cloud service platform 130 may be, for example, but not limited to, Amazon Web Services (AWS).

本地伺服器120可包含建置測試器122。在本發明的有些實施例中,建置測試器122可與版本控制儲存伺服器110相連結,因此可以監控版本控制儲存伺服器110上是否有出現新版本的程式碼,並根據自訂或預設的指令腳本(script)來建置程式碼所需的環境,並進行相關測試。舉例來說,在本發明的有些實施例中,當建置測試器122偵測到版本控制儲存伺服器110上有更新過且未測試之待測程式碼A時,建置測試器122可以在預定時間點,例如但不限於凌晨兩點,自動執行預定建置指令腳本來對待測程式碼A進行測試。如此一來,建置測試器122就可以避開開發者的工作時段來對待測程式碼A進行測試,而之後當開發者開始工作時,便可參考建置測試器122所提供的相關測試結果,以利開發者能夠針對測試結果做進一步的修正或改進。 The local server 120 may include a build tester 122. In some embodiments of the present invention, the build tester 122 can be connected to the version control storage server 110, so it can monitor whether there is a new version of the code on the version control storage server 110, and customize or pre-order Set the command script (script) to build the environment required by the code and perform related tests. For example, in some embodiments of the present invention, when the build tester 122 detects that there is an updated and untested code A under test on the version control storage server 110, the build tester 122 can At a predetermined time, such as but not limited to two o'clock in the morning, a predetermined build instruction script is automatically executed to test the program code A under test. In this way, the build tester 122 can avoid the developer's working hours to test the code under test A, and then when the developer starts to work, he can refer to the relevant test results provided by the build tester 122 , So that developers can make further corrections or improvements to the test results.

在本發明的有些實施例中,建置測試器122可以例如透過開放資源(opensource)的軟體開發持續集成工具Buildbot來實作。當利用Buildbot來實作建置測試器122時,建置測試器122可包含主控單元(master)及從屬單元(slave)。主控單元可以持續地監控與之連結的版本控制儲存伺服器110,並在發現有程式碼被更新時,通知對應的從屬單元,或者在從屬單元不存在的情況下,建立對應的從屬單元。從屬單元則可以進一步執行對應的預定建置指令腳本,以自版本控制儲存伺服器110取得待測程式碼A,並建置待測程式碼A所需的測試環境來進行測試。 In some embodiments of the present invention, the build tester 122 can be implemented by, for example, an open source software development continuous integration tool Buildbot. When using Buildbot to implement the build tester 122, the build tester 122 may include a master unit and a slave unit (slave). The master control unit can continuously monitor the version control storage server 110 connected to it, and notify the corresponding slave unit when it finds that the code is updated, or create a corresponding slave unit if the slave unit does not exist. The slave unit may further execute the corresponding predetermined build command script to obtain the program code A to be tested from the version control storage server 110, and build the test environment required by the program code A to be tested for testing.

舉例來說,從屬單元會將待測程式碼A上傳至雲端服務平台130之測 試儲存槽132。以亞馬遜雲端運算服務為例,測試儲存槽132可例如由亞馬遜雲端運算服務所提供的簡易儲存服務(S3)。 For example, the slave unit uploads the test code A to the cloud service platform 130 Try storage tank 132. Taking Amazon cloud computing service as an example, the test storage slot 132 may be a simple storage service (S3) provided by Amazon cloud computing service, for example.

此外,為了讓待測程式碼A可以在比較單純的環境中進行測試,建置測試器122可先將雲端服務平台130所開放之複數個服務項目移除。也就是說,建置測試器122會先停止原先雲端服務平台130所提供的服務項目,接著再根據待測程式碼A重新開通雲端服務平台130之複數個待測服務項目,以佈建用以測試待測程式碼A的第一應用環境。在本發明的有些實施例中,建置測試器122在第一應用環境進行測試後,可進一步儲存及/或輸出測試的結果,例如通過及失敗的測試項目,以供開發者參考。 In addition, in order to allow the program code A to be tested to be tested in a relatively simple environment, the build tester 122 may first remove multiple service items opened by the cloud service platform 130. That is to say, the build tester 122 will first stop the service items provided by the original cloud service platform 130, and then re-open multiple service items to be tested in the cloud service platform 130 according to the code A to be tested, so as to deploy Test the first application environment of code A under test. In some embodiments of the present invention, after the build tester 122 is tested in the first application environment, it can further store and/or output test results, such as passed and failed test items, for reference by developers.

在有些實施例中,雲端服務平台130所提供的服務項目可包含應用函式(function)服務及資料庫服務。以亞馬遜雲端運算服務為例,開發者可以利用CloudFormation的程式語言,描述開發者所需的應用函式類型、所需的參數及運作的時機等,以利用亞馬遜雲端運算服務所提供的無伺服器(serverless)函式服務(或稱lambda)來完成所需的運算。此外,開發者也可利用CloudFormation的程式語言,描述開發者所需的資料庫類型及參數,以利用亞馬遜雲端運算服務所提供的資料庫服務(或稱DynamoDB)來建立所需的資料庫。 In some embodiments, the service items provided by the cloud service platform 130 may include application function services and database services. Taking Amazon cloud computing service as an example, developers can use the programming language of CloudFormation to describe the type of application functions required by the developer, the required parameters, and the timing of operation, etc., to use the serverless service provided by Amazon cloud computing services (serverless) function service (or lambda) to complete the required operations. In addition, developers can also use the programming language of CloudFormation to describe the database types and parameters required by the developers to use the database service (or DynamoDB) provided by Amazon cloud computing services to create the required database.

由於透過CloudFormation語言描述所需的服務項目,就能夠迅速地在雲端服務平台130及本地伺服器120中建立出所需的基礎設施,因此利用CloudFormation語言所編撰的應用函式堆棧(stack)及資料庫堆棧也可稱為基礎設施程式碼(infrastructure as code)。而在此實施例中,待測程式碼A除了包含前述用來統整第一應用環境所需的待測服務項目的基礎設施程式碼以外,還可包含用來描述待測服務項目實際運作內容的程式碼,以確保雲端服務平台130能夠執行所需的運算函式。 Since the required service items are described through the CloudFormation language, the required infrastructure can be quickly established in the cloud service platform 130 and the local server 120. Therefore, the application function stack and data compiled in the CloudFormation language are used The library stack may also be referred to as infrastructure as code. In this embodiment, in addition to the aforementioned infrastructure code used to integrate the service under test required by the first application environment, the code under test A may also include the actual operation content of the service under test. To ensure that the cloud service platform 130 can execute the required calculation functions.

在本發明的有些實施例中,預定建置指令腳本還可要求建置測試器 122對待測程式碼A做其他類型的檢查,例如在移除或開通雲端服務平台130所提供的服務項目之前,建置測試器122還可先檢查待測程式碼中所使用到的工具包(package)是否都已在本地伺服器120上妥善安裝,並且在有需要的情況下,自動簽署安卓系統的應用程式套件(Android Package,APK)。 In some embodiments of the present invention, the predetermined build instruction script may also require the build tester 122 Perform other types of checks on the code to be tested. For example, before removing or activating the service provided by the cloud service platform 130, the build tester 122 can also check the toolkit used in the code to be tested ( package) has been properly installed on the local server 120, and if necessary, the application package (Android Package, APK) of the Android system is automatically signed.

此外,預定建置指令腳本還可根據佈建環境時可能會遇到的情況給予對應的指示,以確保建置測試器122能夠自動且順利地佈建測試待測程式碼A所需的第一應用環境。舉例來說,預定建置指令腳本還可要求建置測試器122在偵測到雲端服務平台130尚未創建對應之測試儲存槽132時,於雲端服務平台130創建測試儲存槽132。此外,預定建置指令腳本也可要求建置測試器122在將待測程式碼A上傳到測試儲存槽132之前,先偵測測試儲存槽132中是否已經儲存了超過一預定數量版本的程式碼,並且在偵測到測試儲存槽132中儲存了超過預定數量版本之程式碼,例如但不限於五個版本的程式碼時,清除最舊版本的程式碼,以確保測試儲存槽132具有足夠的儲存空間。 In addition, the predetermined build command script can also give corresponding instructions according to the situations that may be encountered during the deployment environment, so as to ensure that the build tester 122 can automatically and smoothly deploy the first test code A required for testing. Application Environment. For example, the predetermined build command script may also require the build tester 122 to create a test storage slot 132 in the cloud service platform 130 when it detects that the cloud service platform 130 has not created a corresponding test storage slot 132. In addition, the predetermined build command script may also request the build tester 122 to detect whether more than a predetermined number of versions of the code have been stored in the test storage slot 132 before uploading the test code A to the test storage slot 132 , And when it is detected that more than a predetermined number of versions of the code are stored in the test storage slot 132, such as but not limited to five versions of the code, the oldest version of the code is cleared to ensure that the test storage slot 132 has enough storage space.

在測試過複數個版本的程式碼之後,開發者可將測試結果最為滿意的程式碼,例如程式碼B,作為上線發行的版本,此時建置測試器122便可執行發行建置指令腳本以建置待發行程式碼B所需的應用環境。 After testing multiple versions of the code, the developer can use the code with the most satisfactory test result, such as code B, as the online release version. At this time, the build tester 122 can execute the release build command script to Build the application environment required for code B to be released.

舉例來說,建置測試器122可以根據發行建置指令腳本自版本控制儲存伺服器110取得待發行程式碼B,並將待發行程式碼B上傳至雲端服務平台130。在此實施例中,雲端服務平台130可以建立用於上線發行的發行儲存槽134,並將待發行程式碼B儲存在發行儲存槽134中。此外,根據發行建置指令腳本,建置測試器122還可移除雲端服務平台130開放之複數個應用函式服務,接著再根據待發行程式碼B使雲端服務平台130重新開啟應用函式服務以佈建待發行程式碼B運作所需的第二應用環境。 For example, the build tester 122 may obtain the code B to be released from the version control storage server 110 according to the release build command script, and upload the code B to be released to the cloud service platform 130. In this embodiment, the cloud service platform 130 can create a distribution storage slot 134 for online distribution, and store the to-be-released code B in the distribution storage slot 134. In addition, according to the issuance of the build command script, the build tester 122 can also remove multiple application function services opened by the cloud service platform 130, and then enable the cloud service platform 130 to reopen the application function service according to the code B to be issued To deploy the second application environment required for the operation of the code B to be released.

相較於用以測試程式碼的預定建置指令腳本,由於在實際上線發行 時,不可將系統使用者的帳號資料和紀錄刪除,因此發行建置指令腳本會要求建置測試器122保留雲端服務平台130中目前運行之複數個資料庫服務,以確保新上線的系統仍然保存有系統使用者的資料,而使用者在系統更新之後不會喪失先前儲存的資料。 Compared with the predetermined build command script used to test the code, due to the actual online release When the system user’s account data and records cannot be deleted, the build tester 122 will be required to retain the multiple database services currently running in the cloud service platform 130 to ensure that the newly launched system is still saved. There are system user data, and the user will not lose the previously saved data after the system is updated.

在此情況下,為了確保新上線的系統能夠建立待發行程式碼B所需的資料庫,預定建置指令腳本可要求建置測試器122比對在第二應用環境中所運行的資料庫服務以及先測試待發行程式碼B時所使用到之資料庫服務以判斷是否有未建立之資料庫。在有些實施例中,當雲端系統100先前在測試程式碼B時,雲端系統100中即已留下了所需資料庫服務的紀錄,因此建置測試器122可將目前運行的資料庫與先前的紀錄相比對,而當建置測試器122判斷有應建立而未建立的至少一資料庫服務時,便可建立該至少一資料庫服務。 In this case, in order to ensure that the newly launched system can create the database required by the code B to be released, the predetermined build command script may request the build tester 122 to compare the database service running in the second application environment And first test the database service used when the code B to be released is used to determine whether there is an uncreated database. In some embodiments, when the cloud system 100 was previously testing the code B, the cloud system 100 has already left a record of the required database service, so the build tester 122 can compare the currently running database with the previous Compared with the records of, and when the build tester 122 determines that there is at least one database service that should be created but has not been created, the at least one database service can be created.

此外,在本發明的有些實施例中,開發者可以根據先前的測試結果自行選擇欲上線發行的程式碼,然而在有些其他實施例中,建置測試器122也可根據先前複數個程式碼的測試結果,自動從中選擇通過最多測試項目的程式碼作為待發行程式碼,並根據發行建置指令腳本來建置所需的第二應用環境。 In addition, in some embodiments of the present invention, the developer can choose the code to be released online based on the previous test results. However, in some other embodiments, the build tester 122 can also be based on the previous multiple codes. As a result of the test, the code that passes the most test items is automatically selected as the code to be released, and the required second application environment is built according to the release build instruction script.

如此一來,本地伺服器120就能夠透過建置測試器122將不同系統的版本控制儲存伺服器110及雲端服務平台130互相整合並共同運作而形成雲端系統100,因此可以自動且有效地對待測試程式碼進行測試,並提供測試結果給開發者參考,同時也可記錄完整的設定步驟,以利開發者進行偵錯。此外,雲端系統100也可以透過整合版本控制儲存伺服器110、本地伺服器120及雲端服務平台130還可自動佈建待發行程式碼的應用環境來更新上線系統,避免利用人工佈建環境時的疏漏。 In this way, the local server 120 can integrate the version control storage server 110 and the cloud service platform 130 of different systems with each other and work together to form the cloud system 100 through the build tester 122, so the test can be automatically and effectively processed The code is tested, and the test results are provided for reference by the developers. At the same time, the complete setting steps can also be recorded to facilitate the developers to debug. In addition, the cloud system 100 can also update the online system by integrating the version control storage server 110, the local server 120, and the cloud service platform 130 to automatically deploy the application environment of the code to be released, avoiding the use of manual deployment environment. Omission.

第2圖是本發明一實施例之整合雲端系統100之方法200的流程圖。方法200可以透過建置測試器122來執行預定建置指令腳本來實作,方法200可包含 步驟S210至S270。 FIG. 2 is a flowchart of a method 200 for integrating the cloud system 100 according to an embodiment of the present invention. The method 200 may be implemented by executing a predetermined build instruction script by the build tester 122. The method 200 may include Steps S210 to S270.

S210:建置測試器122自版本控制儲存伺服器110取得待測程式碼A;S220:當建置測試器122偵測到雲端服務平台130尚未創建對應之測試儲存槽132時,於雲端服務平台130創建測試儲存槽132;S230:當建置測試器122偵測到測試儲存槽132中儲存超過一預定數量版本之程式碼時,清除最舊版本之程式碼;S240:建置測試器122將待測程式碼A上傳至雲端服務平台130之測試儲存槽132;S250:建置測試器122移除雲端服務平台130所開放之複數個服務項目;S260:建置測試器122根據待測程式碼A開通雲端服務平台130之複數個待測服務項目以佈建第一應用環境;及S270:建置測試器122於第一應用環境進行測試。 S210: The build tester 122 obtains the program code A to be tested from the version control storage server 110; S220: When the build tester 122 detects that the cloud service platform 130 has not yet created a corresponding test storage slot 132, it is used on the cloud service platform 130 Create a test storage slot 132; S230: When the build tester 122 detects that more than a predetermined number of versions of the code are stored in the test storage slot 132, clear the oldest version of the code; S240: The build tester 122 will Upload the test code A to the test storage slot 132 of the cloud service platform 130; S250: Build the tester 122 to remove multiple service items opened by the cloud service platform 130; S260: Build the tester 122 according to the test code A. Activate a plurality of service items to be tested of the cloud service platform 130 to deploy the first application environment; and S270: Build the tester 122 for testing in the first application environment.

在本發明的有些實施例中,方法200可以在建置測試器122偵測到版本控制儲存伺服器110上有更新過且未測試之待測程式碼時,於預定時間點自動執行預定建置指令腳本以完成步驟S210至S250的操作。 In some embodiments of the present invention, the method 200 can automatically execute a predetermined build at a predetermined time when the build tester 122 detects that there is an updated and untested code under test on the version control storage server 110 Instruct the script to complete the operations of steps S210 to S250.

第3圖是本發明一實施例之整合雲端系統100之方法300的流程圖。方法300可以透過建置測試器122來執行發行建置指令腳本來實作,方法300可包含步驟S310至S360。 FIG. 3 is a flowchart of a method 300 for integrating the cloud system 100 according to an embodiment of the present invention. The method 300 can be implemented by executing the issuance of a build instruction script by the build tester 122. The method 300 can include steps S310 to S360.

S310:建置測試器122自版本控制儲存伺服器110取得待發行程式碼B;S320:建置測試器122將待發行程式碼B上傳至雲端服務平台130之發行儲存槽134; S330:建置測試器122移除雲端服務平台130開放之複數個應用函式服務,並保留雲端服務平台130目前運行之複數個資料庫服務;S340:建置測試器122根據待發行程式碼B使雲端服務平台130開啟複數個應用函式服務以佈建第二應用環境;S350:建置測試器122比對第二應用環境中所運行之資料庫服務及先前測試待發行程式碼B時所使用到之複數個資料庫服務以判斷是否有未建立之資料庫;及S360:當建置測試器122判斷有未建立之資料庫服務時,建立對應的資料庫服務。 S310: The build tester 122 obtains the code B to be released from the version control storage server 110; S320: The build tester 122 uploads the code B to be released to the release storage slot 134 of the cloud service platform 130; S330: Build the tester 122 to remove multiple application function services opened by the cloud service platform 130, and retain the multiple database services currently running on the cloud service platform 130; S340: Build the tester 122 according to the code B to be released Enable the cloud service platform 130 to open a plurality of application function services to deploy the second application environment; S350: the construction tester 122 compares the database service running in the second application environment and the previous test of the code B to be released Use a plurality of database services to determine whether there is an uncreated database; and S360: when the build tester 122 determines that there is an uncreated database service, create a corresponding database service.

在有些實施例中,待發行程式碼B可以是由建置測試器122根據預設的條件自動決定,例如建置測試器122可根據複數個程式碼的測試結果,選擇通過最多測試項目之程式碼作為待發行程式碼B。然而本發明並不以此為限,在本發明的有些實施例中開發者也可自行決定待發行程式碼B,並且在適當的時間觸發建置測試器122執行發行建置指令腳本來完成待發行程式碼B的佈建。 In some embodiments, the code B to be released may be automatically determined by the build tester 122 according to preset conditions. For example, the build tester 122 may select the program that passes the most test items based on the test results of a plurality of codes The code is to be issued code B. However, the present invention is not limited to this. In some embodiments of the present invention, the developer can also determine the program code B to be released, and trigger the build tester 122 to execute the release build command script at an appropriate time to complete the Release the deployment of code B.

透過方法200及300,雲端系統100就能夠將不同系統的版本控制儲存伺服器110、本地伺服器120及雲端服務平台130互相整合,因此可以自動且有效地對待測試程式碼進行測試,並提供測試結果給開發者參考,同時也可記錄完整的設定步驟,以利開發者進行偵錯。此外,雲端系統100也可以透過整合版本控制儲存伺服器110、本地伺服器120及雲端服務平台130還可自動佈建待發行程式碼的應用環境來更新上線系統,避免利用人工佈建環境時的疏漏。 Through methods 200 and 300, the cloud system 100 can integrate the version control storage server 110, local server 120, and cloud service platform 130 of different systems with each other, so it can automatically and effectively test the code to be tested and provide testing. The result is given to the developer for reference, and the complete setting steps can also be recorded to facilitate the developer's debugging. In addition, the cloud system 100 can also update the online system by integrating the version control storage server 110, the local server 120, and the cloud service platform 130 to automatically deploy the application environment of the code to be released, avoiding the use of manual deployment environment. Omission.

綜上所述,本發明的實施例所提供的本地伺服器及整合雲端系統的方法可以將不同系統的版本控制儲存伺服器及雲端服務平台互相整合,因此能夠自動且有效地測試及發行程式碼,且同時可記錄完整的設定步驟,以利開發者進行偵錯,並且避免利用人工佈建環境時的疏漏。 In summary, the local server and the method for integrating cloud systems provided by the embodiments of the present invention can integrate the version control storage servers and cloud service platforms of different systems with each other, and therefore can automatically and effectively test and issue code , And at the same time, it can record the complete setting steps to facilitate developers to debug errors and avoid omissions when using manual deployment environments.

以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。 The foregoing descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made in accordance with the scope of the patent application of the present invention shall fall within the scope of the present invention.

200:方法 200: method

S210至S270:步驟 S210 to S270: steps

Claims (14)

一種整合雲端系統的方法,該雲端系統包含一版本控制儲存伺服器、一本地伺服器及一雲端服務平台,該本地伺服器包含一建置測試器,及該方法包含:該建置測試器執行一預定建置指令腳本,包含:該建置測試器自該版本控制儲存伺服器取得一待測程式碼;該建置測試器將該待測程式碼上傳至該雲端服務平台之一測試儲存槽;該建置測試器移除該雲端服務平台所開放之複數個服務項目,該些服務項目包含該雲端服務平台開放之至少一應用函式服務及至少一資料庫服務;該建置測試器根據該待測程式碼開通該雲端服務平台之複數個待測服務項目以佈建一第一應用環境;及該建置測試器於該第一應用環境進行測試;及該建置測試器執行一發行建置指令腳本,包含:該建置測試器自該版本控制儲存伺服器取得一待發行程式碼;該建置測試器將該待發行程式碼上傳至該雲端服務平台之一發行儲存槽;該建置測試器移除該雲端服務平台開放之複數個應用函式服務,並保留該雲端服務平台目前運行之複數個資料庫服務;該建置測試器根據該待發行程式碼使該雲端服務平台開啟複數個應用函式服務以佈建一第二應用環境;該建置測試器比對該第二應用環境中所運行之該些資料庫服務及先前 測試該待發行程式碼時所使用到之複數個資料庫服務以判斷是否有未建立之資料庫;及當該建置測試器判斷有未建立之至少一資料庫服務時,建立該至少一資料庫服務。 A method for integrating a cloud system, the cloud system includes a version control storage server, a local server and a cloud service platform, the local server includes a build tester, and the method includes: the build tester executes A predetermined build command script, including: the build tester obtains a code to be tested from the version control storage server; the build tester uploads the code to be tested to a test storage slot of the cloud service platform ; The build tester removes a plurality of service items opened by the cloud service platform, and these service items include at least one application function service and at least one database service opened by the cloud service platform; the build tester is based on The code to be tested opens a plurality of service items to be tested of the cloud service platform to deploy a first application environment; and the build tester is tested in the first application environment; and the build tester executes a release The build command script includes: the build tester obtains a code to be released from the version control storage server; the build tester uploads the code to be released to a release storage slot of the cloud service platform; The build tester removes the multiple application function services opened by the cloud service platform and retains the multiple database services currently running on the cloud service platform; the build tester enables the cloud service platform according to the pending code Open multiple application function services to deploy a second application environment; the build tester compares the database services running in the second application environment with the previous Multiple database services used when testing the code to be released to determine whether there is an uncreated database; and when the build tester determines that there is at least one uncreated database service, create the at least one data Library service. 如請求項1所述之方法,其中:該雲端服務平台係為亞馬遜雲端運算服務(Amazon Web Services);及該測試儲存槽係為亞馬遜雲端雲算服務所提供之一簡易儲存服務。 The method according to claim 1, wherein: the cloud service platform is Amazon Web Services; and the test storage tank is a simple storage service provided by Amazon Web Services. 如請求項2所述之方法,其中該待測程式碼包含該些待測服務項目之內容及用以統整該些待測服務項目以建置該第一應用環境之一基礎設施程式碼(infrastructure as code)。 The method according to claim 2, wherein the code to be tested includes the content of the service items to be tested and an infrastructure code used to integrate the service items to be tested to build the first application environment ( infrastructure as code). 如請求項1所述之方法,其中該建置測試器執行該預定建置指令腳本係當該建置測試器偵測到該版本控制儲存伺服器上有更新過且未測試之該待測程式碼時,該建置測試器於一預定時間點自動執行該預定建置指令腳本。 The method of claim 1, wherein the build tester executes the predetermined build command script when the build tester detects that there is an updated and untested program under test on the version control storage server When coding, the build tester automatically executes the predetermined build instruction script at a predetermined time point. 如請求項1所述之方法,另包含當該建置測試器偵測到該雲端服務平台尚未創建對應之該測試儲存槽時,於該雲端服務平台創建該測試儲存槽。 The method according to claim 1, further comprising when the build tester detects that the cloud service platform has not created the corresponding test storage slot, creating the test storage slot on the cloud service platform. 如請求項1所述之方法,另包含當該建置測試器偵測到該測試儲存槽中儲存超過一預定數量版本之程式碼時,清除最舊版本之一程式碼。 The method described in claim 1, further comprising clearing one of the oldest versions of the code when the build tester detects that more than a predetermined number of versions of the code are stored in the test storage slot. 如請求項1所述之方法,另包含根據該建置測試器測試複數個程式碼的測試結果,自該些程式碼中選擇通過最多測試項目之一程式碼作為該待發行程式碼。 The method as described in claim 1, further comprising testing a plurality of codes according to the test result of the build tester, and selecting one of the codes from the codes as the code to be released. 一種本地伺服器,適於與一版本控制儲存伺服器以及一雲端服務平台共同運作以形成一雲端系統,該版本控制儲存伺服器用以管理並儲存相異版本的複數個程式碼,該雲端服務平台用以提供複數個服務項目及複數個儲存空間,該本地伺服器包含:一建置測試器,用以:執行一預定建置指令腳本以:自該版本控制儲存伺服器取得一待測程式碼;將該待測程式碼上傳至該雲端服務平台之一測試儲存槽;移除該雲端服務平台所開放之複數個服務項目,該些服務項目包含該雲端服務平台開放之至少一應用函式服務及至少一資料庫服務;根據該待測程式碼開通該雲端服務平台之複數個待測服務項目以佈建一應用環境;及於該應用環境進行測試;及執行一發行建置指令腳本以:自該版本控制儲存伺服器取得一待發行程式碼;將該待發行程式碼上傳至該雲端服務平台之一發行儲存槽;該建置測試器移除該雲端服務平台開放之複數個應用函式服務,並保留該雲端服務平台目前運行之複數個資料庫服務;根據該待發行程式碼使該雲端服務平台開啟複數個應用函式服務 以佈建一第二應用環境;比對該第二應用環境中所運行之該些資料庫服務及先前測試該待發行程式碼時所使用到之複數個資料庫服務以判斷是否有未建立之資料庫;及當該建置測試器判斷有未建立之至少一資料庫服務時,建立該至少一資料庫服務。 A local server adapted to work together with a version control storage server and a cloud service platform to form a cloud system. The version control storage server is used to manage and store multiple codes of different versions. The cloud service The platform is used to provide a plurality of service items and a plurality of storage spaces. The local server includes: a build tester for: executing a predetermined build command script to: obtain a program to be tested from the version control storage server Code; upload the program code to be tested to a test storage slot of the cloud service platform; remove multiple service items opened by the cloud service platform, and these service items include at least one application function opened by the cloud service platform Service and at least one database service; open a plurality of service items to be tested of the cloud service platform according to the code to be tested to build an application environment; and test in the application environment; and execute a release build command script to : Obtain a code to be released from the version control storage server; upload the code to be released to one of the release storage slots of the cloud service platform; the build tester removes multiple application letters that are open to the cloud service platform Service, and retain multiple database services currently running on the cloud service platform; enable the cloud service platform to open multiple application function services based on the pending code To deploy a second application environment; compare the database services running in the second application environment and the multiple database services used in the previous test of the code to be released to determine whether there are uncreated Database; and when the build tester determines that there is at least one database service that has not been created, the at least one database service is created. 如請求項8所述之本地伺服器,其中:該雲端服務平台係為亞馬遜雲端運算服務(Amazon Web Services);及該測試儲存槽係為亞馬遜雲端雲算服務所提供之一簡易儲存服務。 The local server according to claim 8, wherein: the cloud service platform is Amazon Web Services; and the test storage slot is a simple storage service provided by Amazon Web Services. 如請求項9所述之本地伺服器,其中該待測程式碼包含該些待測服務項目之內容及用以統整該些待測服務項目以建置該第一應用環境之一基礎設施程式碼(infrastructure as code)。 The local server according to claim 9, wherein the code to be tested includes the content of the service items to be tested and an infrastructure program used to integrate the service items to be tested to build the first application environment Code (infrastructure as code). 如請求項8所述之本地伺服器,其中該建置測試器另用以當該建置測試器偵測到該版本控制儲存伺服器上有更新過且未測試之該待測程式碼時,於一預定時間點自動執行該預定建置指令腳本。 The local server as described in claim 8, wherein the build tester is further used when the build tester detects that there is an updated and untested code under test on the version control storage server, The predetermined build instruction script is automatically executed at a predetermined time point. 如請求項8所述之本地伺服器,其中該建置測試器另用以當偵測到該雲端服務平台尚未創建對應之該測試儲存槽時,於該雲端服務平台創建該測試儲存槽。 The local server according to claim 8, wherein the build tester is further used to create the test storage slot on the cloud service platform when it is detected that the cloud service platform has not created the corresponding test storage slot. 如請求項8所述之本地伺服器,其中該建置測試器另用以當偵測到該 測試儲存槽中儲存超過一預定數量版本之程式碼時,清除最舊版本之一程式碼。 The local server described in claim 8, wherein the build tester is also used when detecting the When there is more than a predetermined number of versions of the code stored in the test storage slot, the code of one of the oldest versions is cleared. 如請求項8所述之本地伺服器,其中該建置測試器另用以根據該建置測試器測試複數個程式碼的測試結果,自該些程式碼中選擇通過最多測試項目之一程式碼作為該待發行程式碼。 The local server as described in claim 8, wherein the build tester is further used to test a plurality of codes according to the test result of the build tester, and select one of the code which passes the most test items from the codes As the code to be released.
TW108101289A 2019-01-14 2019-01-14 Cloud system and method for integrating a cloud system TWI710896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108101289A TWI710896B (en) 2019-01-14 2019-01-14 Cloud system and method for integrating a cloud system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108101289A TWI710896B (en) 2019-01-14 2019-01-14 Cloud system and method for integrating a cloud system

Publications (2)

Publication Number Publication Date
TW202026880A TW202026880A (en) 2020-07-16
TWI710896B true TWI710896B (en) 2020-11-21

Family

ID=73004888

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108101289A TWI710896B (en) 2019-01-14 2019-01-14 Cloud system and method for integrating a cloud system

Country Status (1)

Country Link
TW (1) TWI710896B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700774A (en) * 2023-05-29 2023-09-05 鼎捷软件股份有限公司 Application program management system and application program management method
CN119512919A (en) * 2023-08-23 2025-02-25 富联精密电子(天津)有限公司 Server testing system, method, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200921433A (en) * 2007-08-17 2009-05-16 Salesforce Com Inc On-demand database service system, method, and computer program product for verifying that a developed application will operate properly with at least one other application
US20090300580A1 (en) * 2007-12-20 2009-12-03 Hsbc Technologies Inc. Automated methods and systems for developing and deploying projects in parallel
US20160132421A1 (en) * 2014-11-10 2016-05-12 International Business Machines Corporation Adaptation of automated test scripts
CN105701005A (en) * 2014-11-28 2016-06-22 阿里巴巴集团控股有限公司 OSGI (Open Service Gateway Initiative) based application frame test method and system
CN107315687A (en) * 2017-06-29 2017-11-03 环球智达科技(北京)有限公司 Code method for automatically releasing
TW201828053A (en) * 2017-01-19 2018-08-01 阿里巴巴集團服務有限公司 Code submission method and device that conducts inspection on a code to be submitted before the code in finally submitted
CN108388445A (en) * 2018-03-09 2018-08-10 北京四方继保自动化股份有限公司 One kind being based on the continuous integrating method of " platform+application " pattern

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200921433A (en) * 2007-08-17 2009-05-16 Salesforce Com Inc On-demand database service system, method, and computer program product for verifying that a developed application will operate properly with at least one other application
US20090300580A1 (en) * 2007-12-20 2009-12-03 Hsbc Technologies Inc. Automated methods and systems for developing and deploying projects in parallel
US20160132421A1 (en) * 2014-11-10 2016-05-12 International Business Machines Corporation Adaptation of automated test scripts
CN105701005A (en) * 2014-11-28 2016-06-22 阿里巴巴集团控股有限公司 OSGI (Open Service Gateway Initiative) based application frame test method and system
TW201828053A (en) * 2017-01-19 2018-08-01 阿里巴巴集團服務有限公司 Code submission method and device that conducts inspection on a code to be submitted before the code in finally submitted
CN107315687A (en) * 2017-06-29 2017-11-03 环球智达科技(北京)有限公司 Code method for automatically releasing
CN108388445A (en) * 2018-03-09 2018-08-10 北京四方继保自动化股份有限公司 One kind being based on the continuous integrating method of " platform+application " pattern

Also Published As

Publication number Publication date
TW202026880A (en) 2020-07-16

Similar Documents

Publication Publication Date Title
CN110347395B (en) Software release method and device based on cloud computing platform
EP3769223B1 (en) Unified test automation system
US8434058B1 (en) Integrated system and method for validating the functionality and performance of software applications
CN109960643B (en) Code testing method and device
US10083027B2 (en) Systems and methods for managing software development environments
US9940225B2 (en) Automated error checking system for a software application and method therefor
WO2020140820A1 (en) Software testing method, system, apparatus, device, medium, and computer program product
US9389978B2 (en) Automated operating system test framework
CN114880220A (en) Development system and method for vehicle automatic driving software
US20180027051A1 (en) Application management in an application deployment pipeline
CN107992404A (en) A kind of Software Automatic Testing Method and device
TWI710896B (en) Cloud system and method for integrating a cloud system
CN114996955B (en) A method and device for constructing a range environment for cloud-native chaos engineering experiments
EP3514680B1 (en) Identification of changes in functional behavior and runtime behavior of a system during maintenance cycles
CN119718385B (en) Operating system updating method, electronic device, storage medium and program product
CN112527312B (en) Test method and test device for embedded system
CN107992420A (en) Put forward the management method and system of survey project
US20250021438A1 (en) Detecting an error in an updated software package by automatically rebuilding related downstream products
CN119127254A (en) Hard disk firmware upgrade method, device, electronic device and storage medium
CN113297058A (en) Case generation method, test method, device and server
CN117891459A (en) A DevSecOps solution for IaaS layer software supporting multiple architectures
US20100191710A1 (en) Network Meta-Data Libraries And Related Methods
US8141039B2 (en) Method and system for consolidating machine readable code
CN120162386B (en) A method, device and medium for intelligent logic processing based on database
KR102392469B1 (en) Method for replicating a project server for trouble-shooting and a cloud development platform system using the same

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees