CxSAST Reporting Manager Installation (Docker image)
Following is a step by step guide for installing the CxSAST Reporting Manager component as a Docker image.
Note
This is a Linux based image.
Installation steps
Download the CxSAST Reporting Docker image.
Load the CxSAST Reporting Docker image into your CxSAST Reporting host Docker.
docker image load --input <image filename>.tar
Configure the CxSAST Reporting settings using:
Docker .env file
The image provided receives multiple parameters via environment variables. To pass them to the container, create a
.env
file with key-value pairs using the following format:KEY=value
This file is then passed in the docker run command with the following option:
--env-file="<path to file>\vars.env"
A complete example is provided at the end of this guide.
Environment variables
o
CONNECTION_STRING
Required - Database connection string to a SQL Server.o
NUMBER_OF_PARALLEL_REPORTS
Default: 2 - Number of maximum reports processed in parallel.o
NUMBER_OF_RETRIES
Default: 3 - Number of maximum retries when processing a report request.o
REPORTS_EXECUTION_INTERVAL
Default: 2 - Number of seconds between polling of new report requests. oREPORTS_OUTPUT_PATH
Required - Output path for the generated reports.o
REPORT_RETENTION_PERIOD
Required - Number in days that reports will be stored in the system.o
REPORT_RETENTION_PERIOD_FORMAT
Required - Retention period format: D for days or H for hours.o
REPORTING_API_URL
Required - Endpoint for the client api (http://<reporting api address>:<port>).To startup the CxReportingService container, run the docker image with the following command:
docker run ` --env-file=<vars.env file path> ` -v ~/cx-reporting-service:<value of REPORTS_OUTPUT_PATH env var> ` --restart always ` cx-reporting-service:latest
Note
To deploy the Manager and Client API images using docker compose, refer to CxSAST Reporting Service Docker Compose Setup.
Example
The following is an example of installing CxSASTReportingService in the same machine as CxSAST:
docker run -p 5002:5002 ` -v ~/cx-reporting-service:/app/CxReports --env-file="/var/jenkins/workspace/reporting-service-validation_dev/pipelines/reporting-service/.env" ` cx-reporting-service:latest
The vars.env file is configured as follows:
CONNECTION_STRING=Data Source=10.32.1.117\SQLExpress;Initial Catalog=CxDB;Integrated Security=False;User ID=testuser;Password=testpassword;Pooling=True NUMBER_OF_PARALLEL_REPORTS=2 NUMBER_OF_RETRIES=3 REPORTS_EXECUTION_INTERVAL=10 REPORTS_OUTPUT_PATH=/app/CxReports REPORT_RETENTION_PERIOD=3