Skip to content

Commit

Permalink
Merge pull request #13 from ranganathan-arumugam/4.1Upgrade_Script
Browse files Browse the repository at this point in the history
4.1 upgrade script
  • Loading branch information
Sankaralingam1667 authored Apr 29, 2022
2 parents eb6578c + 89d2da6 commit 4f4e846
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ Bold Reports can be deployed on Kubernetes cluster. You can create Kubernetes cl
* [Amazon Elastic Kubernetes Service (EKS)](docs/amazon-eks.md)
* [Azure Kubernetes Service (AKS)](docs/microsoft-aks.md)
* [On-premise](docs/on-premise.md)

# Upgrade Bold Reports

If you are upgrading Bold Reports to 4.1.78, please follow the steps in this [link](upgrade/4-1_upgrade.md).
47 changes: 47 additions & 0 deletions upgrade/4-1_upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Upgrading Bold Reports to latest version

This section explains how to upgrade Bold Reports to latest version in your Kubernetes cluster. You can refer to the features and enhancements from this [Release Notes](https://www.boldreports.com/release-history/embedded-reporting/4-1#4-1-78).


## Backup the existing data
Before upgrading the Bold Reports to latest version, make sure to take the backup of the following items.

* Files and folders from the shared location, which you have mounted to the deployments by persistent volume claims (pvclaim_*.yaml).

* Database backup - Take a backup of Database, to restore incase if the upgrade was not successful or if applications are not working properly after the upgrade.


## Proceeding with upgrade
Bold Reports updates the database schema of your current version to the latest version. The upgrade process will retain all the resources and settings from the previous deployment.

You can download the upgrade script from this [link](https://raw.githubusercontent.com/boldreports/bold-reports-kubernetes/v4.1.78/upgrade/4-1_upgrade.sh) or use the below command.

```sh
curl -o upgrade.sh https://raw.githubusercontent.com/boldreports/bold-reports-kubernetes/v4.1.78/upgrade/4-1_upgrade.sh
```

Run the following command to execute the shell script to upgrade Bold Reports.

```sh
./upgrade.sh --version="4.1.78" --namespace="default"
```

<table>
<tr>
<td>
version
</td>
<td>
Image tag of the current version, which you are going to upgrade.
</td>
</tr>
<tr>
<td>
namespace (optional)
</td>
<td>
namespace in which your existing Bold Reports application was running. </br>
Default value: <i>default</i>
</td>
</tr>
</table>
36 changes: 36 additions & 0 deletions upgrade/4-1_upgrade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
# Copyright (c) Syncfusion Inc. All rights reserved.
#

while [ $# -gt 0 ]; do
case "$1" in
--version=*)
version="${1#*=}"
;;
--namespace=*)
namespace="${1#*=}"
;;
*)
esac
shift
done

[ -n "$version" ] || read -p 'Enter the version to upgrade: ' version

if [ -z "$version" ]
then
echo "Version is empty."
else
if [ -z "$namespace" ]
then
namespace="default"
fi

kubectl set image deployment/id-web-deployment id-web-container=gcr.io/boldreports/bold-identity:$version --namespace=$namespace --record
kubectl set image deployment/id-api-deployment id-api-container=gcr.io/boldreports/bold-idp-api:$version --namespace=$namespace --record
kubectl set image deployment/id-ums-deployment id-ums-container=gcr.io/boldreports/bold-ums:$version --namespace=$namespace --record
kubectl set image deployment/reports-web-deployment reports-web-container=gcr.io/boldreports/boldreports-server:$version --namespace=$namespace --record
kubectl set image deployment/reports-api-deployment reports-api-container=gcr.io/boldreports/boldreports-server-api:$version --namespace=$namespace --record
kubectl set image deployment/reports-jobs-deployment reports-jobs-container=gcr.io/boldreports/boldreports-server-jobs:$version --namespace=$namespace --record
kubectl set image deployment/reports-reportservice-deployment reports-reportservice-container=gcr.io/boldreports/boldreports-designer:$version --namespace=$namespace --record
fi

0 comments on commit 4f4e846

Please sign in to comment.