RedHatInsights / insights-remediations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Insights Remediations

Insights Remediations is a generator of Ansible playbooks that remediate issues discovered by Red Hat Insights.

Insights Remediations supports the following types of remediations:

  1. Rule-based

    This remediation type is used by Insights. Templates from insights-playbooks repository are used. See project wiki for more details.

  2. CVE-based

    This remediation type is used by the Vulnerability application. A single generic template, which remediates the given set of CVEs by upgrading relevant packages, is used.

  3. Erratum-based

    This remediation type is used by the System Patch Manager application. A single generic template, which remediates the given set of erratum by upgrading relevant packages, is used.

  4. SCAP Security Guide (SSG)

    This remediation type is used by the Compliance application. Templates from SCAP Security Guide are used.

Documentation

Getting started

Prerequisities

  • node.js 16

Running the application locally

  1. docker-compose -f build/docker-compose.yml up
  2. open http://localhost:9002

Local development

  1. docker-compose -f build/docker-compose.yml up db
  2. docker-compose -f build/docker-compose.yml up redis
  3. npm ci
  4. npm run db:ims
  5. npm start
  6. open http://localhost:9002

To use the demo database seeder, prepend DEMO_MODE=true to each of the above commands.

Running tests

Database container has to be running as a prerequisite for tests:

docker-compose -f build/docker-compose.yml up db

To run the linter, unit and integration tests run:

npm run verify

To run a single test run:

npm test <path-to-test-file>

Configuration

Application configuration can be changed using environmental variables.

Troubleshooting

If your local database isn't updating, or it's not running as expected, run this command to remove old containers:

docker-compose -f build/docker-compose.yml rm -vf

Then, rebuild the image:

docker-compose -f build/docker-compose.yml build

Releases

Upon any change in the master branch the branch is tested, an image is built and deployed in CI and QA environments automatically. This process is controlled by the deployment Jenkinsfile.

The image can then be promoted to production using a Jenkins job. Use the git commit SHA as the REVISION when running the job.

Contact

For questions or comments join #platform-data-pipeline-standup at ansible.slack.com.

About


Languages

Language:JavaScript 98.8%Language:Groovy 0.4%Language:Shell 0.4%Language:Python 0.3%Language:Dockerfile 0.1%