Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Preliminary Version of the Guideline Document for Update Propagation #2

Merged
merged 9 commits into from
Jul 9, 2020
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# IntelliJ IDEA metatdata
.idea
66 changes: 66 additions & 0 deletions update/Propagating_Updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Propagating Updates

A discussion on updating an existing WSO2 product deployment in a container platform.

chirangaalwis marked this conversation as resolved.
Show resolved Hide resolved
## Contents
chirangaalwis marked this conversation as resolved.
Show resolved Hide resolved

* [When do we need to update?](#when-do-we-need-to-update?)
* [Simplest way to perform an update](#simplest-way-to-perform-an-update)
* [Achieve zero downtime](#achieve-zero-downtime)

### When do we need to update?

The following are some of the scenarios which instigates the need for an update to an existing
WSO2 product deployment in a container platform.

* Integrate [WSO2 Updates](https://wso2.com/updates) containing an improvement or a bug fix
chirangaalwis marked this conversation as resolved.
Show resolved Hide resolved
* A version migration of the used WSO2 product
* Updates to configuration files and non-configuration artifacts (e.g. binaries such as, third-party libraries,
Carbon extensions in the form of OSGi bundles, [Carbon Applications](https://docs.wso2.com/display/Carbon440/Working+with+Carbon+Applications)
or any security related artifacts such as, Java Keystore files)
* Integrate changes to the container image source
Copy link
Contributor

@chamindi-a chamindi-a Jun 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include changes to the container image source

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chamindi-a I think we should stick to the verb Integrate here, as Include actually does not imply the meaning, i.e. to perform a change to container image source and deploy it.

Further, this is applicable to the next point which is about installation resources as well.

WDYT?

Copy link
Contributor

@chamindi-a chamindi-a Jun 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chirangaalwis: I have tried a change as the same verb was used in three instances. if we can change this iam ok

* Integrate changes to the container platform installation resources (e.g. Kubernetes resources or Helm Chart source)

### Simplest way to perform an update

We recommend the use of [official WSO2 product Helm Charts](https://hub.helm.sh/charts/wso2) for production grade WSO2 product deployments
in Kubernetes environments.

The simplest way to perform an update to an existing WSO2 product deployment is to use a [Helm based upgrade](https://helm.sh/docs/helm/helm_upgrade/).
chirangaalwis marked this conversation as resolved.
Show resolved Hide resolved

1. Perform the required change(s).

The following are some of the probable changes.

* An update of [Helm Values](https://helm.sh/docs/chart_template_guide/values_files/) (e.g. update to the container
image tag)
* An update to configuration file(s)

2. Perform a Helm based upgrade.

Kubernetes resources for WSO2 products utilize the most update strategy depending on the following factors.
chirangaalwis marked this conversation as resolved.
Show resolved Hide resolved

* Involved WSO2 product profile
* Achieve zero downtime during the update

**Note:**
> If you are not using Helm package manager to deploy WSO2 product Kubernetes resources, you may have to perform the
update via Kubernetes client commands.
> For example, in order to apply a configuration file change, you may have to recreate the existing ConfigMap corresponding
the changed file and perform a [Deployment rollout](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment).

### Achieve zero downtime

The most popular update strategy utilized by WSO2 product Kubernetes resources is of type,
[rolling update](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/). Both resource types
Deployments and [StatefulSets](https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#rolling-update)
primarily adopt this strategy.

The prime reason for adopting rolling update strategy is its ability to perform an update with zero downtime.

**Notes:**
> Apart from the rolling update strategy, we adopt [`OnDelete`](https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#on-delete)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DilanUA @ThilinaManamgoda as per the internal discussion this needs to be changed. Will update this after further testing of the discussed scenario.

for API Manager's Publisher and DevPortal profiles due to [this](https://github.com/wso2/kubernetes-apim/issues/397) issue.

> This strategy involves user's manual intervention. In order to avoid downtime in deployments with high availability,
it is recommended to perform the deletion of the relevant instances sequentially.