Scope
GoodData.CN release 1.0.1 brings the following fixes:
- Workspace ID is no longer limited to the alphanumeric characters [A-z0-9]+. Special characters such as '-' (hyphen), '_' (underscore), and '.' (dot, period, full-stop) are now supported.
- Browser ad blockers no longer prevent loading of Analytical Designer and Dashboards.
- Creating data sources for a Vertica database now works without hiccups.
- The logical data model of a parent workspace is now visible in its child workspaces.
Upgrade Guide
Preparation
- Set the environment variables.
- If you used the demo environment from the GoodData.CN Community Edition (CE) image, use the following values:
export ENDPOINT=http://localhost:3000
export API_TOKEN=YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz
- If you set up your own environment, use those values.
- If you used the demo environment from the GoodData.CN Community Edition (CE) image, use the following values:
- 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 either
- back up only a specific portion of the metadata (for example, only data sources or users)
or - skip this step completely.
Back Up the Data Sources
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
The passwords to the databases will not be included in the backup files. Ensure that you remember them or have them stored separately.
Note: Back up the data sources if you want to also back up and then restore the physical data model.
Back Up the Physical Data Model
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
Execute the following statement to save all the logical data models and analytical models of all 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 and both the admin user and the demo user will be automatically created when you start the new GoodData.CN CE image. If you have added other users to your current environment, you will have to re-add them after the upgrade.
Upgrade Your GoodData.CN
- Stop your current GoodData.CN CE image.
- Download the latest GoodData.CN CE image from hub.docker.com.
- Start the new GoodData.CN CE image as usual.
Initialize the Working Environment
Restore the Data Sources
- Prepare the passwords to your database because you will be prompted to enter them.
For the password of the demo data source (demo-ds) see Register Datasource by API. - 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"
curl -X PUT $ENDPOINT/api/layout/dataSources/$id/physicalModel \
-H "Content-Type:application/json" \
-H "Authorization: Bearer $API_TOKEN" \
-d@/tmp/pdm_${id}.json; \
done
Restore the Logical Data Model and the Analytical Model
Execute the following statement to restore all 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 have been automatically created when you started the new GoodData.CN CE image. If you had other users in your previous installation, re-add them.