Tools

Version Matrix

SevOne Data Insight Version sevone-cli sevone-guii signature-tools
6.8.x 2.6.x 2.9.x <latest version> For example, 2.0.2
7.0.x 2.8.x 2.9.x <latest version> For example, 2.0.3
7.1.x 2.10.x 2.9.x <latest version> For example, 2.0.3
7.2.x 2.10.x 2.9.x <latest version> For example, 2.0.3

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

  1. 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
  2. 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
  3. 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
    
  4. Restart the client and API services.
    Important: 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.

  1. Using a text editor of your choice, edit /etc/sevone-guii/api.yaml file.
    vi /etc/sevone-guii/api.yaml
  2. 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
    
  3. Save /etc/sevone-guii/api.yaml file.
  4. Using a text editor of your choice, edit /SevOne.info file. Revert your SevOne Data Insight major / minor version to a prior / lower version.
    vi /SevOne.info
  5. 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

  1. 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.28.10+k3s1
    
  2. 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.28.10+k3s1
    sdi-node02   Ready    <none>                 2m25s   v1.28.10+k3s1
    sdi-node03   Ready    <none>                 2m45s   v1.28.10+k3s1
    
  3. 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-prometheus-node-exporter-xhpqw                        1/1     Running     3 (4h19m ago)   22h
    di-prometheus-node-exporter-fnz7s                        1/1     Running     3 (4h27m ago)   22h
    di-report-tombstone-sweeper-28458480-xdppc               1/1     Running     0               4h32m
    ingress-ingress-nginx-defaultbackend-69f644c9dc-zcg8f    1/1     Running     1 (4h19m ago)   4h32m
    ingress-ingress-nginx-controller-fddc9cd4-krrzk          1/1     Running     3 (4h19m ago)   22h
    di-kube-state-metrics-6f4fbc67cb-p4tz4                   1/1     Running     0               4h32m
    di-mysql-0                                               2/2     Running     0               4h17m
    di-create-secrets-r27jf                                  0/1     Completed   0               4h1m
    di-upgrade-lp8b4                                         0/1     Completed   0               4h
    datasource-operator-controller-manager-cc766849f-qkmp7   2/2     Running     0               4h
    di-djinn-api-67b78d684f-wt8ss                            1/1     Running     0               4h
    di-assetserver-c9b5fdd5d-wkcrr                           1/1     Running     0               4h
    di-registry-85c9f98499-d4r62                             1/1     Running     0               4h
    di-scheduler-74774dbdb8-hjv5l                            1/1     Running     0               4h
    di-wdkserver-d598fc4f9-5r8qh                             1/1     Running     0               4h
    di-migrator-7d8cdddd9-5gbrs                              1/1     Running     0               4h
    di-printer-8574f88978-ps9rq                              2/2     Running     0               4h
    di-prometheus-server-6c75b49944-mmc7c                    2/2     Running     0               4h
    di-ui-56599488fc-48jdt                                   1/1     Running     0               4h
    di-redis-master-0                                        2/2     Running     0               4h
    di-graphql-6b7cf4f6b-bpcst                               1/1     Running     0               4h
    di-apikey-rotation-28459020-pnlwc                        0/1     Completed   0               38m
    di-asset-sweeper-28459045-72c4x                          0/1     Completed   0               13m
    di-user-sync-28459045-5dh8w                              0/1     Completed   0               13m
    di-asset-sweeper-28459050-sqfk6                          0/1     Completed   0               8m14s
    di-user-sync-28459050-zsstz                              0/1     Completed   0               8m14s
    di-asset-sweeper-28459055-7pm78                          0/1     Completed   0               3m14s
    di-user-sync-28459055-r8zx9                              0/1     Completed   0               3m14s
    
  4. 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:  2024-10-23T11:16:32Z
      Generation:          1
      Resource Version:    4582
      UID:                 a16e4abe-c3d6-4407-9953-68c336da378c
    Spec:
      Encryption Key Secret:
        Key:    keys.json
        Name:   di-securitykeys
      Host:     10.49.13.65
      Poll:     30s
      Port:     443
      Secret:   datasource-di-1
      Timeout:  5s
    Status:
      API Version:  7.2.0
      Ip:           127.0.0.1
      Name:         SevOne Appliance
      Primary Ip:   127.0.0.1
      Service:      datasource-di-1
      Version:      7.2.0
    Events:         <none>
    
  5. 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.129.27.10
        Conditions:
          Ready:   true
        Hostname:  di-1
        NodeName:  <unset>
        Zone:      <unset>
    Events:        <none>
    
    Important: Conditions.Ready: true means that the NMS address(es) are eligible for load balancing.