Adding an Information Services datasource driver and template
This document describes the steps to add a new Information Services JDBC data source driver and template to the Spotfire environment.
Prerequisites
- You have created a Kubernetes persistent volume claim of the desired size.
Creating a persistent volume claim
If you have not created a persistent volume claim, you can do so with the following steps:
- Create a YAML file for the PVC, for example,
pvc.yaml
: - Apply the PVC configuration:
Driver deployment
See Installing database drivers for Information Designer ⧉ for additional information.
To make the JDBC driver available to the Spotfire server at <installation directory>/tomcat/custom-ext-informationservices
, follow these steps:
-
Deploy a BusyBox container with the persistent volume mounted on
/drivers
and copy the driver to the/drivers
folder. -
Run the following command, replacing
<NAMESPACE>
and<PERSISTENT-VOLUME-CLAIM-NAME>
with appropriate values:kubectl apply -f - << EOF apiVersion: v1 kind: Pod metadata: name: drivers-deployer namespace: <NAMESPACE> spec: volumes: - name: drivers-volume persistentVolumeClaim: claimName: <PERSISTENT-VOLUME-CLAIM-NAME> containers: - name: drivers-deployment image: busybox command: [ "top" ] volumeMounts: - mountPath: "/drivers" subPath: "drivers" name: drivers-volume EOF
-
Copy the driver file to the volume mount:
-
To make the driver available from the volume mount, install the Spotfire server chart with the following additional values file
custom-ext-information-services-drivers.yaml
.
For more information on volumes configuration, see the 'Volume for additional JDBC drivers'-section in the Readme for thespotfire-server
Helm chart.
Add a data source template to the Spotfire configuration
-
Refer to the spotfire community article JDBC Data Access Connectivity Details ⧉ to determine the correct data source template to add. Create an xml file with the template data. For example, for AWS Athena:
<DATA-SOURCE-NAME>-ds-template.xml
<jdbc-type-settings> <type-name>Amazon Athena JDBCv3</type-name> <driver>com.amazon.athena.jdbc.AthenaDriver</driver> <connection-url-pattern>jdbc:athena://athena.<Region>.amazonaws.com:443;S3OutputLocation=<S3 output bucket<;Region=<AWS_REGION></connection-url-pattern> <supports-catalogs>true</supports-catalogs> <supports-schemas>true</supports-schemas> <supports-procedures>false</supports-procedures> <always-use-prepared-statement>false</always-use-prepared-statement> </jdbc-type-settings>
-
Create a Kubernetes ConfigMap using the template file. Replace
<TEMPLATE-FILE-PATH>
and<DATA-SOURCE-NAME>
with appropriate values: -
Create a new values file and deploy the Spotfire chart with the additional values for Helm. This file uses the newly created ConfigMap as a data source template to add to the Spotfire configuration, and executes the configuration script to add the data source template to the Spotfire configuration. Replace
<DATA-SOURCE-TEMPLATE-NAME>
and<DATA-SOURCE-NAME>
with appropriate values.
For more information on configuration script execution, see the 'Configuration' section in the Readme for thespotfire-server
Helm chart. For theadd-ds-template
command, refer to the add-ds-template command-line reference ⧉.ds-template-configuration.yaml
Note:spotfire-server: configJob: extraVolumeMounts: - name: ds-template-config mountPath: /opt/spotfire/<DATA-SOURCE-NAME>config extraVolumes: - name: ds-template-config configMap: name: <DATA-SOURCE-NAME>-datasource-template configuration: configurationScripts: - name: configure-<DATA-SOURCE-NAME>-ds-template script: | add-ds-template --bootstrap-config=${BOOTSTRAP_FILE} --configuration=/opt/spotfire/configuration.xml --name="<DATA-SOURCE-TEMPLATE-NAME>" --enabled=true /opt/spotfire/<DATA-SOURCE-NAME>config/<DATA-SOURCE-NAME>-ds-template.xml
1. If you are deploying in an existing environment, you must also set the propertyconfiguration.apply="always"
. For more information on this, see the 'Managing configuration on helm upgrade or installation'-section section in the Readme for thespotfire-server
Helm chart. 2. The file name<DATA-SOURCE-NAME>-ds-template.xml
in theadd-ds-template
command must exactly match the name used during the creation of the ConfigMap.
Installation
#Helm install spotfire server with ds-template-configuration.yaml and custom-ext-information-services-drivers.yaml
helm install my-release --namespace <Namespace> ... -f custom-ext-information-services-drivers.yaml -f ds-template-configuration.yaml
spotfire-server
Helm chart.