Isolated environment provisioning in service mesh-based microservices systems
A system can receive a changeset for an updated microservice and an identifier of a user account that is configured to access the updated microservice, wherein the updated microservice represents an updated version relative to a current version of a microservice. The system can, in response to determining that the current version of the microservice is configured to access a first instance of a data store, provision a second instance of the data store. The system can instantiate the updated microservice. The system can update routing rules for the service mesh. The system can, in response to receiving traffic determined to be associated with the user account and directed to the current version of the microservice, route the traffic to the updated microservice instead of routing the traffic to the current version of the microservice.
1 . A system, comprising:
at least one processor; and
at least one memory coupled to the at least one processor, comprising instructions that, in response to execution by the at least one processor, cause the system to perform operations, comprising:
receiving a changeset for an updated microservice and an identifier of a user account that is configured to access the updated microservice, wherein the updated microservice represents an updated version relative to a current version of a microservice, and wherein the current version of the microservice is deployed to a service mesh that comprises a group of microservices;
before performing a provisioning of a second instance of a data store, receiving user input data via the user account that indicates changes to make to the second instance of the data store after performing the provisioning of the second instance of the data store;
in response to determining to instantiate the updated microservice, based on the receiving of the changeset for the updated microservice, and in response to determining that the current version of the microservice is configured to access a first instance of the data store, provisioning the second instance of the data store, wherein the provisioning comprises creating the second instance of the data store, wherein the provisioning is based on a script or executable computer code that identifies the data store, wherein the script or the executable computer code is stored by a persistence provisioning component that performs the provisioning, wherein the persistence provisioning component is separate from a microservice that accesses the data store, wherein the determination to instantiate the updated microservice is separate from a call to the data store, and wherein an output of the provisioning comprises access parameters for the second instance of the data store that are received by the persistence provisioning component;
causing the changes to the second instance of the data store to be made after performing the provisioning of the second instance of the data store;
instantiating the updated microservice to the service mesh based on the changeset;
after instantiating the updated microservice, providing the updated microservice with the access parameters for the second instance of the data store;
updating routing rules for the service mesh to indicate that any traffic in the service mesh that is associated with the user account and that is directed to the current version of the microservice is to be routed to the updated microservice, to produce updated routing rules; and
in response to receiving first traffic determined to be associated with the user account and directed to the current version of the microservice, routing the first traffic to the updated microservice, based on the updated routing rules, instead of routing the first traffic to the current version of the microservice, wherein the updated microservice accesses the second instance of the data store in response to receiving the first traffic and based on the access parameters that were provided to the updated microservice, wherein the updated microservice is part of a first isolated environment of the service mesh, wherein the current version of the microservice is part of a second isolated environment of the service mesh, wherein the first isolated environment receives the first traffic and excludes second traffic based on the updated routing rules, and wherein the second isolated environment receives the second traffic and excludes the first traffic based on the updated routing rules.
2 . The system of claim 1 , wherein an integration and deployment component performs the receiving of the changeset, and wherein, in response to the receiving of the changeset, the integration and deployment component sends a request to the persistence provisioning component to perform the provisioning of the second instance of the data store.
3 . The system of claim 1 , wherein performing the provisioning of the second instance of the data store is performed before performing the instantiating of the updated microservice to the service mesh based on the changeset.
4 . The system of claim 1 , wherein the persistence provisioning component is configured to export contents of the first instance of the data store to produce exported contents, and wherein the persistence provisioning component is configured to import the exported contents to the second instance of the data store.
5 . The system of claim 4 , wherein the persistence provisioning component is configured to import the exported contents to the second instance of the data store based on determining that user input data indicates to perform an import rather than to create new contents.
6 . The system of claim 1 , wherein a default configuration is to perform a first selection of importing contents of the first instance of the data store to the second instance of the data store and creating new contents for the second instance of the data store, wherein user input data indicates a second selection of the importing of the contents of the first instance of the data store to the second instance of the data store and the creating the new contents for the second instance of the data store, wherein the user input data overrides the default configuration, and wherein the first selection differs from the second selection.
7 . The system of claim 6 , wherein the user input data is associated with the user account.
8 . The system of claim 1 , wherein the access parameters comprise a uniform resource locator that identifies the second instance of the data store, or a login credential that is authorized to access the second instance of the data store, and wherein the updated microservice receives the access parameters and utilizes the access parameters to access the second instance of the data store.
9 . A method, comprising:
receiving, by a system comprising at least one processor, a changeset for an updated microservice and an identifier of a user account, wherein the updated microservice is representative of an update to a current version of a microservice that is deployed to a service mesh;
before performing a provisioning of a second instance of a data store, receiving, by the system, user input data from the user account that indicates changes to make to the second instance of the data store after performing the provisioning of the second instance of the data store;
in response to determining to instantiate the updated microservice, based on the receiving of the changeset for the updated microservice, and in response to determining that the current version of the microservice is configured to access a first instance of the data store, provisioning, by the system, the second instance of the data store, wherein the provisioning comprises creating the second instance of the data store, wherein the provisioning is based on a script or executable computer code that identifies the data store, wherein the script or the executable computer code is stored by a persistence provisioning process that performs the provisioning, wherein the persistence provisioning process is separate from a microservice that accesses the data store, wherein the determination to instantiate the updated microservice is separate from a call to the data store, and wherein an output of the provisioning comprises access parameters for the second instance of the data store that are received by the persistence provisioning process;
causing, by the system, the changes to the second instance of the data store to be made after performing the provisioning of the second instance of the data store;
deploying, by the system, the updated microservice to the service mesh based on the changeset;
after deploying the updated microservice, providing, by the system, the updated microservice with the access parameters for the second instance of the data store;
updating, by the system, routing rules for the service mesh to indicate that any traffic in the service mesh that is associated with the user account and that is directed to the current version of the microservice is to be routed to the updated microservice, to produce updated routing rules; and
in response to receiving first traffic that is associated with the user account and that is directed to the current version of the microservice, and based on the updated routing rules, routing, by the system, the first traffic to the updated microservice while foregoing routing the first traffic to the current version of the microservice, wherein the updated microservice accesses the second instance of the data store in response to receiving the first traffic, wherein the updated microservice is part of a first isolated environment of the service mesh, wherein the current version of the microservice is part of a second isolated environment of the service mesh, wherein the first isolated environment receives the first traffic and excludes second traffic, and wherein the second isolated environment receives the second traffic and excludes the first traffic.
10 . The method of claim 9 , wherein the access parameters comprise a uniform resource locator that identifies the second instance of the data store, or a login credential that is authorized to access the second instance of the data store, and wherein the updated microservice receives the access parameters and utilizes the access parameters to access the second instance of the data store.
11 . The method of claim 9 , further comprising:
before performing the provisioning of the second instance of the data store, receiving, by the system, user input data from the user account that indicates changes to make to the second instance of the data store after performing the provisioning of the second instance of the data store; and
causing, by the system, the changes to the second instance of the data store to be made after performing the provisioning of the second instance of the data store.
12 . The method of claim 9 , wherein the changeset indicates a change to how the updated microservice is configured to interact with the second instance of the data store relative to how the current version of the microservice is configured to interact with the first instance of the data store, and wherein changes to make to the second instance of the data store correspond to the change to how the updated microservice is configured to interact with the second instance of the data store.
13 . The method of claim 9 , wherein an integration and deployment process performs the receiving of the changeset, and wherein, in response to the receiving of the changeset, the integration and deployment process sends a request to the persistence provisioning process to perform the provisioning of the second instance of the data store.
14 . The method of claim 9 , wherein the data store comprises a database, and wherein the script or the executable computer code identifies a database schema of the database.
15 . The method of claim 9 , wherein performing the provisioning of the second instance of the data store is performed before performing the instantiating of the updated microservice to the service mesh based on the changeset.
16 . The method of claim 9 , wherein an integration and deployment component performs the receiving of the changeset, and wherein, in response to the receiving of the changeset, the integration and deployment component sends a request to the persistence provisioning component to perform the provisioning of the second instance of the data store.
17 . A non-transitory computer-readable medium comprising instructions that, in response to execution, cause a system comprising at least one processor to perform operations, comprising:
based on receiving an identifier of a user account and a changeset applicable to generate an updated microservice relative to a current version of a microservice that is deployed to a service mesh, deploying the updated microservice to the service mesh;
before performing a provisioning of a second instance of a data store, receiving user input data associated with the user account that indicates changes to make to the second instance of the data store after performing the provisioning of the second instance of the data store;
in response to determining to instantiate the updated microservice, based on the receiving of the changeset, and in response to determining that the current version of the microservice is configured to access a first instance of the data store, provisioning the second instance of the data store, wherein the provisioning comprises creating the second instance of the data store, wherein the provisioning is based on a script or executable computer code that identifies the data store, wherein the script or the executable computer code is stored by a persistence provisioning component that performs the provisioning, wherein the persistence provisioning component is separate from a microservice that accesses the data store, wherein the determination to instantiate the updated microservice is separate from a call to the data store, and wherein an output of the provisioning comprises access parameters for the second instance of the data store that are received by the persistence provisioning component;
causing the changes to the second instance of the data store to be made after performing the provisioning of the second instance of the data store;
after deploying the updated microservice, providing the updated microservice with the access parameters;
updating routing rules for the service mesh to indicate that any portions of traffic in the service mesh that are associated with the user account and that are directed to the current version of the microservice is to be routed to the updated microservice, to produce updated routing rules; and
in response to receiving first traffic, and based on the updated routing rules, wherein the first traffic is determined to be associated with the user account and determined to be directed to the current version of the microservice, routing the first traffic to the updated microservice instead of routing the first traffic to the current version of the microservice, wherein the updated microservice accesses the second instance of the data store in response to receiving the first traffic, wherein the updated microservice is part of a first isolated environment of the service mesh, wherein the current version of the microservice is part of a second isolated environment of the service mesh, wherein the first isolated environment receives the first traffic and excludes second traffic, and wherein the second isolated environment receives the second traffic and excludes the first traffic.
18 . The non-transitory computer-readable medium of claim 17 , wherein updating the routing rules transforms first routing rules to second routing rules, and further comprising:
after routing the traffic, and in response to determining to end deploying the updated microservice,
terminating execution of the updated microservice,
terminating the second instance of the data store, and
reverting the second routing rules to the first routing rules.
19 . The non-transitory computer-readable medium of claim 17 , wherein the operations further comprise:
in response to receiving the second traffic, wherein the second traffic is determined not to be associated with the user account and is determined to be directed to the current version of the microservice, routing the second traffic to the current version of the microservice instead of routing the second traffic to the updated microservice, wherein the current version of the microservice accesses the first instance of the data store in response to receiving the second traffic.
20 . The non-transitory computer-readable medium of claim 17 , wherein the service mesh comprises an infrastructure layer for a group of microservices that comprises the updated microservice and the current version of the microservice.