Installation

CheatSheets Installer

Installer CheatSheet

Quick reference for the commands available in the Anjana Installer command-line interface (CLI), and for the REST endpoints with no CLI equivalent (Preflight, Access Control, Diagnostics, import from the Ansible kit). The CLI connects via HTTPS to the running installer and allows most of the operations available in the graphical interface to be executed.

Tools

List available operations

Command

Description

tools list

Lists all available tool operations along with their category

tools jobs

Shows recent jobs along with their status (PENDING, RUNNING, SUCCESS, FAILED)

Backup and restore

Command

Description

tools run BACKUP_POSTGRESQL --yes

PostgreSQL backup (pg_dump per schema)

tools run BACKUP_S3 --yes

SeaweedFS/S3 backup (aws s3 sync per bucket)

tools run BACKUP_MONGODB --yes

MongoDB backup (mongodump)

tools run BACKUP_CONFIG --yes

Configuration backup (/{installFolder}/data/config)

tools run BACKUP_ALL --yes

Sequential backup of all persistence stores

tools run RESTORE_POSTGRESQL --yes

Restores the latest PostgreSQL backup

tools run RESTORE_S3 --yes

Restores the latest S3 backup

tools run RESTORE_MONGODB --yes

Restores the latest MongoDB backup

tools run RESTORE_CONFIG --yes

Restores the latest configuration backup

tools run RESTORE_ALL --yes

Restores the latest backup of all persistence stores

Restore from file (no CLI equivalent)

Unlike the rest of the operations in this table, these 5 are not run with tools run <OPERATION> --yes (they have no CLI equivalent): they are triggered by uploading a file to the POST /api/tools/run-with-file endpoint (multipart/form-data, file field). They restore the content of the uploaded file instead of the latest local backup.

Operation

Description

RESTORE_POSTGRESQL_FILE

Restores PostgreSQL from an uploaded .sql file, instead of the latest local backup

RESTORE_S3_FILE

Restores S3/SeaweedFS from an uploaded .tgz file, instead of the latest local backup

RESTORE_MONGODB_FILE

Restores MongoDB from an uploaded .tar.gz file, instead of the latest local backup

RESTORE_CONFIG_FILE

Restores the configuration from an uploaded .tar.gz file, instead of the latest local backup

IMPORT_DATA

Restores all persistence stores from an uploaded .tar.gz package (the same format generated by EXPORT_DATA), instead of the latest local backup

In K8s mode, run-with-file first uploads the file to S3 and launches the job with that reference (runWithFileK8s variant), because K8s jobs run in ephemeral pods with no access to the installer's local filesystem. This variant does not apply to operations in the S3 category, which are always processed directly via the installer's Java SDK.

Data deletion

Command

Description

tools run DELETE_POSTGRESQL --yes

Deletes all PostgreSQL schemas (DROP SCHEMA CASCADE)

tools run DELETE_S3 --yes

Deletes all S3 buckets

tools run DELETE_MONGODB --yes

Deletes the MongoDB database

tools run DELETE_SOLR_COLLECTIONS --yes

Deletes all Solr collections

tools run DELETE_OPENSEARCH_INDEXES --yes

Deletes all OpenSearch indexes

tools run FLUSH_VALKEY --yes

Clears the entire Valkey cache (FLUSHALL)

tools run PURGE_RABBITMQ --yes

Purges all RabbitMQ queues

tools run DELETE_CONFIG --yes

Deletes the local configuration

Reset and data loading

Command

Description

tools run RESET_ALL --yes

Deletes ALL data from all persistence stores (Empty mode)

tools run RESET_ALL --param restore=sample --param dataset=nativo --yes

Deletes everything and loads sample data from the "nativo" dataset

tools run RESET_ALL --param restore=sample --param dataset=nativo --param version=26.1 --yes

Deletes everything and loads sample data for a specific version

tools run RESET_ALL --param restore=backup --yes

Deletes everything and restores from the latest local backup

tools run LOAD_SAMPLE_DATA --param dataset=nativo --yes

Loads sample data without deleting (requires empty persistence stores)

tools run LOAD_SAMPLE_DATA --param dataset=devqa --param devMode=true --yes

Loads development data (requires ROLE_DEV)

Available datasets: nativo, gob-ext, health-dcatap, pbi. In dev mode: devqa, devqa-config, devqa-grancarga.

This is the static reference list (fallback). Since the introduction of dynamic dataset discovery, the wizard can also show additional datasets published in Nexus (pub-* pattern), retrieved via GET /api/tools/sample-datasets; the static list is only used if that discovery fails or no Nexus credentials are configured.

Export and import (migration between environments)

Command

Description

tools run EXPORT_DATA --yes

Full backup + packaging into a downloadable .tar.gz

tools run CONNECTION_CHECK --yes

Checks TCP connectivity to all persistence stores

Advanced destructive operations

Command

Description

tools run PURGE_PERSISTENCE --yes

Stops, uninstalls, and removes all local persistence services

tools run UNINSTALL_PLATFORM --yes

Complete uninstallation of Anjana (backup + full removal)

tools run UNLOCK_SCHEMAS --yes

Unlocks schemas with Liquibase locks (PostgreSQL)

Logs

Command

Description

logs horus --lines 100

Last 100 lines of the Horus log

logs horus --follow

Real-time follow of the Horus log

logs postgresql --lines 500

Last 500 lines of the PostgreSQL log

logs tot-plugin-jdbc --follow --lines 200

Last 200 lines + real-time follow

Console access control (break-glass)

Emergency command for the IP restriction of the installer console itself (the "Restrict access to this console" feature, enabled by default on VM since task DS-133). It acts directly on the data directory on disk, without going through the HTTP API - it works even if the operator themselves is blocked by the whitelist.

Command

Description

access disable

Creates the break-glass flag: the IP restriction is bypassed immediately (picked up live, ~2 seconds)

access enable

Removes the flag: the restriction is applied again (re-arms protection)

access status

Shows the status of the flag and the persisted configuration (enabled/seeded, pending unconfirmed changes)

Requires write access to the installer's data directory (root in a standard installation) - that host-level privilege IS the break-glass authorization. Each use is audited in logs/audit.log. Use the --data-dir <path> option to specify a data directory other than the default (/opt/anjana-installer/data).

Not applicable in K8s mode: the console is reached through the ingress/load balancer, whose IP replaces the real client's IP, so the IP restriction does not apply there at all - restrict at the ingress/load balancer or VPN level in that mode.

REST API (no CLI equivalent)

Preflight, Access Control, Diagnostics, and import from the Ansible kit are managed from the graphical interface and have no subcommand in the CLI; they are documented here as a reference for their endpoints.

Preflight

Mandatory pre-validation before Install/Platform Setup: it blocks deployment if any check is in FAIL, if there are unconfirmed WARN checks, or if the report has expired (15-minute TTL by default, configurable) or the configuration has changed since the last run.

Method and path

Description

POST /api/preflight

Starts running all preflight checks

GET /api/preflight/latest

Returns the latest report (404 if none has been run yet)

GET /api/preflight/{jobId}

Details of a preflight or remediation job (status + logs)

GET /api/preflight/{jobId}/logs

Live logs of a preflight or remediation job

POST /api/preflight/{checkId}/remediate?host=X

Applies the automatic fix for a remediable check (host is optional; omitted for global checks)

Access Control

Manages the IP/CIDR whitelist for the nginx front end (general whitelist, internal surfaces, trusted proxies, extra ranges). PUT validates and saves the full configuration block without applying it; apply renders and activates the files with an nginx reload and automatic rollback if it fails.

Method and path

Description

GET /api/security/access-control

Current configuration + status (deployed/applied) + detected client IP

PUT /api/security/access-control

Validates and saves the full configuration block (does not apply it)

POST /api/security/access-control/apply

Renders, activates, and reloads nginx (nginx -t + automatic rollback if it fails)

Files on the host (under /<install_folder>/data/config/anjana-ui/):

File

Content

nginx.conf

Main front-end configuration; includes the following three files

realip.conf

Trusted proxies (set_real_ip_from + real_ip_header)

whitelist-general.conf

General whitelist (restricts all of port 443 if enabled)

whitelist-internal.conf

Whitelist of internal surfaces (/solr, /s3, /horus/*)

During apply, each file is first written as .new, the previous one is backed up as .bak, and it is only replaced if nginx -t validates successfully; if validation fails, the .bak files are restored automatically.

Diagnostics (Export)

Downloads a plain-text diagnostic package for support (job log, latest Preflight report, health snapshot, version inventory, environment summary), redacted of credentials.

Method and path

Description

GET /api/diagnostics/export

Diagnostic package for the latest deployment job

GET /api/diagnostics/export?jobId=X

Diagnostic package scoped to a specific job (deployment or tools)

Settings

Method and path

Description

GET /api/settings/password-policy

Returns the configured expiration of the admin password (in days) and whether it has expired

PUT /api/settings/password-policy

Updates the admin password expiration (1-3650 days)

Usage notes

  • The --yes flag skips interactive confirmation, needed for scripting and automation

  • Parameters are passed with --param key=value; multiple --param can be chained

  • Destructive operations require an explicit --yes; without it, keyboard confirmation is requested

  • Service names in logs use hyphens (e.g.: tot-plugin-jdbc, anjana-ui)

  • The CLI requires the installer to be running (it connects via HTTPS on port 8787)

Equivalence with the Ansible kit

To facilitate the transition from the Ansible kit, the following table shows the mapping between the commands from the previous kit and the new installer commands:

Ansible kit

Anjana Installer

anjana

Full Install from the UI

anjana -t anjana-sample

tools run RESET_ALL --param restore=sample --param dataset=nativo --yes

anjana -t platform

Platform Setup from the UI

anjana -t start

Start Services from the UI

anjana -t stop

Stop Services from the UI

anjana -t restart

Restart Services from the UI

anjana -t update

Upgrade Product from the UI

anjana -t update-config

Update Service Units from the UI

anjana -t update-services

Update Service Units from the UI

anjana -t backup

tools run BACKUP_ALL --yes

anjana -t backup-persistences

tools run BACKUP_ALL --yes

anjana -t backup-config

tools run BACKUP_CONFIG --yes

anjana -t restore

tools run RESTORE_ALL --yes

anjana -t restore-s3

tools run RESTORE_S3 --yes

anjana -t restore-bbdd

tools run RESTORE_POSTGRESQL --yes

anjana -t restore-config

tools run RESTORE_CONFIG --yes

anjana -t export

tools run EXPORT_DATA --yes

anjana -t import

Import Data from the UI (requires file upload)

anjana -t delete

tools run RESET_ALL --yes

anjana -t insert

tools run LOAD_SAMPLE_DATA --param dataset=nativo --yes

anjana -t reset

tools run RESET_ALL --param restore=sample --param dataset=nativo --yes

anjana -t export-log

logs <service> --lines 5000

anjana -t uninstall

tools run UNINSTALL_PLATFORM --yes

Automatic configuration migration

In addition to the command-to-command equivalence, the installer can directly import the Ansible kit's configuration files and generate the initial configuration without repeating the process manually:

Method and path

Description

POST /api/import/ansible/preview

Uploads the kit files and returns the mapped configuration + warnings, without saving anything

POST /api/import/ansible/confirm

Same as preview, but persists the configuration and the detected credentials

The files are uploaded as multipart/form-data: allYaml and hostsYaml (from the Ansible kit) are mandatory; anjanauiYaml (the kit's anjanauihosts.yaml, with the apache/persistence/horus whitelists) is optional and, if included, maps those whitelists to the new Access Control.

Importing your own configuration (installer YAML)

Sibling routes to the previous ones, but for importing a configuration ALREADY exported from the installer itself (not a legacy Ansible kit):

Method and path

Description

POST /api/import/config/preview

Uploads the YAML exported by the installer and returns the mapped configuration, without saving anything

POST /api/import/config/confirm

Same as preview, but persists the configuration

The file is uploaded as multipart/form-data in the configYaml field. The Nexus URL and repository are never imported (they remain fixed); if the secrets store does not have a Nexus password configured, the response warns that the Credentials step still needs to be completed.