On this page
- What gets installed
- 1. What you need
- 2. The images
- 3. The install kit
- 4. Find your cluster’s values
- 5. Write the overlays
- 6. Deploy mas-tools.com Data Import
- 7. Deploy mas-tools.com Data Export
- 8. The service account, the Role and the licence Secret by hand
- 9. Monitoring, optional
- 10. Accept the licence agreement and install the Manage-side components
- 11. When the install cannot write the scripts
- 12. Give people access
- 13. A licence
- 14. The nightly export, optional
- 15. Check the installation
- 16. Updates
- 17. Remove the apps
- 18. Upgrade from 1.x to 2.0.0
- Help
This guide installs mas-tools.com Data Import and mas-tools.com Data Export on the OpenShift cluster that runs your IBM Maximo Application Suite (MAS). At the end, people open the apps in the browser, sign in through MAS, and import and export Excel workbooks with their own rights in Manage.
Everything comes from two places. The container images are public on quay.io. Every script and every file of the installation is in one install kit, which you download from this page. The steps are the ones we run on our own test system, on the MAS 9.2 series.
Two people usually share the work. The OpenShift administrator deploys the apps, sections 1 to 9. The Maximo administrator installs the Manage-side components and gives people access, sections 10 to 12. You can install one app alone, and the other one later. They share the licence, and nothing else depends on the order.
What gets installed
For each app, in the MAS core namespace:
- One pod per Manage workspace, with a data volume of 5 GiB for the jobs and their files. It runs beside IBM’s own MAS components and signs people in through MAS.
- A Route under the suite’s domain. Under subdomain routing it is the host
mas-tools-data-import.<domain>ormas-tools-data-export.<domain>. Under path routing it is the path/mas-tools-data-importor/mas-tools-data-export. - The app’s own service account, with a Role that may read and write one Secret,
mas-tools-data-tools-license, and read MAS’s Suite for its domain. - Optionally, monitoring: a ServiceMonitor and a PrometheusRule with the app’s alerts.
Shared by both apps:
- The licence Secret
mas-tools-data-tools-license, created empty by the first deploy. It holds the one licence of mas-tools.com Data Tools. Without a licence, the free edition applies.
In Manage, installed by each app’s administration screen with the administrator’s own credential:
- Four automation scripts per app:
MTIMP_PING,MTIMP_META,MTIMP_ROWSandMTIMP_INSTALLfor the import,MTEXP_PING,MTEXP_META,MTEXP_READandMTEXP_INSTALLfor the export. The export’s scripts only read. - One application per app,
MTIMPORTandMTEXPORT, with their signature options, and two security groups per app.
Optionally, for mas-tools.com Data Export: a nightly export, a CronJob that runs the command line client on a schedule. It needs a licence.
1. What you need
| What | Detail |
|---|---|
| MAS and Manage | MAS 9.1 or later, with Manage and one Manage workspace. Path routing needs MAS Core 9.2.7 or later; with an earlier release, use subdomain routing. |
| OpenShift | The cluster that runs MAS, with cert-manager and the MAS internal ClusterIssuer. MAS installs both. |
| Rights in the cluster | oc login as a user who may create Deployments, Services, Routes, Secrets, PVCs, Certificates, NetworkPolicies, Jobs, ServiceAccounts, Roles and RoleBindings in the MAS core namespace. The namespace’s admin role can. |
| Tools | oc, with its built-in oc kustomize, and openssl, curl, tar and sha256sum or shasum. skopeo reads the image digests, and cosign checks their signatures. jq only when you copy a pull secret. |
| The images | Access from the cluster to quay.io, or a mirror of the images. |
| A Maximo administrator | A user who may save in the Automation Scripts and the Application Designer applications and holds the options of the object structure MXAPIAUTOSCRIPT. On a Manage with demo data, MAXADMIN holds all three. Without demo data, grant them first, as section 10 shows. |
| Monitoring, optional | User workload monitoring in OpenShift, for the metrics and the alerts. |
2. The images
Each app is one container image. It holds the server, the web interface with its fonts, and the
app’s Manage-side scripts. The apps need no internet access at run time: they talk to MAS and
Manage inside your cluster, and the browser loads nothing from another site. The nightly export
(section 14) uses a third image, quay.io/mas-tools.com/mtde-cli, which holds the command line client and
needs a licence.
| Image | For |
|---|---|
quay.io/mas-tools.com/data-import |
mas-tools.com Data Import |
quay.io/mas-tools.com/data-export |
mas-tools.com Data Export |
Each version has its own tag, and latest follows the newest version. Pull the images without a
login. Refer to each image by its digest: a digest names exactly one build, and it stays the same in
a mirror. This prints the digest of a version:
skopeo inspect --format '{{.Digest}}' docker://quay.io/mas-tools.com/data-import:2.0.0
The digests of version 2.0.0, also in the kit’s README.md:
| Image | Digest |
|---|---|
data-import:2.0.0 |
sha256:03366bb5540356bfca4280b73c0318d2127ca3fa48901ce014dba2cf22ddb12a |
data-export:2.0.0 |
sha256:c41c983567fd8c3c7dbe9e41f0bbd689e64007f9caaf1eeb669fdd4d46fd6d42 |
Check the signature before you deploy a digest. From 1.0.2 on, every image is signed with
cosign, and the two app images carry their SBOM as a CycloneDX attestation. Save the public key as
cosign.pub:
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZDj9ekJEsZLiYU2DPfNHChqMi9xA
gB85czl1f+IhMVNaf3pLdiOyw0YDMQaXy+H0o1Nnfgm2QqYFsO9o8kZTpQ==
-----END PUBLIC KEY-----
Then check the digest you deploy. cosign needs no login for quay.io:
cosign verify --key cosign.pub quay.io/mas-tools.com/data-import@sha256:<digest>
cosign verify-attestation --key cosign.pub --type cyclonedx quay.io/mas-tools.com/data-import@sha256:<digest>
The same key signs mas-tools-data-export and mtde-cli. The quay.io page of each image shows the
key too.
Mirror the images when the cluster has no route to quay.io. skopeo copy --preserve-digests
keeps the digest, and the second command shows the same digest from your mirror:
skopeo copy --preserve-digests docker://quay.io/mas-tools.com/data-import:2.0.0 docker://<your-mirror>/mas-tools-data-import:2.0.0
skopeo inspect --format '{{.Digest}}' docker://<your-mirror>/mas-tools-data-import:2.0.0
Do the same for mas-tools-data-export, and for mtde-cli when you use the nightly export. For a
network that is fully disconnected, we send the images as OCI archives on request.
3. The install kit
The kit holds every file of the installation. Download it, check it and extract it:
- mas-tools-data-tools-install-2.0.0.tar.gz, the kit of version 2.0.0
- mas-tools-data-tools-install-2.0.0.tar.gz.sha256, its checksum
curl -LO https://mas-tools.com/products/data-tools/installation/mas-tools-data-tools-install-2.0.0.tar.gz
curl -LO https://mas-tools.com/products/data-tools/installation/mas-tools-data-tools-install-2.0.0.tar.gz.sha256
shasum -a 256 -c mas-tools-data-tools-install-2.0.0.tar.gz.sha256
tar -xzf mas-tools-data-tools-install-2.0.0.tar.gz
cd mas-tools-data-tools-install-2.0.0
shasum -a 256 -c SHA256SUMS --quiet
On Linux, sha256sum -c does the same as shasum -a 256 -c. All further commands run in the kit’s
folder.
| Folder or file | What it holds |
|---|---|
deploy/ |
mas-tools.com Data Import: deploy.sh, undeploy.sh, backup.sh and restore.sh, the kustomize base, the monitoring and Grafana components, and two example overlays |
export/deploy/ |
mas-tools.com Data Export: the same, with grafana-datasource.sh |
LICENCE-AGREEMENT.md |
The licence agreement of mas-tools.com Data Tools |
README.md |
The version and the digests of its two images |
SHA256SUMS |
The checksum of every file |
Keep deploy/ and export/deploy/ side by side. The export’s deploy script also reads
deploy/license.yaml.
4. Find your cluster’s values
The overlays need a few facts about your MAS installation. Each row gives the command that finds the value.
| Value | Placeholder | Command |
|---|---|---|
| Core namespace and instance | <core-ns>, <instance> |
oc get suite -A |
| Routing mode | oc get suite -n <core-ns> -o jsonpath='{.items[0].spec.settings.routingMode}' |
|
| Domain | <domain> |
oc get suite -n <core-ns> -o jsonpath='{.items[0].spec.domain}' |
| Manage workspace | <workspace> |
oc get manageworkspace -A -o jsonpath='{.items[0].metadata.labels.mas\.ibm\.com/workspaceId}' |
| Manage’s default server bundle | <bundle> |
oc get manageworkspace <instance>-<workspace> -n mas-<instance>-manage -o jsonpath='{.spec.settings.deployment.serverBundles[?(@.isDefault==true)].name}' |
| Manage’s service for that bundle | oc get svc -n mas-<instance>-manage <instance>-<workspace>-<bundle> |
|
| The internal ClusterIssuer | oc get clusterissuer mas-<instance>-core-internal-issuer |
|
| The right to create the Role | oc auth can-i create roles -n <core-ns> |
|
| User workload monitoring | oc get configmap cluster-monitoring-config -n openshift-monitoring -o jsonpath='{.data.config\.yaml}' |
An empty routing mode means subdomain routing. A Manage split into several server bundles has one
service per bundle, and the apps use the one marked as the default. The issuer must show Ready,
and the right to create the Role must answer yes.
5. Write the overlays
The manifests are kustomize files. Each app’s base/ holds its objects for any cluster, and an
overlay adds the values of one cluster. The kit brings two example overlays per app:
example-subdomain and example-path. Copy the one for your routing mode for both apps, and name
the copies after your cluster. This uses prod:
cp -r deploy/overlays/example-subdomain deploy/overlays/prod
cp -r export/deploy/overlays/example-subdomain export/deploy/overlays/prod
Every cluster value in them is a placeholder from the table of section 4. One sed fills both
apps. Put your own values in place of the examples here:
sed -i.bak \
-e 's/<core-ns>/mas-prod-core/g' \
-e 's/<instance>/prod/g' \
-e 's/<domain>/mas.example.com/g' \
-e 's/<workspace>/main/g' \
-e 's/<bundle>/all/g' \
deploy/overlays/prod/*.yaml export/deploy/overlays/prod/*.yaml
rm deploy/overlays/prod/*.bak export/deploy/overlays/prod/*.bak
What the files of an overlay hold:
kustomization.yaml: the namespace, the image names, and the optional components. Remove the#beforecomponents:and../../components/monitoringwhen user workload monitoring is on. When you use a mirror, set each image’snewNameto it.certificate.yaml: the app’s internal certificate, with your namespace in its DNS names and your issuer.deployment.yaml: a JSON patch with the app’s addresses: the routing mode, the domain, the MAS sign-in endpoints and Manage’s addresses. Each value comes after atestof the variable’s name, so a changed base stops the build before a value lands in the wrong variable.config.yaml, mas-tools.com Data Import only: its settings. A production system needs the one lineInstance.Kind: production. The app checks the file when it starts, and the log line names any setting with a wrong value.cron-profile.yaml, mas-tools.com Data Export only: the nightly export’s profile, used only with that component. Section 14 explains it.
Two values may need a second look:
MANAGE_INTERNAL_URLpoints the app at Manage’s service inside the cluster, which is faster than Manage’s public route. Empty, the app calls Manage through its public route.TRUST_PROXY_HOPS, mas-tools.com Data Import only, counts the proxies in front of the pod that writeX-Forwarded-For. The OpenShift router is one. Behind a load balancer that ends TLS and sets the header, it is 2. The import’s audit record names the caller’s address only when this count is right.
The export’s settings are environment values too, and the defaults suit a first install. To set
one, add a line to its deployment.yaml, for example three jobs at once:
- { op: add, path: /spec/template/spec/containers/0/env/-, value: { name: JOBS_CONCURRENT, value: "3" } }
Check the overlays before you apply them. Each must render, and no placeholder and no
set-by-overlay may be left:
oc kustomize deploy/overlays/prod | grep -c -e set-by-overlay -e '<[a-z-]*>' # prints 0
oc kustomize export/deploy/overlays/prod | grep -c -e set-by-overlay -e '<[a-z-]*>' # prints 0
6. Deploy mas-tools.com Data Import
deploy/deploy.sh does the first deploy in one run. It reads the namespace, the host and the path
from your overlay, so the Route and the pod always agree. Pin the image by its digest:
DIGEST=$(skopeo inspect --format '{{.Digest}}' docker://quay.io/mas-tools.com/data-import:2.0.0)
OVERLAY=prod IMAGE=quay.io/mas-tools.com/data-import:2.0.0 IMAGE_DIGEST=$DIGEST ./deploy/deploy.sh
The script runs these steps and prints each one:
- It checks your login and the issuer.
- It creates the OIDC client secret with a generated value. The value lands in the cluster Secret only.
- It creates the pull secret. An image from quay.io needs no login, so the pull secret holds no credentials. Then it creates the app’s service account with its Role and RoleBinding, and the empty licence Secret when that is missing. A licence installed later is never reset by a deploy.
- It applies the overlay: the Certificate, the PVC, the ConfigMap, the NetworkPolicy, the Deployment, the Service, and the monitoring objects when the overlay has them.
- It waits for the certificate, then creates the Route with the issued CA.
- It registers the OIDC client with MAS through a short Job in the cluster.
- It waits for the rollout and checks the result.
A good run ends with internalapi HTTP 200 and DONE: open https://<host><path>/. The last
step prints the app’s version through the Route, the sign-in redirect to MAS, the readiness answer,
and a call from the pod to MAS’s internal API over mutual TLS.
From a mirror with a login, give the script the credentials once. It reads them only when the pull secret does not exist yet, and the password goes in without an echo:
export REGISTRY_USER=<user>
read -rs REGISTRY_PASSWORD; export REGISTRY_PASSWORD
OVERLAY=prod IMAGE=<your-mirror>/mas-tools-data-import:2.0.0 IMAGE_DIGEST=$DIGEST ./deploy/deploy.sh
7. Deploy mas-tools.com Data Export
export/deploy/deploy.sh works the same way:
DIGEST=$(skopeo inspect --format '{{.Digest}}' docker://quay.io/mas-tools.com/data-export:2.0.0)
OVERLAY=prod IMAGE=quay.io/mas-tools.com/data-export:2.0.0 IMAGE_DIGEST=$DIGEST ./export/deploy/deploy.sh
It finds the licence Secret of mas-tools.com Data Import and keeps it. A good run ends with
internalapi HTTP 200 and DONE: open https://<host><path>/ and sign in.
With the nightly export in the overlay, pin its image too, with
CLI_IMAGE=quay.io/mas-tools.com/mtde-cli:2.0.0 and CLI_IMAGE_DIGEST=<its digest>. RENDER_ONLY=1
prints the manifests the script would apply, with the images pinned, and changes nothing.
From a mirror with a login, the export can copy the import’s pull secret, so no password passes through your shell:
REGISTRY_PULL_FROM=mas-tools-data-import-registry-pull OVERLAY=prod \
IMAGE=<your-mirror>/mas-tools-data-export:2.0.0 IMAGE_DIGEST=$DIGEST ./export/deploy/deploy.sh
8. The service account, the Role and the licence Secret by hand
The deploy scripts create these objects. An OpenShift administrator who prefers to create them alone, or a pipeline without the right to create Roles, uses the same template. It holds the ServiceAccount, the Role and the RoleBinding of one app:
for app in mas-tools-data-import mas-tools-data-export; do
sed -e "s|__APP__|$app|g" -e 's|__NS__|<core-ns>|g' deploy/license.yaml | oc apply -f -
done
oc get secret mas-tools-data-tools-license -n <core-ns> \
|| oc create secret generic mas-tools-data-tools-license -n <core-ns>
The Role allows get, update and patch on that one Secret, by name, and get and list on
MAS’s Suite. Kubernetes cannot limit create to one name, so the Secret must exist before the
first start. Check the result:
oc auth can-i update secret/mas-tools-data-tools-license -n <core-ns> --as=system:serviceaccount:<core-ns>:mas-tools-data-import # yes
oc auth can-i list secrets -n <core-ns> --as=system:serviceaccount:<core-ns>:mas-tools-data-import # no
9. Monitoring, optional
With user workload monitoring on and ../../components/monitoring in an overlay, the deploy creates
a ServiceMonitor and a PrometheusRule for that app: eight alerts for the import and six for the
export. Each alert carries a severity label, so your Alertmanager routes it. Check that Prometheus
scrapes the pods: in the OpenShift console, under Observe and Metrics, the queries
up{job="mas-tools-data-import"} and up{job="mas-tools-data-export"} give 1.
Each app also brings a Grafana dashboard, components/monitoring/dashboard.json, with the
datasource as a variable. There are two ways to bring it in:
- A Grafana that the MAS CLI’s Grafana operator runs: add
../../components/grafanato the overlay’s components. It creates a GrafanaDashboard that this operator selects. - A Grafana of your own: it needs read access to the cluster’s metrics first.
export/deploy/grafana-datasource.shcreates a service account that may read them, and a Prometheus datasource in your Grafana with its token. The token goes from the cluster into Grafana through a pipe and is never printed. Then importdashboard.jsonin Grafana.
export GRAFANA_URL=https://<your-grafana>
read -rs GRAFANA_TOKEN; export GRAFANA_TOKEN
./export/deploy/grafana-datasource.sh mas-thanos
10. Accept the licence agreement and install the Manage-side components
Open each app’s administration screen as the Maximo administrator:
| Subdomain routing | Path routing | |
|---|---|---|
| mas-tools.com Data Import | https://mas-tools-data-import.<domain>/#/admin |
https://<domain>/mas-tools-data-import/#/admin |
| mas-tools.com Data Export | https://mas-tools-data-export.<domain>/#/admin |
https://<domain>/mas-tools-data-export/#/admin |
Before the first install, the app’s application does not exist in Manage, so nobody holds its options. The app therefore lets in a user who may save in the Automation Scripts and the Application Designer applications, and shows that user the components only.
The screen reads and writes the scripts through the object structure MXAPIAUTOSCRIPT, so that
user needs its options too. On a Manage installed without demo data, even MAXADMIN lacks all
three, and the screen says “No access”. Grant them to the group MAXADMIN in Security Groups:
Automation Scripts and Application Designer on the Applications tab, MXAPIAUTOSCRIPT on the
Object Structures tab. A grant on an object structure alone starts no profile sync in Manage. In
our test on such a Manage, saving a small change to the user MAXADMIN in Users, such as the
city, started it. Sign in again a minute or two later.
First the licence agreement of mas-tools.com Data Tools. The screen shows it with Read and accept:
read it, tick the box, and press Accept. The app records the acceptance with your user, the
time and the version of the agreement. Install or upgrade stays off until then. The same text is
LICENCE-AGREEMENT.md in the kit.
Then press Install or upgrade. The app does three things with your own credential:
- Scripts. It creates or updates its four scripts through Manage’s standard object structure
MXAPIAUTOSCRIPT. - Application, options and groups. Its install script creates the application, the signature
options and two security groups.
MAXADMINand you join both groups. - Profiles. It clears Manage’s cached profiles of the groups’ members. MAS takes the new options at Manage’s next profile sync, often within two minutes. Then open the screen again, and it shows the rest of the administration.
The report lists every script with its result and the options you now hold. Pressing the button again is safe: an install that finds everything in place changes nothing. Do the same on the other app’s screen.
| Group | For | Options |
|---|---|---|
MTIMPORT |
People who import | READ, MTIMPORT, IMPORT, MBOPATH, DELETE, CONFIGSHEET, CLI |
MTIMPADM |
Administrators of the import | READ and every option of MTIMPORT, also SCRIPT, OBJECTS, ALLJOBS, ADMIN |
MTEXPORT |
People who export | READ, MTEXPORT, EXPORT, MBOPATH, OSPATH, LAYOUTS, CLI |
MTEXPADM |
Administrators of the export | READ and every option of MTEXPORT, also WHERE, OBJECTS, ALLJOBS, ADMIN |
Manage keeps an application only when its ORIGINALAPP holds a value. When a screen reports
“Repair needed”, the install fills it, and Manage takes the repaired application at its next
restart.
11. When the install cannot write the scripts
Some sites switch on object structure security for MXAPIAUTOSCRIPT, or allow no app to write a
script. The install then reports the scripts as failed. You create the four scripts of that app by
hand, and the app does the rest.
- Download the scripts. On the administration screen, follow Download the scripts. The zip
holds each script as
<NAME>.jsand the filescripts.jsonwith every other field. - Create each script in Manage’s Automation Scripts application, in this order:
PING,META, thenROWSorREAD, thenINSTALL. Use More Actions > Create > Script, the variant without a launch point, and take every value fromscripts.json:
Field in scripts.json |
Value |
|---|---|
autoscript |
The script name, for example MTIMP_ROWS |
description |
As given, including the # and the hash at its end |
version |
The script’s version |
scriptlanguage |
javascript |
loglevel |
ERROR |
active |
true |
sourceFile |
The file whose content goes into the source |
autoscriptvars |
The script’s variables: each has the type IN, the binding type LITERAL and the given value |
- Finish on the administration screen. Press Install again. The four scripts now show as up to date, because their sources match, and the install script creates the application, the options and the groups as in section 10.
When the install script cannot run either, create its rows by hand. In Application Designer, create
the application MTIMPORT with the description “mas-tools.com Data Import”, or MTEXPORT with “mas-tools.com
Data Export”. Add the signature options of section 10, each with “Electronic signature” off and
“Visible” on. Then create the two groups in Security Groups, grant their options, and add the users.
12. Give people access
In Manage’s Security Groups application, add each person who imports to MTIMPORT and each person
who exports to MTEXPORT. Add the administrators of each app to MTIMPADM or MTEXPADM. Then open
the app’s administration screen, enter the group under Refresh profiles, and press the button.
The new options work at once, and nobody has to sign out.
- A user who should import through object structures only gets
IMPORTand leaves outMBOPATH. - Two export options stay out of the users’ group on purpose.
WHERElets a user add a where clause of their own, andOBJECTSlets a user export a main object without an application. - Each app works with the user’s own rights in Manage. A user without
READinASSETcannot export assets, whatever the export’s options say.
13. A licence
Both apps run without a licence in the free edition. An import takes up to 200 rows of each sheet, an export writes up to 200 records, and up to three users may use each app. A licence lifts the limits, and it unlocks the command line clients and scheduled exports.
An administrator installs the licence on either app’s administration screen. It takes effect at once in that app, and the other app reads it within a minute. An OpenShift administrator can also put the licence file into the Secret. The apps read it every minute:
oc create secret generic mas-tools-data-tools-license -n <core-ns> --from-file=license=<licence file> \
--dry-run=client -o yaml | oc apply -f -
The command line clients mtdi and mtde come with a licence, and we send them with it. Get in
touch for a licence, a trial licence or a price.
14. The nightly export, optional
The component export/deploy/components/cron runs one export every night with the command line
client, as an integration user, and keeps each night’s files on a volume of its own. The job shows
in the app’s History under that user. It needs a licence.
The kit. The command line client needs a licence, so the nightly export is not in the install
kit. Its files come in the nightly export kit, mas-tools-data-tools-nightly-export-<version>.tar.gz,
which licence holders get from us with the client. Unpack it in the install kit’s folder: it adds
export/deploy/components/cron/ and a cron-profile.yaml to each example overlay.
The order. Create the Secret below before you run deploy.sh. The script stops when the
overlay holds the CronJob and the Secret is missing, because the CronJob’s pod would otherwise wait
in CreateContainerConfigError.
The user. Pick an integration user who belongs to MTEXPORT, and create a Maximo API key for
that user. Put the key into a Secret once. It is read without an echo and goes into the cluster
through a pipe:
read -rs CRON_KEY
printf '%s' "$CRON_KEY" | oc create secret generic mas-tools-data-export-cron-apikey -n <core-ns> --from-file=apikey=/dev/stdin
unset CRON_KEY
The overlay. In export/deploy/overlays/prod/kustomization.yaml, add ../../components/cron
under components: and - path: cron-profile.yaml under patches:.
cron-profile.yaml tells the client where the app is: through its Service, with the CA of the app’s
internal certificate. The sed of section 5 has already filled it.
The selection and the time. As it comes, the component exports the assets of the demo site
BEDFORD at 02:30, Vienna time. Replace both with a patch in the overlay. The selection can be any
mtde export command. This patch exports the open work orders of a saved query on weekdays at 03:00,
in the time zone of New York:
- op: replace
path: /spec/schedule
value: "0 3 * * 1-5"
- op: replace
path: /spec/timeZone
value: America/New_York
- op: replace
path: /spec/jobTemplate/spec/template/spec/containers/0/args/0
value: |
set -eu
day=$(date +%Y-%m-%d)
mtde export --target WORKORDER --app WOTRACK --query "Open work orders" --preset records -o "/out/$day"
find /out -mindepth 1 -maxdepth 1 -type d -mtime +7 -exec rm -rf {} +
Name the file in the overlay’s patches, with
target: { kind: CronJob, name: mas-tools-data-export-nightly }. Each night’s files go into a folder
named by the date, and folders older than seven days are removed after a good run. Then deploy the
export again with CLI_IMAGE and CLI_IMAGE_DIGEST, as in section 7.
15. Check the installation
| Check | How | Good result |
|---|---|---|
| The apps answer | curl -s https://<host><path>/api/version for each app |
JSON with appVersion and buildId |
| The pods are ready | oc get pod -n <core-ns> -l 'app in (mas-tools-data-import,mas-tools-data-export)' |
Each Running, 1/1; the registration Jobs show Completed |
| The components | Each administration screen | Every script “up to date”, and the application exists |
| A user can plan an import | Upload a small workbook as a member of MTIMPORT |
The preview shows the planned rows. Nothing is written until you run it. |
| A user can plan an export | Pick a target on the Export page as a member of MTEXPORT and press Plan export |
The plan shows the number of records |
| The nightly export | oc get cronjob mas-tools-data-export-nightly -n <core-ns>, the morning after |
LAST SCHEDULE names the night, and History shows the job |
16. Updates
A new version needs only the new images. With APPLY_ONLY=1, a deploy script applies the overlay
and waits for the rollout. It leaves the secrets, the Route and the OIDC client as they are:
DIGEST=$(skopeo inspect --format '{{.Digest}}' docker://quay.io/mas-tools.com/data-import:<version>)
APPLY_ONLY=1 OVERLAY=prod IMAGE=quay.io/mas-tools.com/data-import:<version> IMAGE_DIGEST=$DIGEST ./deploy/deploy.sh
The same command with export/deploy/deploy.sh and the export’s image updates the export. Each
version comes with its own kit, so take the scripts from the kit of that version. The
release notes list every version with its kit, and
say what an upgrade to it needs.
The Deployment replaces its pod in one step, and the app is away for the few seconds the new pod needs to start. Plan an update outside the hours of long jobs. Then open each administration screen. When a version brings new scripts, the screen offers them, and Install or upgrade installs them.
17. Remove the apps
Remove the objects in Manage first, while the app still runs. Each administration screen’s Uninstall shows what it removes. Then it deletes the app’s application, its options and grants, the two groups with their members, and the four scripts. Records that people imported stay in Manage.
Then remove each app from the cluster. The undeploy script removes the OIDC client registration
first, then every object of the app in the namespace. Name your namespace; KEEP_DATA=1 keeps the
data volume with its jobs:
NS=<core-ns> KEEP_DATA=1 ./deploy/undeploy.sh
NS=<core-ns> KEEP_DATA=1 ./export/deploy/undeploy.sh
The licence Secret stays, so a licence survives a reinstall. oc delete secret mas-tools-data-tools-license -n <core-ns> removes it as well. When an app is gone already, remove its
objects in Manage by hand: the four scripts in Automation Scripts, the application in Application
Designer, and the two groups in Security Groups.
18. Upgrade from 1.x to 2.0.0
Until version 2.0.0 the products were named Fiedler Data Import and Fiedler Data Export. Release
2.0.0 renamed them, and every technical name with them. So 2.0.0 is a second installation beside
1.x, and no name of the two collides. You install 2.0.0, carry the data over, and then remove 1.x.
Nothing is removed before the new apps work. The steps name Import; Export goes the same way with
export for import and EXP for IMP.
| 1.x | 2.0.0 | |
|---|---|---|
| App, route, OIDC client | fiedler-data-import |
mas-tools-data-import |
| Image | quay.io/fiedler-it/fiedler-data-import |
quay.io/mas-tools.com/data-import |
| Data volume | fiedler-data-import-data |
mas-tools-data-import-data |
| Licence Secret | fiedler-data-tools-license |
mas-tools-data-tools-license |
| Manage application and groups | FDIMPORT, FDIMPADM |
MTIMPORT, MTIMPADM |
| Scripts | FDIMP_* |
MTIMP_* |
| Command line client | fdi, FDI_*, ~/.config/fdi |
mtdi, MTDI_*, ~/.config/mtdi |
| Metrics and alerts | fdi_*, Fdi* |
mtdi_*, Mtdi* |
1. Copy the licence. A licence file stays valid: it names no product. The Secret has a new name, so copy it before the first deploy. Without the copy the new apps start in the free edition.
oc get secret fiedler-data-tools-license -n <core-ns> -o json \
| jq 'del(.metadata.uid, .metadata.resourceVersion, .metadata.creationTimestamp, .metadata.managedFields, .metadata.ownerReferences)
| .metadata.name = "mas-tools-data-tools-license"' \
| oc apply -n <core-ns> -f -
An overlay with the nightly export has one more Secret, fiedler-data-export-cron-apikey. Copy it
the same way to mas-tools-data-export-cron-apikey.
2. Deploy 2.0.0. Take the 2.0.0 kit and write your overlays again from its examples: the names inside them changed. Then follow sections 5 to 7. The old apps keep running.
3. Copy the data. A new app starts with an empty volume. deploy/copy-data.sh of the kit copies
the old volume into it: jobs, files, audit records and the record of the accepted agreement. Both
apps stand still for the copy, and the old volume is only read.
NS=<core-ns> FROM=fiedler-data-import TO=mas-tools-data-import ./deploy/copy-data.sh
NS=<core-ns> FROM=fiedler-data-export TO=mas-tools-data-export ./deploy/copy-data.sh
The old apps stay stopped after the copy. A licence keeps the agreement version it was accepted with, so a licensed system needs no new acceptance. A free edition accepts the new version in step 4.
4. Install in Manage. Open each new app’s administration screen and press Install or
upgrade (section 10). When the install creates MTIMPORT and MTIMPADM, the members of
FDIMPORT and FDIMPADM join them, so every user keeps their access. A later install adds nobody.
5. Remove 1.x from Manage. Start each old app once more for this
(oc scale deployment fiedler-data-import -n <core-ns> --replicas=1), open its administration
screen and press Uninstall. It removes FDIMPORT, its options and grants, the two old groups
and the FDIMP_* scripts.
6. Remove 1.x from the cluster, with the undeploy.sh of your 1.x kit. Without KEEP_DATA=1
it also removes the old volume. The old licence Secret stays until you delete it.
What else carries an old name. Check these after the upgrade:
- Your own callback scripts.
Script.AllowedPrefixesisMTIMP_by default now. A script of yours that begins withFDIMP_is refused until it is renamed, or until you add its prefix to the setting. - Each user of the command line clients: the programs are
mtdiandmtde, their variables begin withMTDI_andMTDE_, and their profiles live in~/.config/mtdiand~/.config/mtde. Copy the old folders there and change the apps’ addresses inprofiles.toml. - Dashboards and alerts of your own that read
fdi_*orfde_*metrics. - Bookmarks and links to the old addresses. The old routes are gone after step 6.
A workbook that 1.x wrote still imports: its sheet Fiedler Data Tools stays reserved.
Help
Write to support@mas-tools.com with the app, its version and build from the administration screen, and what you saw. For a licence, a trial or a price, get in touch.
IBM and Maximo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide.
