Skip to content

Define a clean way to use odbc drivers and odbc.ini #345

@SamEdwardes

Description

@SamEdwardes

Description

The Workbench Helm chart provides a value for you to specify an odbc.ini file at config.sessionSecret.odbc.ini that gets mounted to /mnt/session-secret/odbc.ini. However, for users to actually use the connections defined here you also need to:

  • Set environment variable ODBCSYSINI=/mnt/session-secret
  • Mount the odbcinst.ini file to /mnt/session-secret/odbcinst.ini
  • Change the permissions of /mnt/session-secret so everyone can read it

For example, my values.yaml would look like this:

config:
  server:
    launcher-env: |
      ODBCSYSINI=/mnt/session-secret
  defaultMode:
    sessionSecret: 0444
  sessionSecret:
    odbc.ini: |
      [ProjectAbcDatabase]
      Database=project_abc
      Driver=PostgreSQL
      Password=password
      Port=5432
      Servername=database-postgresql
      UserName=posit_team
    odbcinst.ini: |
      [PostgreSQL]
      Driver = /opt/rstudio-drivers/postgresql/bin/lib/libpostgresqlodbc_sb64.so
      RStudioVersion = 2022.11.0
      Version = 1.4.54.1001
      Installer = RStudio Pro Drivers

Is there a more simple way this could be done? Could there be an option to specifically mount odbc.ini to /etc/odbc.ini which is the default location for this file?

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationteam: workbenchPosit Workbench related issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions