Hello, Chris.
As of version 3.6.0-dev.1 of LEAFctl and the LEAF ServiceRegistry, you can perform the following to deploy a PostgreSQL data store and a ServiceRegistry configured to use it. Note that the following instructions are not intended for a production environment.
- Begin by ensuring your version of LEAFctl is
3.6.0-dev.1. Runleafctlto see the version printed.> leafctl LEAFctl Version: 3.6.0-dev.1 <-- Make sure the version is this or later - Deploy PostgreSQL as you normally would.
leafctl deploy postgresql - Create a new
values.yamlfile to contain our PostgreSQL configuration in.
a. The contents of thevalues.yamlwould look something like:leaf-service: selector: dataServiceType: sql sql: connectionDriverClass: org.postgresql.Driver connectionUrl: jdbc:postgresql://postgresql.postgresql.svc.cluster.local/postgres connectionUsername: postgres connectionPassword: cG9zdGdyZXM= dialect: com.leidos.leaf.dataobject.service.dao.sql.dialect.LeafPostgresDialect virtualService: | hosts: - "*" gateways: - istio-system/istio-ingressgateway http: - match: - uri: prefix: /service-registry/ rewrite: uri: / route: - destination: host: service-registry # Plus any other configuration you'd like to apply to the ServiceRegistry - Deploy the ServiceRegistry with LEAFctl using the
values.yamlabove.leafctl deploy service-registry -f <path-to-values-yaml>
That should deploy the LEAF ServiceRegistry with the configuration it needs to use PostgreSQL as its data store.
Additional Notes
- The
3.6.0-dev.1image of the LEAF ServiceRegistry should be backwards compatible with generated services back to3.3.0. However, we tested and found that even generated services on3.2.0could be registered with this latest ServiceRegistry. Since that is the case, there are no plans at this moment to port this feature back to older versions of the ServiceRegistry. If you encounter any problems with backwards compatibility, reach out and we can try to address them.