Upgrading to the commercial version

Describes detailed instructions on upgrading the cluster optimizer to the commercial version.

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 ConfigMap optimizer-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 the helm’s values.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:

  1. Online subscription.
  2. License acquisition via email.

The recommended approach is online subscription.

Online subscription

  1. Visit the subscription page of Cluster Optimizer.

  2. Login in to the subscription page.

  3. Select the subscription type, enter the number of nodes and complete the payment.

  4. After a successful, visit the Portal to manage subscription.

  5. Navigate to the Access Key page in the [Portal] and click Generate button to create an access key.

  6. Configure the accessKeyId and accessKeySecret.

    1. 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}
      
    2. If the Cluster Optimizer is deployed using helm, you can modify helm’s values.yaml file to include the following configuration items.

      license:
          accessKeyId:  {accessKeyId generated in above step}
          accessKeySecret: {accessKeySecret generated in above step}
      
  7. Redeploy optimizer Deployment.

    1. If the Cluster Optimizer is deployed using kubectl, execute the following command:

          kubectl apply -f ~/setup/cluster-optimizer/yaml/optimizer.yaml
      
    2. 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
      
  8. Review the log output and verify that the pod status for the optimizer deployment is Running.

License acquisition via email

  1. You can obtain a license by contacting us via email at Contact Us. After your payment, the license information, including a certificate and a signature, will be sent to your email.” ```

  2. Configure the certificate and signature.

    1. 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}
      
    2. If the Cluster Optimizer is deployed using helm, you can modify helm’s values.yaml file to include the following configuration items.

      license:
          certificate:  {signature from above step}
          signature: {signature from above step}
      
  3. Redeploy optimizer Deployment.

    1. If the Cluster Optimizer is deployed using kubectl, execute the following command:

          kubectl apply -f ~/setup/cluster-optimizer/yaml/optimizer.yaml
      
    2. 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
      
  4. Review the log output and verify that the pod status for the optimizer deployment is Running.

System initialization

  1. 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 the OK button to complete the system initialization.
  2. Go to http://localhost:8000/user/login, and log in with your username and password.
  3. 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:

  1. Open your command line interface and use the mysql command to connect to the MySQL database. Replace 127.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.

  2. 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.

  3. Create a new username and password, and assign the appropriate permissions. The default username and password in the script are optimizer and Optimizer~, respectively. Adjust these as needed.

        mysql> source ~/setup/cluster-optimizer/sql/create_user_user.sql
    
  4. Update the Cluster Optimizer configuration file with the new database details.

    1. If the Cluster Optimizer is deployed using kubectl, edit the optimizer-conf ConfigMap within ~/setup/cluster-optimizer/yaml/optimizer.yaml, and modify the dataSource.name value under the user configuration item with the new username, password, database address, and port.

    2. If the Cluster Optimizer is deployed using helm, edit the values.yaml file and modify the dataSource.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
      
  5. 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: