Upgrade Guides

GoodData.CN Community Edition

From version 1.2.0, it’s recommended to store metadata from your GoodData.CN Community Edition (CE) installation in a docker volume. Alternatively, you may store the metadata elsewhere. How you upgrade your environment depends on where you store your metadata:

  • If you are using a docker volume to store metadata from your GoodData.CN CE container, download a new version of the GoodData.CN CE docker image and start it with your volume. All your metadata will be migrated.
  • If you are not using a docker volume to store metadata from your GoodData.CN container, follow the version specific and general upgrade guides. You must back up your metadata if you want to migrate it to the newer version.

GoodData.CN Community Edition Version Specific Upgrade Guides

Upgrading to a new minor version is supported only from the previous minor version. To upgrade over several minor versions, follow the upgrade path for each minor version separately.

General Upgrade Guide

After any version specific upgrades are complete, you may complete the general upgrade steps for GoodData.CN Community Edition.

Preparation

Follow these steps:

  1. Set the environment variables.
    • If you used the demo environment from the GoodData.CN Community Edition image, use the following values:
        export ENDPOINT=http://localhost:3000
        export API_TOKEN=YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz
      
    • If you set up your own environment, use the values specific to your environment.
  2. Install a JSON command-line processor (for example, “jq”).

Back Up the Current Working Environment

If you want to start with a new environment after the upgrade, you can back up the metadata for specific portions of GoodData.CN Community Edition (for example, only data sources or users). This is optional.

Back Up the Data Sources

Back up the data sources from your current GoodData.CN Community Edition working environment if you want to also back up and then restore the physical data model.

Execute the following statement to save all the data sources as files named data-source_<id>.json in the /tmp directory:

for i in $(
  curl -s -H "Authorization: Bearer $API_TOKEN" \
    -X GET "$ENDPOINT/api/entities/dataSources" | \
    jq -r '.data[].id'
); do
  echo "Exporting Data Source $i"
  curl -s -H "Authorization: Bearer $API_TOKEN" \
    -X GET $ENDPOINT/api/entities/dataSources/$i \
  > /tmp/data-source_$i.json
done

Back Up the Physical Data Model

Back up the physical data model from your current GoodData.CN Community Edition working environment if you want to reuse the physical data model instead of building it again.

Execute the following statement to save all the physical data models as files named pdm_<id>.json in the /tmp directory:

for i in $(
  curl -s -H "Authorization: Bearer $API_TOKEN" \
    -X GET "$ENDPOINT/api/entities/dataSources" | \
    jq -r '.data[].id'
); do
  echo "Exporting PDM of Data Source $i"
  curl -s -H "Authorization: Bearer $API_TOKEN" \
    -X GET $ENDPOINT/api/layout/dataSources/$i/physicalModel \
  > /tmp/pdm_$i.json
done

Back Up the Logical Data Models and the Analytical Models of All Workspaces

Back up the logical data models and the analytical models in all of the workspaces from your current GoodData.CN Community Edition working environment if you want to reuse these models instead of building them again.

Execute the following statement to save all the logical data models and analytical models of all of your workspaces as a file named all-workspaces.json in the /tmp directory:

curl -X GET $ENDPOINT/api/layout/workspaces \
  -H "Authorization: Bearer $API_TOKEN" \
  > /tmp/all-workspaces.json

Back Up the Users and User Groups

The default admin group, the admin user, and the demo user will automatically be created when you start the new GoodData.CN Community Edition image.

Upgrade Your GoodData.CN Community Edition Image

Follow these steps:

  1. Stop your current GoodData.CN Community Edition (CE) image.
  2. Download the latest GoodData.CN CE image from hub.docker.com .
  3. Start the new GoodData.CN CE image as usual.

Restore Your Previous Working Environment

If you backed up any of the metadata from your previous GoodData.CN Community Edition environment, you can restore that data.

Restore the Data Sources

Follow these steps

  1. Prepare the credentials to your database because you will be prompted to enter them.
  2. Execute the following statement to restore the data sources from the files named data-source_<id>.json in the /tmp directory:
for i in /tmp/data-source_*.json ; do
  ds_name=$(basename $i .json)
  echo "Processing $ds_name"
  DB_PASSWORD=$(bash -c 'read -s -p "Enter password: " X; echo $X')
  echo "Updating password in DataSource $ds_name"
  jq ".data.attributes.password = \"$DB_PASSWORD\"" < $i | \
  curl -X POST $ENDPOINT/api/entities/dataSources \
    -H "Content-Type:application/vnd.gooddata.api+json" \
    -H "Authorization: Bearer $API_TOKEN" \
    -d @-
done

Restore the Physical Data Model

Execute the following statement to restore all the physical data models from the files named pdm_<id>.json in the /tmp directory:

for i in /tmp/data-source_*.json; do
  id=$(jq -r '.data.id' < $i)
  echo "Restoring PDM of DataSource $id"
  cat /tmp/pdm_${id}.json | jq '.pdm.tables[] += {"type": "VIEW"}' | \
  curl -X PUT $ENDPOINT/api/layout/dataSources/$id/physicalModel \
    -H "Content-Type:application/json" \
    -H "Authorization: Bearer $API_TOKEN" \
    -d @-
done

Restore the Logical Data Model and Analytical Model

Execute the following statement to restore the logical data models and analytical models of all your workspaces from the file named all-workspaces.json in the /tmp directory:

curl -X PUT $ENDPOINT/api/layout/workspaces \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type:application/json" \
  -d @/tmp/all-workspaces.json

Add the Users and User Groups

The default admin group and both the admin user and the demo user are created automatically when you start the new GoodData.CN Community Edition image. If you had other users in your previous installation, you must re-add them.

GoodData.CN Production K8S Edition

Version Specific Upgrade Guides

Upgrading to a new minor version is supported only from the previous minor version. To upgrade over several minor versions, follow the upgrade path for each minor version separately:

General Upgrade Guide

After any version specific upgrades are complete, you may complete the general upgrade steps for GoodData.CN Production K8S Edition.

Execute the following statement to upgrade your GoodData.CN Production K8S Edition environment:

  • n.n.n
    The version number of your current environment. For example, 1.2.0.
helm upgrade --namespace gooddata-cn --version n.n.n \
    -f customized-values-gooddata-cn.yaml \
    gooddata-cn gooddata/gooddata-cn