Upgrade KubeOps Software

Upgrading KubeOps Software #

1.Remove old KubeOps software #

If you want to remove the KubeOps software, it is recommended that you use your package manager. For RHEL environments it is yum, while for opensuse environments it would be zypper. If you want to remove the KubeOps software with yum, use the following commands:

yum autoremove sina
yum autoremove lima

If you want to remove the KubeOps software with zypper, use the following commands:

zypper remove sina
zypper remove lima

2.Install new KubeOps software #

Now, you can install the new software with yum or zypper. You can find the new rpms at the following address:

yum install <sina-rpm>
zypper install <sina-rpm>

3.Maintain the old Deployment Information (optional) #

After upgrading SINA from 2.5 to 2.6, the deployment.yaml file has to be moved to the $KUBEOPSROOT directory, if it is desired to keep old deployments.
Be sure there you set the $KUBEOPSROOT variable.

  1. Set the $KUBEOPSROOT variable
echo 'export KUBEOPSROOT="$HOME/kubeops"' >> $HOME/.bashrc
source ~/.bashrc
  1. Create the needed directories
mkdir -p $KUBEOPSROOT/sina
mkdir -p $KUBEOPSROOT/plugins
  1. Copy the config.yaml, plugins and deployment.yaml
mv $HOME/.sina/deployment.yaml $KUBEOPSROOT/sina/deployment.yaml
  1. Change the plugin path in the config.yaml
apiversion: kubernative/sina/config/v2
spec:
  hub: https://hub.kubernative.net/v4/dispatcher/
  plugins: <kubeopsroot path>/plugins
  workspace: /tmp/sina/process/
  logging: info
  housekeeping: false

4.Update other softwares #

Upgrade rook-ceph #

For updating rook-ceph, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment       | Package                | PublicHub |
|------------------|------------------------|-----------|
| rook             | kubeops/rook-ceph:1.0.0| public    |

Next we update the rook-ceph deployment. For this we use the previous deploymentname rook.

With the following command we can update rook

Keep in mind that you have to use your desired version.

sina update --hub public --dname rook kubeops/rook-ceph:1.0.1 

Update harbor #

For updating harbor, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment       | Package                | PublicHub |
|------------------|------------------------|-----------|
| habor            | kubeops/habor:1.0.0    | public    |

Next we update the harbor deployment. For this we use the previous deploymentname habor.

With the following command we can update habor

Keep in mind that you have to use your desired version.

sina update --hub public --dname harbor kubeops/habor:1.0.1 

Update opensearch #

For updating opensearch, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment       | Package                            | PublicHub |
|------------------|------------------------------------|-----------|
| opensearch       | sina-opensearch-os:1.0.0           | public    |

Next we update the opensearch deployment. For this we use the previous deploymentname opensearch.

With the following command we can update opensearch

Keep in mind that you have to use your desired version.

sina update --hub public --dname opensearch kubeops/sina-opensearch-os:1.0.1 

Update opensearch-dashboards #

For updating opensearch-dashboards, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment                | Package                                   | PublicHub |
|---------------------------|-------------------------------------------|-----------|
| opensearch-dashboards     | sina-opensearch-dashboards:1.0.0          | public    |

Next we update the opensearch-dashboards deployment. For this we use the previous deploymentname opensearch-dashboards.

With the following command we can update opensearch-dashboards

Keep in mind that you have to use your desired version.

sina update --hub public --dname opensearch-dashboards kubeops/sina-opensearch-dashboards:1.0.1 

Update logstash #

For updating logstash, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment       | Package                            | PublicHub |
|------------------|------------------------------------|-----------|
| logstash         | kubeops/sina-logstash-os:1.0.0     | public    |

Next we update the logstash deployment. For this we use the previous deploymentname logstash.

With the following command we can update logstash

Keep in mind that you have to use your desired version.

sina update --hub public --dname logstash kubeops/sina-logstash-os:1.0.1 

Update filebeat #

For updating filebeat, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment       | Package                            | PublicHub |
|------------------|------------------------------------|-----------|
| filebeat         | kubeops/sina-filebeat-os:1.0.0     | public    |

Next we update the filebeat deployment. For this we use the previous deploymentname filebeat.

With the following command we can update filebeat

Keep in mind that you have to use your desired version.

sina update --hub public --dname filebeat kubeops/sina-filebeat-os:1.0.1 

Update prometheus #

For updating prometheus, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment         | Package                            | PublicHub |
|--------------------|------------------------------------|-----------|
| prometheus         | kubeops/sina-prometheus-os:1.0.0   | public    |

Next we update the prometheus deployment. For this we use the previous deploymentname prometheus.

With the following command we can update prometheus

Keep in mind that you have to use your desired version.

sina update --hub public --dname prometheus kubeops/sina-prometheus-os:1.0.1 

Update opa #

For updating opa, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment         | Package                            | PublicHub |
|--------------------|------------------------------------|-----------|
| opa                | kubeops/opa-gatekeeper:1.0.0       | public    |

Next we update the opa deployment. For this we use the previous deploymentname opa.

With the following command we can update opa

Keep in mind that you have to use your desired version.

sina update --hub public --dname opa kubeops/opa-gatekeeper:1.0.1 

5.Update essential KubeOps Packages #

Update kubeops setup #

For updating setup, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment         | Package                            | PublicHub |
|--------------------|------------------------------------|-----------|
| setup              | kubeops/setup:1.0.0                | public    |

Next we update the setup deployment. For this we use the previous deploymentname setup.

With the following command we can update setup

Keep in mind that you have to use your desired version.

sina update --hub public --dname setup kubeops/setup:1.0.1 

Update kubeops clustercreate #

For updating clustercreate, the name of the current deployment has to be determined first. In order to do this, the following command is entered in the console:

sina list

The output is similar to

[root@localhost ~]# sina list

 SINA version: 2.6.0
| Deployment         | Package                            | PublicHub |
|--------------------|------------------------------------|-----------|
| setup              | kubeops/clustercreate:1.0.0        | public    |

Next we update the clustercreate deployment. For this we use the previous deploymentname clustercreate.

With the following command we can update clustercreate

Keep in mind that you have to use your desired version.

sina update --hub public --dname clustercreate kubeops/clustercreate:1.0.1 
cp -r /var/kubeops/sina/config.yaml $KUBEOPSROOT/sina/config.yaml
cp -r /var/kubeops/plugins/* $KUBEOPSROOT/plugins