sophora-importer
A Helm chart for the Sophora importer
About this chart
Sophora Importer for Sophora 4+
Extra env variables
Additional environment variables are supported via sophora.importer.extraEnv. The variables have to be defined in kubernetes env format.
Importer without s3 bucket
If you don't need a s3 bucket for incoming Sophora documents, you can omit the configuration of sophora.importer.s3Bucket.name. This might be useful,
if you only need the SOAP api. The following directories can be referenced in your application.yaml:
- success: /import//success
- temp: /import//temp
- failure: /import//failure
- watch: /import//incoming
Importer directory paths
On startup, the Sophora Importer assumes that all directories you defined in your application.yaml under importer.instances[].folders already exist.
These directories will be created automatically by Helm for all paths that don't start with s3://.
All paths starting with /import-local/ are persisted and contained data will be kept after a restart.
Use s3:// for folders that should be saved in an S3 bucket as configured with sophora.importer.s3Bucket configuration options.
Import transformation files via S3 or HTTP
Activate transformations with by setting transformation.enabled to true. Now you can reference one or more zip files via s3 or http
download (use transformation.data.use to set your preferred method. Defaults to s3).
By default, all xsl files should be located in xsl and all lib files in libs inside the .zip file.
All possible configurations are available in values.yaml. Enabling transformations will create
the following directories, that can be accessed within the importer configuration:
/sophora/additionalLibs/sophora/xsl
Simple Example
transformation:
enabled: true
data:
zipViaS3:
enabled: true
secretName: "read-only-bucket-secret"
bucketName: "bucket-with-transformations"
zipPaths:
- "/transformation-data.zip"
Saxon
Oftentimes you want to use Saxon for your transformations. This is quite easy. Set transformation.data.useSaxon to true,
transformation.xslTransformerFactory to net.sf.saxon.TransformerFactoryImpl and provide a Saxon licence file
via Kubernetes secret (see next subsection). Provide the Saxon jar file as described in Import transformation files via S3 or HTTP above.
Advanced example with Saxon
transformation:
enabled: true
xslTransformerFactory:
data:
zipViaS3:
enabled: true
secretName: "read-only-bucket-secret"
bucketName: "bucket-with-transformations"
zipPaths:
- "/transformation-data.zip"
useSaxon: true
saxonLicenceSecretName: "saxon-license"
saxonLicenceSecretKey: "saxon-license.lic"
Extra Deploy
Sometimes you may want to deploy extra objects alongside your importer, such as a Secret containing basicAuth configuration for your ingress. To cover these cases, the chart allows adding the full kubernetes resource specification of other objects using the extraDeploy parameter. Creating a Secret for the ingress with basic auth case is shown in this example.
extraDeploy:
- |
apiVersion: v1
data:
auth: Zm9vOiRhcHIxJE9GRzNYeWJwJGNrTDBGSERBa29YWUlsSDkuY3lzVDAK
kind: Secret
metadata:
name: basic-auth
namespace: default
type: Opaque
Deploy sophora-importer with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has sophora-importer on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartsophora-importer is pinned at v2.13.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply