Tools
Version Matrix
SevOne Data Insight Version | sevone-cli | sevone-guii | signature-tools |
---|---|---|---|
3.6.x | n/a | 1.1.0 | n/a |
3.7.x | n/a | 1.2.0 | n/a |
3.8.x | n/a | 2.0.0 | n/a |
3.9.x | n/a | 2.0.1 | n/a |
3.10.x | 1.0.0 | 2.1.0 | n/a |
3.11.x | 1.1.0 | 2.2.0 | n/a |
3.12.x | 2.0.0 | 2.3.0 | 1.0.0 |
3.13.x | 2.1.0 | 2.4.0 | 1.1.0 |
3.14.x | 2.2.0 | 2.5.0 | 1.2.0 |
6.5.x | 2.3.0 | 2.6.0 | <latest version> For example, 2.0.1 |
6.6.x | 2.4.0 | 2.7.0 | <latest version> For example, 2.0.1 |
SevOne CLI
sevone-cli tool provides convenience commands around common tasks such as setting up the GUI Installer or managing the Kubernetes cluster. It also provides wrappers around ansible playbooks.
Pod Commands
The CLI tool wraps some of the more complex commands but in some cases, it might be useful to run commands directly against a pod.
$ sevone-cli exec <pod_name> -- <cmd>
Example: Allows you to log into the MySQL pod
$ sevone-cli exec mysql -- mysql -uroot -pdatainsight datainsight
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
MySQL Commands
Instead of logging into the MySQL pod and running a command there, the mysql subcommand lets you run queries directly from your terminal.
$ sevone-cli mysql '<query>'
Example
$ sevone-cli mysql 'select count(*) from tenants'
+----------+
| count(*) |
+----------+
| 1 |
+----------+
Ansible Playbooks
Any playbook found under /opt/SevOne/upgrade/ansible/playbooks can be executed by simply providing its name, without a file extension.
$ sevone-cli playbook <name> [--extra-args]
Example: Run the up.yaml playbook, passing in args to the underlying ansible-playbook command
$ sevone-cli playbook up --tags apps
GUI Installer
Change Ports
-
Copy /etc/sevone-guii/client.yaml to /etc/sevone-guii/client.custom.yaml and /etc/sevone-guii/api.yaml to /etc/sevone-guii/api.custom.yaml.
$ cp /etc/sevone-guii/client.yaml /etc/sevone-guii/client.custom.yaml $ cp /etc/sevone-guii/api.yaml /etc/sevone-guii/api.custom.yaml
-
The following table lists the default port numbers and its respective config file location for the client and API.
Name Default Port Config File Location Client 3000 /etc/sevone-guii/client.custom.yaml API 3001 /etc/sevone-guii/api.custom.yaml -
If you need to change the port number, using a text editor of your choice, edit the .yaml file to change the setting and save the file.
Example: Change port number for Client
$ vi /etc/sevone-guii/client.custom.yaml main: port: 3000 # <-- change port number
Example: Change port number for API
$ vi /etc/sevone-guii/api.custom.yaml main: port: 3001 # <-- change port number
-
Restart the client and API services.
In case of any configuration changes, you need to restart both client and API services.$ sudo systemctl restart sevone-guii-@api $ sudo systemctl restart sevone-guii-@client
Retry Failed Stages
There are certain stages that cannot be retried when failed. This behavior can be bypassed by modifying that particular stage's retry field in /etc/sevone-guii/api.yaml file.
- Using a text editor of your choice, edit /etc/sevone-guii/api.yaml file.
$ vi /etc/sevone-guii/api.yaml
- For this example, assume that the Upgrade stage has failed. You will need to modify the retry field i.e., toggle it to true, for label: Upgrade in /etc/sevone-guii/api.yaml file.
- id: up.yaml label: Upgrade type: playbook order: 3 retry: true # <--- toggle this on
- Save /etc/sevone-guii/api.yaml file.
- Using a text editor of your choice, edit /SevOne.info file. Revert your SevOne Data Insight minor version to a prior / lower version.
$ vi /SevOne.info
- Refresh the web browser page. The stage's retry button should now be enabled.
Manage Services
The graphical user interface installer services can be started / stopped using the standard systemd commands.
$ sudo systemctl status sevone-guii-@api
$ sudo systemctl status sevone-guii-@client
$ sudo systemctl start sevone-guii-@api
$ sudo systemctl start sevone-guii-@client
$ sudo systemctl stop sevone-guii-@api
$ sudo systemctl stop sevone-guii-@client
View Logs
The logs can be viewed using journalctl.
$ journalctl -u sevone-guii-@api [-f]
$ journalctl -u sevone-guii-@client [-f]
Clear ARA Status
When running incremental upgrades, ARA (Ansible Run Analysis) status from the previous upgrade must be cleared. Execute the following command to clear the ARA status.
$ rm /etc/sevone-guii/ara/server/ansible.sqlite
$ sudo systemctl restart ara-server
Skip Stage(s)
While using the GUI Installer, you may skip certain stages by deleting its corresponding playbook. For example, if you want to skip the SOA Upgrade stage, you may execute the following command.
Example
$ rm -rf /opt/SevOne/upgrade/ansible/playbooks/soa.yaml
After successfully executing the command above, refresh the page. You will see that the SOA Upgrade stage is no longer rendered.
Useful 'kubectl' Commands
-
When provisioning of control plane node is complete via user interface, ensure that control plane node is correctly provisioned from CLI.
Example
$ ssh sevone@<SevOne Data Insight 'control plane' node IP address or hostname> $ kubectl get nodes NAME STATUS ROLES AGE VERSION sdi-node01 Ready control-plane,master 52d v1.26.1+k3s1
-
When the agent nodes have joined the Kubernetes cluster, execute the following command to confirm the same.
Example
$ ssh sevone@<SevOne Data Insight 'control plane' node IP address or hostname> $ kubectl get nodes NAME STATUS ROLES AGE VERSION sdi-node01 Ready control-plane,master 52d v1.26.1+k3s1 sdi-node02 Ready <none> 2m25s v1.26.1+k3s1 sdi-node03 Ready <none> 2m45s v1.26.1+k3s1
-
To check the status of the deployment, ensure that all the pods are in Running status.
Example
$ kubectl get pods NAME READY STATUS RESTARTS AGE di-create-secrets-1-ql58l 0/1 Completed 0 49d di-apikey-rotation-27566220-gqkgf 0/1 Completed 0 11h di-apikey-rotation-27567660-m7jgl 0/1 Completed 0 11h ingress-ingress-nginx-defaultbackend-69b955dccc-7vg8f 1/1 Running 2 (46m ago) 49d svclb-ingress-ingress-nginx-controller-5pcm7 2/2 Running 4 (46m ago) 49d di-minio-574b9fbcfd-gdfcg 1/1 Running 2 (46m ago) 49d di-redis-master-0 2/2 Running 4 (46m ago) 49d ingress-ingress-nginx-controller-65b4c868c-p2k9c 1/1 Running 2 (46m ago) 49d di-kube-state-metrics-587bd4dcfd-srngk 1/1 Running 2 (46m ago) 49d di-prometheus-node-exporter-szzbx 1/1 Running 2 (46m ago) 49d di-ui-5df466f448-568vt 1/1 Running 2 (46m ago) 49d di-printer-6b49c7974-hp5kj 1/1 Running 2 (46m ago) 49d di-wdkserver-d7b56d7ff-pjfk6 1/1 Running 2 (46m ago) 49d di-migrator-974cdf784-wcg2n 1/1 Running 2 (46m ago) 49d di-prometheus-server-54fbb54d9f-xjrd7 2/2 Running 4 (46m ago) 49d di-mysql-0 2/2 Running 4 (46m ago) 49d di-rabbitmq-0 1/1 Running 2 (46m ago) 49d di-scheduler-5b975c9659-x6xfr 1/1 Running 2 (46m ago) 49d di-graphql-bf7dc7bb8-s4hx9 1/1 Running 2 (46m ago) 49d datasource-operator-controller-manager-676fb7f697-kffb7 2/2 Running 7 (13m ago) 49d di-asset-sweeper-27571690-j67pq 0/1 Completed 0 11m di-user-sync-27571690-x84m4 0/1 Completed 0 11m di-asset-sweeper-27571695-jjmfl 0/1 Completed 0 6m39s di-user-sync-27571695-pjnbp 0/1 Completed 0 6m39s di-asset-sweeper-27571700-n4xtt 0/1 Completed 0 99s di-user-sync-27571700-52ztn 0/1 Completed 0 99s
-
The following command describes the SevOne NMS datasources and the configured peer's information such as, NMS version, SOA version, Primary / Secondary / Virtual IP address, etc.
Example
$ ssh sevone@<SevOne Data Insight 'control plane' node IP address or hostname> $ kubectl describe nms Name: di-1 Namespace: default Labels: <none> Annotations: <none> API Version: datasource.sevone.com/v1alpha1 Kind: NetworkManagementSystem Metadata: Creation Timestamp: 2022-05-12T18:44:26Z Generation: 1 Managed Fields: API Version: datasource.sevone.com/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:spec: .: f:encryptionKeySecret: .: f:key: f:name: f:host: f:poll: f:port: f:secret: f:timeout: Manager: unknown Operation: Update Time: 2022-05-12T18:44:26Z API Version: datasource.sevone.com/v1alpha1 Fields Type: FieldsV1 fieldsV1: f:status: .: f:apiVersion: f:ip: f:name: f:primaryIp: f:secondaryIp: f:service: f:version: f:virtualIp: Manager: manager Operation: Update Subresource: status Time: 2022-05-12T18:44:28Z Resource Version: 762647 UID: 2124c8fa-b117-4e6a-9368-df92cb2e3791 Spec: Encryption Key Secret: Key: keys.json Name: securitykeys Host: dev.sevone.com Poll: 30s Port: 443 Secret: datasource-di-1 Timeout: 5s Status: API Version: 2.20.0 Ip: 10.128.11.240 Name: dev Primary Ip: 10.128.11.113 Secondary Ip: 10.128.11.240 Service: datasource-di-1 Version: 6.1.0 Virtual Ip: <nil> Events: <none>
-
The following command describes the current state of load balancing.
$ ssh sevone@<SevOne Data Insight 'control plane' node IP address or hostname>
$ kubectl describe endpointslice $service
where, $service is the name of one of NMS's Status.Service returned from command kubectl describe nms above. For example, datasource-di-1.
Example
$ kubectl describe endpointslice datasource-di-1 Name: datasource-di-1 Namespace: default Labels: app=nms endpointslice.kubernetes.io/managed-by=NetworkManagementSystem kubernetes.io/service-name=datasource-di-1 nms_cr=datasource-di-1 Annotations: <none> AddressType: IPv4 Ports: Name Port Protocol ---- ---- -------- grpc 443 TCP Endpoints: - Addresses: 10.128.11.240 Conditions: Ready: true Hostname: dev NodeName: <unset> Zone: <unset> - Addresses: 10.128.10.164 Conditions: Ready: true Hostname: dev1 NodeName: <unset> Zone: <unset> Events: <none>
Conditions.Ready: true means that the NMS address(es) are eligible for load balancing.