Skip to main content
Version: ACE 5

Versioning CLI

Deprecated

Versioning CLI is deprecated and replaced by ACE CLI

This is the documentation for deprecated versioning CLI tool which is no longer available since ACE version 5.31.0. It is recommended to follow the migration guide if you are still using file deployment instead of mongo DB based deployment.

Migrating to ACE CLI

info

Since ace-versioning is removed (since 5.31.0), migrating is required to keep deployment up to date. There is no guarantee that earlier versioning image will continue working with future releases of ACE.

Updating the extended versioning image:

Extended image
-FROM euadigportalcoredev02acr.azurecr.io/ace-versioning:${ACE_VERSION}
+FROM euadigportalcoredev02acr.azurecr.io/ace-deployment-server:${ACE_VERSION}

COPY src/ace /var/workspace

-CMD ["ace-versioning", "sync-scheduler"]
+CMD [ "ace-cli", "deploy", "schedules", "--folder", "/var/workspace" ]

Versioning CLI

ACE 5 has versioning CLI which has below functionalities

  1. Scheduler deployment
  2. Clear redis database cache

Installation

Versioning CLI is provided as docker image which should be deployed next to other ACE services. Docker image contains ace-versioning command which can be executed either as Docker command passed from pipeline or manually from running container.

Container name

  • ace-versioning

The configuration options are defined here ACE Versioning

Usage

Installing schedulers

Below are the details of cli command sync-scheduler

 ace-versioning sync-scheduler -h <value> -p <value> --redisPrefix <value> --workspacePath <value> --workspaceRoot <value> [-u <value>] [-c <value>]
FLAGS
  -c, --redisPassword=<value>  (env: SCHEDULER_REDIS_PASSWORD) redis password
-h, --redisHost=<value> (required) (env: SCHEDULER_REDIS_HOST) redis host
-p, --redisPort=<value> (required) (env: SCHEDULER_REDIS_PORT) redis port
-u, --redisUser=<value> (env: SCHEDULER_REDIS_USER) redis username
-t, --redisTlsEnabled=<value> (env: SCHEDULER_REDIS_TLS_ENABLED) redis tls enabled flag
-k, --redisTlsKey=<value> (env: SCHEDULER_REDIS_TLS_KEY) redis redis tls key
-r, --redisTlsCert=<value> (env: SCHEDULER_REDIS_TLS_CERT) redis tls cert
-s, --redisTlsCa=<value> (env: SCHEDULER_REDIS_TLS_CA) redis tls ca
--redisPrefix=<value> (required) [default: bull] (env: SCHEDULER_REDIS_PREFIX) prefix to be used by installed jobs
--workspacePath=<value> (required) (env: WORKSPACE_MOUNT_PATH) path to ace workspace
DESCRIPTION

Synchronizes scheduler jobs with REDIS instance. This will stop and remove any existing jobs and replace them with all scheduler jobs which are marked 'enabled'. If required flags are not provided, command will try to retrieve settings from environmental variables.

EXAMPLES
  $ ace-versioning sync-scheduler

Example

Another option is to extend CLI docker image and copy ACE workspace files to docker image.

This approach allows to build image with given ACE workspace version.

Assuming that ACE workspace is in folder ace.

FROM euadigportalcoredev02acr.azurecr.io/ace-versioning:${VERSION}

COPY src/ace /var/workspace

CMD ["ace-versioning", "sync-scheduler"]

Clearing redis cache

Below are the details of cli command clear-redis-cache

USAGE
  $ ace-versioning clear-redis-cache -h <value> -p <value> -c <value> [-u <value>] [-a <value>] [-d <value>]
FLAGS
  -a, --redisPassword=<value>  (env: REDIS_CACHE_KEY) redis password
-c, --redisPrefix=<value> (required) [default: ace-cache] (env: REDIS_KEY_PREFIX) prefix to be used by installed jobs
-d, --redisDb=<value> (env: REDIS_CACHE_DB) redis db
-h, --redisHost=<value> (required) (env: REDIS_CACHE_HOST) redis host
-p, --redisPort=<value> (required) (env: REDIS_CACHE_PORT) redis port
-u, --redisUser=<value> (env: REDIS_CACHE_USER) redis username
-t, --redisTlsEnabled=<value> (env: REDIS_CACHE_TLS_ENABLED) redis tls enabled flag
-k, --redisTlsKey=<value> (env: REDIS_CACHE_TLS_KEY) redis redis tls key
-r, --redisTlsCert=<value> (env: REDIS_CACHE_TLS_CERT) redis tls cert
-s, --redisTlsCa=<value> (env: REDIS_CACHE_TLS_CA) redis tls ca
DESCRIPTION

Clears cache from redis database

EXAMPLES
  $ ace-versioning clear-redis-cache

Example

Extend CLI docker image. Assumes all the configuration options are defined.

FROM euadigportalcoredev02acr.azurecr.io/flow-versioning-cli:<VERSION>

CMD ["ace-versioning", "clear-redis-cache"]

Commands

ACE CLI for versioning, use via command 'ace-versioning'

USAGE
$ ace-versioning [COMMAND]

COMMANDS
autocomplete display autocomplete installation instructions
clear-redis-cache Clears cache from redis database
help Display help for ace-versioning.
sync-scheduler display help for command