Upgrading to the commercial version
Categories:
This page provides a comprehensive guide on upgrading the cluster optimizer to the commercial version.
Preconditions
- The community version of the Cluster Optimizer has been successfully deployed. For detailed installation instructions, please refer to [Installation via Kubectl] (/docs/setup/setup-using-kubectl/) or [Installation via Helm] (/docs/setup/setup-using-helm/).
Configure user database
-
If the Cluster Optimizer is deployed using
kubectl
, you can modify the ConfigMapoptimizer-conf
within the Cluster Optimizer configuration file located at~/setup/cluster-optimizer/yaml/optimizer.yaml
to include the following configuration items.user: dataSource: name: "root:optimizer@tcp(optimizer-mysql:3306)/user?createDatabaseIfNotExist=true&charset=utf8mb4&parseTime=true&loc=Local" maxOpenConns: 10
-
If the Cluster Optimizer is deployed using
helm
, you can modify thehelm
’svalues.yaml
file to include the following configuration items.optimizedb: user: schema: user port: "3306" user: root password: optimizer maxOpenConns: 10
Note: For instructions on utilizing a deployed database, please refer to the section Using a Deployed Database.
Configure license
Overview
There are two methods to obtain a license:
- Online subscription.
- License acquisition via email.
The recommended approach is online subscription
.
Online subscription
-
Visit the subscription page of Cluster Optimizer.
-
Login in to the subscription page.
-
Select the subscription type, enter the number of nodes and complete the payment.
-
After a successful, visit the Portal to manage subscription.
-
Navigate to the
Access Key
page in the [Portal] and clickGenerate
button to create an access key. -
Configure the
accessKeyId
andaccessKeySecret
.-
If the Cluster Optimizer is deployed using
kubectl
, you can modify ConfigMapoptimizer-conf
in the Cluster Optimizer configuration file~/setup/cluster-optimizer/yaml/optimizer.yaml
to include the following configuration items.license: accessKeyId: {accessKeyId generated in above step} accessKeySecret: {accessKeySecret generated in above step}
-
If the Cluster Optimizer is deployed using
helm
, you can modifyhelm
’svalues.yaml
file to include the following configuration items.license: accessKeyId: {accessKeyId generated in above step} accessKeySecret: {accessKeySecret generated in above step}
-
-
Redeploy
optimizer
Deployment
.-
If the Cluster Optimizer is deployed using
kubectl
, execute the following command:kubectl apply -f ~/setup/cluster-optimizer/yaml/optimizer.yaml
-
If the cCluster Optimizer is deployed using
helm
, execute the following command:helm upgrade demo cluster-optimizer/cluster-optimizer -f values.yaml --namespace wiseinf-system
-
-
Review the log output and verify that the pod status for the
optimizer
deployment isRunning
.
License acquisition via email
-
You can obtain a license by contacting us via email at Contact Us. After your payment, the license information, including a
certificate
and asignature
, will be sent to your email.” ``` -
Configure the
certificate
andsignature
.-
If the Cluster Optimizer is deployed using
kubectl
, you can modify ConfigMapoptimizer-conf
in the Cluster Optimizer configuration file~/setup/cluster-optimizer/yaml/optimizer.yaml
to include the following configuration items.license: certificate: {signature from above step} signature: {signature from above step}
-
If the Cluster Optimizer is deployed using
helm
, you can modifyhelm
’svalues.yaml
file to include the following configuration items.license: certificate: {signature from above step} signature: {signature from above step}
-
-
Redeploy
optimizer
Deployment
.-
If the Cluster Optimizer is deployed using
kubectl
, execute the following command:kubectl apply -f ~/setup/cluster-optimizer/yaml/optimizer.yaml
-
If the Cluster Optimizer is deployed using
helm
, execute the following command:helm upgrade demo cluster-optimizer/cluster-optimizer -f values.yaml --namespace wiseinf-system
-
-
Review the log output and verify that the pod status for the
optimizer
deployment isRunning
.
System initialization
- Open your browser and navigate to
http://localhost:8000/init
to access the initialization page for the commercial version. Enter your username, password, email, mobile number, and other required information, then click theOK
button to complete the system initialization. - Go to
http://localhost:8000/user/login
, and log in with your username and password. - Your system has now been successfully upgraded to the commercial version.
Using a deployed database
If you want to use the deployed user database with a new username and password for accessing from the Cluster Optimizer, follow these steps:
-
Open your command line interface and use the
mysql
command to connect to the MySQL database. Replace127.0.0.1
with your actual MySQL database host address.mysql -h127.0.0.1 -uroot
Note: Ensure that the database is accessible from the Kubernetes cluster if you are using a remote database.
-
Create the
user
database schema.mysql> source ~/setup/cluster-optimizer/sql/create_user_database.sql
Note: This script will delete the existing user database if it exists and create a new one. Proceed with caution to avoid data loss.
-
Create a new username and password, and assign the appropriate permissions. The default username and password in the script are
optimizer
andOptimizer~
, respectively. Adjust these as needed.mysql> source ~/setup/cluster-optimizer/sql/create_user_user.sql
-
Update the Cluster Optimizer configuration file with the new database details.
-
If the Cluster Optimizer is deployed using
kubectl
, edit theoptimizer-conf
ConfigMap within~/setup/cluster-optimizer/yaml/optimizer.yaml
, and modify thedataSource.name
value under the user configuration item with the new username, password, database address, and port. -
If the Cluster Optimizer is deployed using
helm
, edit thevalues.yaml
file and modify thedataSource.name
value under the user configuration item with the new username, password, database address, and port.optimizedb: user: dbHost: 127.0.0.1 # Database address for configuration schema schema: optconf # Database schema for configuration port: 3306 # Database port user: optimizer # Username for database access password: Optimizer~ # Password for database access
-
-
Restart the application and review the log output of Cluster Optimizer to verify that the database configuration matches your expectations.
{ ... "user": { "dataSource": { "name": "optimizer:Optimizer~@tcp(127.0.0.1:3306)/optconf?createDatabaseIfNotExist=true\u0026charset=utf8mb4\u0026parseTime=true\u0026loc=Local", "maxOpenConns": 10 } }, ... }
Additionally, check for any database-related errors in the logs. The absence of errors indicates that the new database configuration is successfully applied.
Next step: Import the cluster
Next, you can add a cluster and review its associated optimization recommendations. For more details, refer to: