Rasa X is officially compatible with the following databases:
Oracle ≥ 11.0
By default, Rasa X uses PostgreSQL as a database. It can be configured to use an on-premise database or your own cloud provided database. Using Oracle as your Rasa X database instead of PostgreSQL also requires some additional setup (see below).
The default database started by the Rasa X Helm chart is PostgreSQL, which refers to the PostgreSQL subchart. See the page on configuring the subcharts to configure the default instance or to use an external Postgres instance.
Using Oracle as your Rasa X database instead of PostgreSQL requires some additional setup, which we’ll go over here.
In your Oracle database, create an empty database called
rasaand configure a user/password that has access to it. You can also use a database with a different name, as long as it is empty and you specify this in the
DB_DATABASEenvironment variable (read more in Adding Environment Variables).
Rasa X Configuration
Next you have to extend the Rasa X image to include the necessary drivers and clients. First download the Oracle Instant Client, rename it to
oracle.rpmand store it in the directory from where you’ll be building the Docker image.
Copy the following into a file called
Dockerfile:FROM rasa/rasa-x:1.1.0# Switch to root user to install packagesUSER rootRUN apt-get update -qq && apt-get install -y --no-install-recommends alien libaio1 && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*# Copy in oracle instaclient# [https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html)COPY oracle.rpm oracle.rpm# Install the Python wrapper library for the Oracle driversRUN pip install cx-Oracle# Install Oracle client librariesRUN alien -i oracle.rpmUSER 1001
Then build the Docker image:
docker build . -t rasa/rasa-x:1.1.0-oracle
Then push it to your private image registry.
You can now use this image instead of the standard one, by replacing it in your
values.yml:rasax:name: "<your-registry/your-extended-image>"tag: "<tag-for-extended-image>"
You will also have to disable installing Postgres and configure the following environment variables and a secret for the
Create the secret as follows:
And update the
values.yaml as follows:
Alternatively, you can also directly pass the database connection URL to the container, by defining the
DB_URL variable (this is not advised as it leaves the database password in plaintext):
The settings above do not set up Oracle as a tracker store. To use Oracle for the tracker store, please see the Rasa Open Source docs and configure the endpoints for your Rasa Open Source servers correctly.