US-20260126986-A1 - USING SERVER GENERATIONS TO ENABLE BLUE-GREEN UPGRADES IN CONTAINERIZED ENVIRONMENTS
Abstract
A computer-implemented method includes determining, using an upgrade tool, a current server generation value and which database schema is in use. A configuration is written to a system database that, for a computer system generation <x+1>, which is higher than a current computer system generation <x>, a schema associated with the computer system generation <x+1> is a different schema than the schema associated with the current computer system generation <x>, and that, for tools during an upgrade, the schema is the different schema. A database schema for the different schema is prepared. An application server instance is created in an upgrade container. A configuration is written to the system database that application server instances using a server generation value of x+1 use the database schema for a different schema. A custom resource repository is configured to create an entry for the server generation value of <x+1>.
Inventors
- Welf Walter
- Steffen Meissner
- Kerstin Hoeft
- Heiko Konrad
- Alexander Koch
- Thomas Ullrich
- Volker Driesen
Assignees
- SAP SE
Dates
- Publication Date
- 20260507
- Application Date
- 20241105
Claims (20)
- 1 . A computer-implemented method, comprising: determining, using an upgrade tool, a current server generation value and which database schema is in use; writing, using the upgrade tool, a configuration to a system database that, for a computer system generation <x+1>, which is higher than a current computer system generation <x>, a schema associated with the computer system generation <x+1> is a different schema than the schema associated with the current computer system generation <x>, and that, for tools during an upgrade, the schema is the different schema; preparing, using the upgrade tool and in the system database, a database schema for the different schema; creating, using the upgrade tool, an application server instance in an upgrade container; writing, using the upgrade tool, a configuration to the system database that application server instances using a server generation value of x+1 use the database schema for a different schema; and configuring, using the upgrade tool, a custom resource repository to create an entry for the server generation value of <x+1>.
- 2 . The computer-implemented method of claim 1 , wherein, creating, using the upgrade tool, an application server instance in an upgrade container, comprises: writing, using the upgrade tool and to a file system associated with the application server instance in an upgrade container, the server generation value of <x+1>; starting, using the upgrade tool and with the server generation value of <x+1>, the application server instance in an upgrade container, wherein the application server instance in an upgrade container reads from the system database to connect to the database schema for the different schema; and communicating, by the application server instance in an upgrade container, with a system message server.
- 3 . The computer-implemented method of claim 1 , comprising: reading, by an advanced business application programming (ABAP) service instance (ASI) operator, a start configuration; creating, by the ASI operator, a container associated with a message server; and starting, by the ASI operator, the container and the message server.
- 4 . The computer-implemented method of claim 3 , comprising: reading, by the ASI operator, the start configuration; and creating, by the ASI operator, an application server container.
- 5 . The computer-implemented method of claim 4 , comprising: injecting, by the ASI operator, a value of a server generation value <x> into a file system of the application server container; injecting, by the ASI operator, other parameters into a file system of the application server container; and starting, by the ASI operator and in the application server container, an application server of the server generation value <x>.
- 6 . The computer-implemented method of claim 5 , comprising: reading, by a database interface associated with the application server of the server generation value <x> and from the system database, a specific value of a database schema with which to connect.
- 7 . The computer-implemented method of claim 6 , comprising: triggering the ASI operator to read a configuration from the custom resource repository; identifying, by the ASI operator, a new entry for the server generation value <x+1>; and creating, by the ASI operator, an application server container.
- 8 . The computer-implemented method of claim 7 , comprising: injecting, by the ASI operator, a value of a server generation value <x+1> into a file system of the application server container; injecting, by the ASI operator, other parameters into a file system of the application server container; and starting, by the ASI operator and in the application server container, an application server of the server generation value <x+1>.
- 9 . The computer-implemented method of claim 8 , comprising: reading, by a database interface associated with the application server of the server generation value <x+1> and from the system database, a specific value of a database schema with which to connect.
- 10 . The computer-implemented method of claim 9 , comprising: communicating, by the message server, with the application server of generation value <x> and the application server of generation value <x+1>; and switching, by the upgrade tool, user requests to the application server of generation value <x+1>.
- 11 . A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform one or more operations, comprising: determining, using an upgrade tool, a current server generation value and which database schema is in use; writing, using the upgrade tool, a configuration to a system database that, for a computer system generation <x+1>, which is higher than a current computer system generation <x>, a schema associated with the computer system generation <x+1> is a different schema than the schema associated with the current computer system generation <x>, and that, for tools during an upgrade, the schema is the different schema; preparing, using the upgrade tool and in the system database, a database schema for the different schema; creating, using the upgrade tool, an application server instance in an upgrade container; writing, using the upgrade tool, a configuration to the system database that application server instances using a server generation value of x+1 use the database schema for a different schema; and configuring, using the upgrade tool, a custom resource repository to create an entry for the server generation value of <x+1>.
- 12 . The non-transitory, computer-readable medium of claim 11 , wherein, creating, using the upgrade tool, an application server instance in an upgrade container, comprises: writing, using the upgrade tool and to a file system associated with the application server instance in an upgrade container, the server generation value of <x+1>; starting, using the upgrade tool and with the server generation value of <x+1>, the application server instance in an upgrade container, wherein the application server instance in an upgrade container reads from the system database to connect to the database schema for the different schema; and communicating, by the application server instance in an upgrade container, with a system message server.
- 13 . The non-transitory, computer-readable medium of claim 11 , comprising: reading, by an advanced business application programming (ABAP) service instance (ASI) operator, a start configuration; creating, by the ASI operator, a container associated with a message server; and starting, by the ASI operator, the container and the message server.
- 14 . The non-transitory, computer-readable medium of claim 13 , comprising: reading, by the ASI operator, the start configuration; and creating, by the ASI operator, an application server container.
- 15 . The non-transitory, computer-readable medium of claim 14 , comprising: injecting, by the ASI operator, a value of a server generation value <x> into a file system of the application server container; injecting, by the ASI operator, other parameters into a file system of the application server container; and starting, by the ASI operator and in the application server container, an application server of the server generation value <x>.
- 16 . The non-transitory, computer-readable medium of claim 15 , comprising: reading, by a database interface associated with the application server of the server generation value <x> and from the system database, a specific value of a database schema with which to connect.
- 17 . The non-transitory, computer-readable medium of claim 16 , comprising: triggering the ASI operator to read a configuration from the custom resource repository; identifying, by the ASI operator, a new entry for the server generation value <x+1>; and creating, by the ASI operator, an application server container.
- 18 . The non-transitory, computer-readable medium of claim 17 , comprising: injecting, by the ASI operator, a value of a server generation value <x+1> into a file system of the application server container; injecting, by the ASI operator, other parameters into a file system of the application server container; and starting, by the ASI operator and in the application server container, an application server of the server generation value <x+1>.
- 19 . The non-transitory, computer-readable medium of claim 18 , comprising: reading, by a database interface associated with the application server of the server generation value <x+1> and from the system database, a specific value of a database schema with which to connect.
- 20 . A computer-implemented system, comprising: one or more computers; and one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations, comprising: determining, using an upgrade tool, a current server generation value and which database schema is in use; writing, using the upgrade tool, a configuration to a system database that, for a computer system generation <x+1>, which is higher than a current computer system generation <x>, a schema associated with the computer system generation <x+1> is a different schema than the schema associated with the current computer system generation <x>, and that, for tools during an upgrade, the schema is the different schema; preparing, using the upgrade tool and in the system database, a database schema for the different schema; creating, using the upgrade tool, an application server instance in an upgrade container; writing, using the upgrade tool, a configuration to the system database that application server instances using a server generation value of x+1 use the database schema for a different schema; and configuring, using the upgrade tool, a custom resource repository to create an entry for the server generation value of <x+1>.
Description
BACKGROUND SAP SE's blue-green zero downtime upgrade of systems composed of an application server and database (DB) running in a containerized environment (including smaller changes being deployed—such as, hot fix collections, support packages, and “updates”) works with two DB-schemas—i.e., a blue and a green schema. During an upgrade, usage switches to a respective other schema. Depending on upgrade history, a production system can use blue or green schema and the upgrade tools and switch during the upgrade then uses the respective other schema, this can be individual for different systems in a landscape depending on their individual provisioning time and upgrade history. While a production application server uses one schema, the upgrade uses the respective other schema to prepare a target software version, including connecting application servers to execute application specific tasks for the upgrade, before the users are switched to the new version. Issues with the current procedure include scale-out, scale-in, and server restart/reprovisioning during a deployment procedure that is unaware of the upgrade procedure progress, application servers being provisioned for a system require system-individual configurations and depend on the progress of the upgrade procedure, connection to a DB depends on DB history, and containers cannot be configured statically for all systems in a landscape. SUMMARY The present disclosure describes using server generations to enable blue-green upgrades in containerized environments. In an implementation, a computer-implemented method, comprises: determining, using an upgrade tool, a current server generation value and which database schema is in use; writing, using the upgrade tool, a configuration to a system database that, for a computer system generation <x+1>, which is higher than a current computer system generation <x>, a schema associated with the computer system generation <x+1> is a different schema than the schema associated with the current computer system generation <x>, and that, for tools during an upgrade, the schema is the different schema; preparing, using the upgrade tool and in the system database, a database schema for the different schema; creating, using the upgrade tool, an application server instance in an upgrade container; writing, using the upgrade tool, a configuration to the system database that application server instances using a server generation value of x+1 use the database schema for a different schema; and configuring, using the upgrade tool, a custom resource repository to create an entry for the server generation value of <x+1>. The described subject matter can be implemented using a computer-implemented method; a non-transitory, computer-readable medium storing computer-readable instructions to perform the computer-implemented method; and a computer-implemented system comprising one or more computer memory devices interoperably coupled with one or more computers and having tangible, non-transitory, machine-readable media storing instructions that, when executed by the one or more computers, perform the computer-implemented method/the computer-readable instructions stored on the non-transitory, computer-readable medium. The subject matter described in this specification can be implemented to realize one or more of the following advantages. The described approach decouples different operation processes, such as scale-out and upgrade, and still allows configuring the de-coupled processes and the respective other process to act as configured (e.g., to scale out the old, the new or the old and new application servers, or to create scale-out instances with the configuration settings currently required by the upgrade). The details of one or more implementations of the subject matter of this specification are set forth in the Detailed Description, the Claims, and the accompanying drawings. Other features, aspects, and advantages of the subject matter will become apparent to those of ordinary skill in the art from the Detailed Description, the Claims, and the accompanying drawings. DESCRIPTION OF DRAWINGS FIG. 1 is an illustration of example parameters involved in the described approach, according to an implementation of the present disclosure. FIG. 2 is a box diagram illustrating server generations before switch, according to an implementation of the present disclosure. FIG. 3 is a box diagram illustrating server generations during switch, according to an implementation of the present disclosure. FIG. 4 is a flowchart illustrating an example of a computer-implemented method for using server generations to enable blue-green upgrades in containerized environments, according to an implementation of the present disclosure. FIG. 5 is a block diagram illustrating an example of a computer-implemented system used to provide computational functionalities associated with described algorithms, methods, functions, processes, flows, and procedures, according to