Deploy
The qaskx-cli generate deploy command is used to generate the deploymet configuration
files for a service.
The service is defined in the rediOps devops.json file as a reference to an OpenAPI specification. Loading the OpenAPI specification file allows the generator to understand the routes of the service and generate the corresponding deploy configuration file.
The deploy formats understood by the generator can be listed with the
command qaskx-cli gen deploy --template=*list.
The deployment templates include traefik and kong gateway formats, but there is nothing stopping you from creating new templates for other gateways.
The command help is shown below.
Usage: qaskx-cli generate deploy [-d=<Devops file path> | -s=<openAPI file>] [-t=<template folder>] [-o=<output>] [--token=<value>] [--overwrite] [--refresh] [-v | --vv | --vvv | --silent] [-c=<conf file>] [--colourCLI] [--offline] [--env=<environment file>]
The generate deploy command creates deployment files for a service. The definition file will be
based on the format supplied.
The format is linked to a template for the deployment type.
You can specify a format or a template.
The template uses the OpenAPI, rediOps, qaskx definition and local .qaskx definition as sources
of variables.
For more details see the documentation at https://docs.qaskx.one/qaskx-cli/cmd/generate/deploy/ .
Options:
-d, --devops rediOps (devops.json) file path or HTTP resource
-s, --spec OpenAPI/AsyncAPI file to parse for extraction
-o, --output Output directory for generated code
--overwrite Overwrite existing file(s)
--refresh Force refresh of templates
-t, --template Template local directory or VCS server resource (env $QASKX_TEMPLATE_FOLDER)
--token VCS access token (env $QASKX_VCS_TOKEN)
-v, --verbose Verbose logging
--vv Verbose logging level 3
--vvv Verbose logging level 5
--silent Silent running
--colourCLI Colour terminal and command line (env $QASKX_COLOUR_CLI)
-c, --conf Configuration file (env $QASKX_CONFIG_FILE)
--offline Offline mode (env $QASKX_OFFLINE)
--env Environment file to use (default ".env")
Example
Executing the below code will display the cofiguraton for a traefik gatewway for the PetStore OpenAPI specification
qaskx-cli generate deploy --template traefik --spec https://petstore3.swagger.io/api/v3/openapi.jsonThe output to console will be something like:
Example
An example execution command and result is shown below