Skip to main content
Version: Current (3.x)

Data Viz API Upgrade Guide From 2.0 to 3.0

This guide will help you upgrade the Data Viz API from 2.0 to 3.0.

Changes​

1. Data Viz API​

  • The Data Viz API is now a standalone project and it is highly recommended to use the Docker image to run the Data Viz API rather than using submodules.
  • We have migrated from Zuul to Spring Cloud Gateway.
  • We have added superset proxy module to use it as a connection to Data Viz and superset.
  • You can upgrade the Data Viz API by running the following command:
git rm services/api-commons
  • Upgrade Your docker compose file to use the new Data Viz Modules images.

Commons​

  • This is how to use the api-commons library in your project.
  1. In your services/pom.xml file, do the following changes:
  • Add the DG artifact repository while maintaining the Maven Central repository to your pom.xml file:
services/pom.xml
    <repositories>
<repository>
<id>central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

<repository>
<id>data-viz-release-local</id>
<name>data-viz-release-local</name>
<url>https://artifactory.dgdev.org/artifactory/data-viz-release-local/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
  • Replace the old parent pom with the new one:
services/pom.xml
 <parent>
<groupId>org.devgateway.viz.api</groupId>
<artifactId>parent</artifactId>
<!-- Use the latest version of the parent pom -->
<version>0.0.9</version>
</parent>
  • Import the new commons library in your services:
services/example-service/pom.xml
<dependencies>
<dependency>
<groupId>org.devgateway.viz.api</groupId>
<artifactId>commons</artifactId>
<!-- Use the latest version of the commons library -->
<version>0.0.13</version>
</dependency>
</dependencies>

  • If any of your services (micro-services) are using the api-commons library, you need to replace it with the new one.

API Registry (Eureka)​

  • This is how to use the API Registry in the Data Viz API.
docker-compose.yml
  data-viz-api-registry:
image: registry.developmentgateway.org/data-viz/registry:latest

API Gateway (Spring Cloud Gateway)​

  • This is how to use the API Gateway in the Data Viz API.
docker-compose.yml
  api-gateway:
image: registry.developmentgateway.org/data-viz/api-gateway:latest

API Security​

docker-compose.yml
  api-security:
image: registry.developmentgateway.org/data-viz/api-security:latest

Superset Proxy​

  • This is how to use the Superset Proxy in the Data Viz API.
docker-compose.yml
  superset-proxy:
image: registry.developmentgateway.org/data-viz/superset-proxy:latest