Switch the ticketing routes to CoreAPI
The cutover points the public ticketing addresses at the new stack. The addresses stay the same (etiket,
tiketadmin and tiketapi.johor.gov.my); only the APISIX routes behind them change. The switch was made in
ticket-iac commit 4656c2c.
| Route | Before | After |
|---|---|---|
ticket-api-route |
ticketing:8080 |
coreapi-service:3000 |
ticket-admin-route |
old ticket-admin | spatio-service:3001, with / redirected to /spatio/ |
etiket |
ticket-cms-service:3000 |
unchanged |
Before you start¶
- The migration has run and is verified, and its open settings are filled in or accepted.
- spatio runs
prod-v0.0.2or later (Release on the ticketing cluster). - A rollback deadline is agreed: rollback is clean only until CoreAPI takes its first real order.
- Push access to
ticket-iac, branchupdate_queue, and shell access toticket-node-1.
Switch the routes¶
- Freeze the old system: no new orders or edits.
-
Catch up the data on
ticket-node-1, in~/schema-dump:Read the plan, then run
RESET=1 ./run-all.sh applyand typeapply. 3. Inticket-iac, copyoverlays/prod/ticket-cms/etiket-johor-apisixroute.yamltoetiket-johor-apisixroute.yaml.bak(kustomize ignores it) for rollback. 4. Inetiket-johor-apisixroute.yaml: - Set theticket-api-routebackend tocoreapi-service, port3000. - Set theticket-admin-routebackend tospatio-service, port3001. - Add a rule for/with priority10and theredirectplugin (uri: /spatio/,ret_code: 302). 5. Commit and push toupdate_queue. Argo CD syncs within a few minutes. 6. Check:Expected:
HTTP/2 302withlocation: /spatio/. The admin and the public site load and show the migrated data. If routes look wrong, restart the ingress controller (APISIX routes look wrong). 7. Tell users that everyone has to log in once more. Customers keep their passwords. 8. Turn off the old backend's schedulers.
Roll back¶
Only before CoreAPI has taken real orders:
- Restore
etiket-johor-apisixroute.yamlfrom the.bakcopy. - Commit and push to
update_queue, and let Argo CD sync. - If you already turned off the old schedulers (step 8), turn them back on.
- Lift the freeze on the old system.
After the first real order, rolling back would lose it: fix forward instead.