5.2.2 upgrade to 5.3.0 documentation
If you have not installed the historical version of Rainbond, please refer to Quick Installation
new features
Cloud native application governance mode switch
Rainbond is committed to the concept of non-intrusive, loosely coupled application management.Loose coupling is reflected in many:
loose coupling between services
The core concept of microservices is that each service in the system can be independently developed, deployed, and upgraded independently, and each service is loosely coupled.The concept of cloud native application architecture is to further emphasize the loose coupling of the architecture and reduce the degree of interdependence between services.Rainbond's out-of-the-box service governance idea makes the applications deployed to the platform naturally form a microservice architecture.
Application and runtime environment are loosely coupled
Application development and packaging are independent and standardized, and are delivered to any operating environment through a standardized platform.Rainbond provides full-link support for application model development, publishing, sharing, and installation, serving application delivery scenarios.
Service governance capability and business logic decoupling
This is the focus of our new version. We have introduced the application-level governance mode switching function, which enables dynamic switching of service governance capabilities without business logic changes, and provides different governance capabilities for businesses.In the current version, we support direct switching between the built-in ServiceMesh governance mode and the Kubernetes native mode.With this system, user-defined governance models will be implemented in future versions, and mature ServiceMesh frameworks such as Istio and linkd will be introduced.
For detailed instructions, please refer to the document Application Governance Mode Switching
Component custom business monitoring and visualization
Rainbond hopes to provide developers with comprehensive monitoring capabilities for applications.The past versions mainly included dimensions such as resource monitoring, performance analysis, and status detection.This release provides developers with the ability to customize monitoring and visualization in the business dimension.Prometheus has successfully become the de facto specification in the field of cloud native monitoring. Rainbond supports developers to define monitoring indicators based on the Prometheus specification. After configuring monitoring points, Rainbond automatically discovers and collects monitoring data, and provides it to users for query and visualization.Users can use the plug-in to reflect the installation of the existing Exporter plug-in in the community to easily expand the business monitoring capabilities.
For detailed instructions, please refer to the document Business Custom Monitoring
New console and cluster installation
In order to further reduce the user's threshold for using Rainbond, in version 5.3, we decoupled the installation and operation of the console and the installation and operation of the cluster.Users only need a Docker run command to run the Rainbond console in any Docker environment.In the cluster installation dimension, Alibaba Cloud ACK has been added, connecting to existing Kubernetes clusters, and installing clusters from the host conveniently, helping users to quickly complete resource pooling.
For detailed instructions, please refer to the document Quick Installation
Application Configuration Group
Cloud-native applications are recommended to use environment variables for configuration management.Therefore, we often need to add the same configuration to multiple components of the same application.For example, multiple components in an application use the same Oracle database. We configure the connection information of the Oracle database through environment variables.Administration and configuration require a lot of duplication.With the help of the application configuration group, the configuration information can be managed at the application level in a unified manner, taking effect in batches, which greatly reduces the number of operations for developers.
For detailed usage reference document application configuration group
Other new features and changes
- Application component library supports version management and detail settings of application models
- Applied model offline export improvements with significantly reduced export file size (downward incompatibility).
- The offline import of application templates has been improved, and multiple application models can be imported in parallel.
- Support console data backup and migration
- Improved Oauth2.0 support, now supports Github, Gitlab, Gitee, DingTalk, Alibaba Cloud and other third-party authentication.
- Gateway supports session keeping load balancing algorithm
- Team view app list sorting improvements, sorting based on app activity activity
- Added application dimension resource occupancy statistics
- The application publishing process has been improved to support flexible editing of the number of published components during publishing.
- App upgrade support plugin
- Support for Java Maven configuration management
- Remove the rbd-repo component to reduce resource consumption
- Rainbond project switched to gomod management
- Rainbond console python version upgraded to 3.6
Console upgrade
To upgrade from v5.2.2-release to v5.3.0-release, you need to upgrade the console and the cluster respectively.The current chapter section describes the console upgrade steps.Video tutorials are provided throughout the process, see the end of the article for details.
database backup
Before upgrading the console, you need to back up and upgrade the database used by the console.By default, the operation needs to enter the rbd-db-0
database container environment to operate. If your Rainbond is connected to an external database, please backup and upgrade (sql) as appropriate.
- backup
# Log in to rbd-db-0 for data backup, the object is console region library
kubectl exec -ti rbd-db-0 -n rbd-system -- bash
mysqldump -uroot -p${MYSQL_ROOT_PASSWORD} --databases console > /var/lib /mysql/console.sql
mysqldump -uroot -p${MYSQL_ROOT_PASSWORD} --databases region > /var/lib/mysql/region.sql
# The backup file is located in the following location of the master node by default, if your cluster does not use the default nfs share storage, then you need to manually find the persistence path of
-db8 ls /opt/rainbond/data/db*/mysql/*.sql
- Upgrade the console library
# Log in to rbd-db-0 for operation
kubectl exec -ti rbd-db-0 -n rbd-system -- bash
curl https://gitee.com/rainbond/rainbond-console/raw/V5.3/sql /5.2.2-5.3.0.sql -o /5.2.2-5.3.0.sql
mysql -uroot -p${MYSQL_ROOT_PASSWORD} -Dconsole -e 'source /5.2.2-5.3.0.sql'
Install the new version of the console
Install Apps from Open Source App Stores Rainbond - Open Source
Register the console database originally used by the cluster in the deployed Rainbond-Open Source application in the form of a third-party component, fill in the static registration address:
rbd-db-rw.rbd-system:3306
, add the required connection information Environment variable, replacingMysql5.7
databases in Rainbond-Open Source.Database If your Rainbond is connected to an external database, please add the corresponding environment variables directly for theRainbond-console
andcluster installation driver service
that depend on the database.After the replacement of the database is complete, update the two service components described above.The specific environment variables added are shown in the following table:
Connection information environment variable name | environment variable value |
---|---|
DB_TYPE | mysql |
MYSQL_DB | console |
MYSQL_USER | root |
MYSQL_PASS | <查询 rbd-db-0 容器中 ${MYSQL_ROOT_PASSWORD} 值> |
- Change the cluster API address to the gateway IP. If your cluster has multiple gateways, please fill in the VIP or load balancer address.
Process the original console
The original console refers to the rbd-app-ui-xxxxxxxxx-xxxx
pods created by default in the rbd-system
namespace during installation, as well as the rbdcomponents, deployment and other resources involved in maintaining these pods.Since it involves the replacement of new and old resources, it is strongly recommended to perform the operation steps of the original console after the subsequent cluster-side upgrade operation.
By editing the rbdcomponents resource customized by Rainbond, the following configuration can be performed for the original console to complete the upgrade action:
- Mirror address use
registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:v5.3.0-release-allinone
- Add environment variable DB_TYPE=mysql
- Add new pvc mount
All changes are made in spec
paragraph:
kubectl edit rbdcomponents.rainbond.io rbd-app-ui -n rbd-system
spec:
env:
- name: DB_TYPE
value: mysql
volumeMounts:
- mountPath: /root/.ssh
name: app
subPath : ssh
image: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:v5.3.0-release-allinone
imagePullPolicy: IfNotPresent
priorityComponent: false
replicas: 1
resources: {}
After installing the Rainbond-Open Source console in the cluster, the original console can exist as an operation and maintenance backdoor. It is only enabled when the Rainbond-Open Source fault cannot be accessed. Usually, you can set
replicas
to 0 to close it. pod , to achieve the purpose of saving resources.
Cluster side upgrade
To upgrade from v5.2.2-release to v5.3.0-release, you need to upgrade the console and the cluster respectively.The current chapter describes the cluster-side upgrade steps.Video tutorials are provided throughout the process, see the end of the article for details.
Update Rainbond CRD resources
# Load CRD configuration file
kubectl apply -f https://raw.githubusercontent.com/goodrain/cloud-adaptor/main/chart/crds/monitoring.coreos.com_servicemonitors.yaml
Update the rainbond-operator component
# delete the old rainbond-operator statefulset
kubectl delete sts rainbond-operator -n rbd-system
# create a new rainbond-operator deployment
kubectl apply -f https://raw.githubusercontent.com/goodrain/cloud-adaptor/ main/hack/deployment.yaml
Update build private server components
# Delete rbdcomponent
of rbd-repo kubectl delete rbdcomponents.rainbond.io rbd-repo -n rbd-system
# Create new component rbd-resource-proxy
kubectl apply -f https://raw.githubusercontent.com/goodrain/ cloud-adaptor/main/hack/rbd-resource-proxy.yaml
Upgrading the cluster mirror
# Extract rbdcomponent resources to file
kubectl get rbdcomponents.rainbond.io -n rbd-system -o yaml > rbdcomponent.yaml
# Modify tag in this file
sed -i "s/v5.2.2-release/v5. 3.0-release/g" rbdcomponent.yaml
# Load configuration
kubectl apply -f rbdcomponent.yaml
Update other functional images
# Login
function Login_registry(){
inner_registry=$(kubectl get rainbondcluster -n rbd-system -o yaml | grep domain | awk '{print $2}')
registry_user=$(kubectl get rainbondcluster -n rbd-system -o yaml | grep username | awk '{print $2}')
registry_pass=$(kubectl get rainbondcluster -n rbd-system -o yaml | grep password | awk '{print $2}')
docker login --username ${registry_user} --password ${registry_pass} ${inner_registry}
}
# pull Mirror and replace, push
function Other_images(){
from_registory=registry.cn-hangzhou.aliyuncs.com/goodrain
to_registory=goodrain.me
for image in builder runner rbd-init-probe rbd-mesh-data-panel
do
docker pull $from_registory/$image:v5.3.0-release
docker tag $from_registory/$image:v5.3.0-release $to_registory/$image
docker push $to_registory/$image
done
}
# start update
Login_registry && Other_images
Update grctl command
# Download command and replace old version command
docker run -it --rm -v /:/rootfs registry.cn-hangzhou.aliyuncs.com/goodrain/rbd-grctl:v5.3.0-release copy
mv /usr/local /bin/rainbond-grctl /usr/local/bin/grctl && grctl install
Create Maven source build default configuration (optional)
This step is used to create a default settings.xml configuration required for building the java maven source code. In most scenarios, it is used to declare the private server address, user name, password and other information within the enterprise.When you do not need to customize, Rainbond will generate the Alibaba Cloud private server address by default.Therefore, this step is optional.
grctl build maven-setting add --file <absolute path of user-defined settings.xml file>
rebuild the plugin
Enter the plug-in management page, click Build on the respective management pages of the export network management plug-in
and service integrated network management plug-in
to update it.For the service components that have installed the above plugins, you need to reinstall the plugins to make them take effect after building the plugins.
Backup latest console
Upgrade verification
- Observe whether the platform version is
v5.3.0-release
in the Enterprise Information column on the overview page - On the cluster page, check whether the platform version of the connected cluster is
v5.3.0-release
- Check
rbd-api
rbd-chaos
rbd-eventlog
rbd-gateway
rbd-monitor
rbd-mq
rbd-node
rbd-webcli
rbd-worker
Service, whether the tag of the image it uses isv5.3.0-release
- Try to build the java maven project from source and verify that the
rbd-resource-proxy
service is working properly - Follow the
New Features
chapter, try the new features one by one, and verify if they work properly
Offline upgrade
Currently Rainbond v5.3.0-release does not provide offline upgrade packages.However, all resources in the upgrade process, including configuration files and images, can be processed offline.Users can download and localize these resources by themselves, and import them into the offline Rainbond v5.2.2-release environment for upgrade operations.
Note that:
- It is not necessary to install the Rainbond-Open Source console for the offline environment, just refer to the documentation to process the original console
- To add environment variable
DISABLE_DEFAULT_APP_MARKET = true
for console component.This variable is used to avoid frequent requests from the console to the open source app store in an offline environment - When preparing for offline mirroring, do not omit the mirrors corresponding to
rainbond-operator
andrbd-resource-proxy
The mirror addresses are defined in thedeployment.yaml
configuration file that starts them
video tutorial
Haoyu Technology officially conducted an online live broadcast on March 11, 2021. It taught the whole process upgrading from5.2.2-release to 5.3.0-release, and provided playback. Users can click the link to go online. Watch this video.
The video resources are hosted on the B station, you are welcome to jump to the B station to send a barrage to complain