Link Search Menu Expand Document

Upgrade, redeploy, or uninstall Soda

Last modified on 30-Nov-23

Redeploy a Soda Agent
Upgrade a Soda Agent
Upgrade Soda Library
Uninstall Soda Library
Migrate from Soda Core

Redeploy a Soda Agent

The Soda Agent is a tool that empowers Soda Cloud users to securely access data sources to scan for data quality. Create a Kubernetes cluster in a cloud services provider environment, then use Helm to deploy a Soda Agent in the cluster. Read more.

When you delete the Soda Agent Helm chart from your cluster, you also delete all the agent resources on your cluster. However, if you wish to redeploy the previously-registered agent (use the same name), you need to specify the agent ID in your override values in your values YAML file.

  1. In Soda Cloud, navigate to your avatar > Data Sources > Agents tab.
  2. Click to select the agent you wish to redeploy, then copy the agent ID of the previously-registered agent from the URL.

    For example, in the following URL, the agent ID is the long UUID at the end. https://cloud.soda.io/agents/842feab3-snip-87eb-06d2813a72c1.

    Alternatively, if you use the base64 CLI tool, you can run the following command to obtain the agentID.
     kubectl get secret/soda-agent-id -n soda-agent --template={{.data.SODA_AGENT_ID}} | base64 --decode
    
  3. Open your values.yml file, then add the id key:value pair under agent, using the agent ID you copied from the URL as the value.
    soda:
      apikey:
         id: "***"
         secret: "***"
      agent:
         id: "842feab3-snip-87eb-06d2813a72c1"
         name: "myuniqueagent"
    
  4. To redeploy the agent, you need to provide the values for the API keys the agent uses to connect to Soda Cloud in the values YAML file. Access the values by running the following command, replacing the soda-agent values with your own details, then paste the values into your values YAML file.
    helm get values -n soda-agent soda-agent
    

    Alternatively, if you use the base64 CLI tool, you can run the following commands to obtain the API key and API secret, respectively.

    kubectl get secret/soda-agent-apikey -n soda-agent --template={{.data.SODA_API_KEY_ID}} | base64 --decode
    
    kubectl get secret/soda-agent-apikey -n soda-agent --template={{.data.SODA_API_KEY_SECRET}} | base64 --decode
    
  5. In the same directory in which the values.yml file exists, use the following command to install the Soda Agent helm chart.
    helm install soda-agent soda-agent/soda-agent \
      --values values.yml \
      --namespace soda-agent
    
  6. Validate the Soda Agent deployment by running the following command:
    kubectl describe pods
    

Upgrade a Soda Agent

The Soda Agent is a Helm chart that you deploy on a Kubernetes cluster and connect to your Soda Cloud account using API keys.

To take advantage of new or improved features and functionality in the Soda Agent, including new features in the Soda Library, you can upgrade your agent when a new version becomes available in ArtifactHub.io.

  1. If you regularly access multiple clusters, you must ensure that are first accessing the cluster which contains your deployed Soda Agent. Use the following command to determine which cluster you are accessing.
    kubectl config get-contexts
    

    If you must switch contexts to access a different cluster, copy the name of cluster you wish to use, then run the following command.

    kubectl config use-context <name of cluster>
    
  2. To upgrade the agent, you must know the values for:
    • namespace - the namespace you created, and into which you deployed the Soda Agent
    • release - the name of the instance of a helm chart that is running in your Kubernetes cluster
    • API keys - the values Soda Cloud created which you used to run the agent application in the cluster
      Access the first three values by running the following command.
      helm list
      

      Output:

      NAME      	NAMESPACE 	REVISION	UPDATED                             	STATUS	  CHART            	APP VERSION     
      soda-agent	soda-agent	5       	2023-01-20 11:55:49.387634 -0800 PST	deployed	soda-agent-0.8.26	Soda_Library_1.0.0
      
  3. Access the API key values by running the following command, replacing the placeholder values with your own details.
    helm get values -n <namespace> <release name>
    

    From the output above, the command to use is:

    helm get values -n soda-agent soda-agent 
    
  4. Use the following command to search ArifactHub for the most recent version of the Soda Agent Helm chart.
    helm search hub soda-agent
    
  5. Use the following command to upgrade the Helm repository.
    helm repo update
    
  6. Upgrade the Soda Agent Helm chart. The value for the chart argument can be a chart reference such as example/agent, a path to a chart directory, a packaged chart, or a URL. To upgrade the agent, Soda uses a chart reference: soda-agent/soda-agent.
    helm upgrade <release> <chart>
      --set soda.apikey.id=*** \
      --set soda.apikey.secret=**** 
    

    From the output above, the command to use is

    helm upgrade soda-agent soda-agent/soda-agent \
      --set soda.apikey.id=*** \
      --set soda.apikey.secret=**** 
    

    OR, if you use a values YAML file,

    helm upgrade soda-agent soda-agent/soda-agent \
    --values values-local.yml --namespace soda-agent
    

Upgrade Soda Library

To upgrade your existing Soda Library tool to the latest version, use the following command, replacing redshift with the install package that matches the type of data source you are using.

pip install -i https://pypi.cloud.soda.io soda-redshift -U

Uninstall Soda Library

  1. (Optional) From the command-line, run the following command to determine which Soda packages exist in your environment.
    pip freeze | grep soda
    
  2. (Optional) Run the following command to uninstall a specific Soda package from your environment.
    pip uninstall soda-postgres
    
  3. Run the following command to uninstall all Soda packages from your environment, completely.
    pip freeze | grep soda | xargs pip uninstall -y
    

Migrate from Soda Core

Soda Core, the free, open-source Python library and CLI tool upon which Soda Library is built, continues to exist as an OSS project in GitHub. To migrate from an existing Soda Core installation to Soda Library, simply uninstall the old and install the new from the command-line.

  1. Uninstall your existing Soda Core packages using the following command.
    pip freeze | grep soda | xargs pip uninstall -y
    
  2. Install a Soda Library package that corresponds to your data source. Your new package automatically comes with a 45-day free trial. Our Soda team will contact you with licensing options after the trial period.
    pip install -i https://pypi.cloud.soda.io soda-postgres
    
  3. If you had connected Soda Core to Soda Cloud, you do not need to change anything for Soda Library to work with your Soda Cloud account.
    If you had not connected Soda Core to Soda Cloud, you need to connect Soda Library to Soda Cloud. Soda Library requires API keys to validate licensing or trial status and run scans for data quality. See Configure Soda for instructions.
  4. You do not need to adjust your existing configuration.yml or checks.yml files which will continue to work as before.

Go further


Was this documentation helpful?

What could we do to improve this page?

Documentation always applies to the latest version of Soda products
Last modified on 30-Nov-23