-
Notifications
You must be signed in to change notification settings - Fork 38
Add IOP #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IOP #280
Changes from all commits
08eeae0
f9d2e3f
ab0fe16
2b37129
cc9f852
3c168a5
8b27dda
8782742
6285f83
b3fd54f
897fcff
b2396e6
c9c7c18
ee8ef99
1d12445
cb76743
c1eb801
0b6fd04
bfc899e
c79f030
88cc56a
c1a797b
cb21596
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,16 @@ These base features control which plugins are enabled when a feature is requeste | |
|
|
||
| A deployment can have multiple base features enabled. | ||
|
|
||
| ### Enabling IOP | ||
|
|
||
| IOP (Insights Operating Platform) deploys on-premise Insights services for advisor, vulnerability, and remediation. It requires internal database mode and depends on the `rh-cloud` and `katello` features. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😆
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AI garbage aside, I'd prefer this be styled properly as |
||
|
|
||
| ```bash | ||
| ./foremanctl deploy --add-feature iop | ||
| ``` | ||
|
|
||
| See [IOP Architecture](iop.md) for details on the services deployed and configuration options. | ||
|
|
||
| ### Authenticated Registry Handling | ||
|
|
||
| If you need to pull images from private or authenticated container registries, you can configure registry authentication using Podman's auth file. | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to duplicate some of the information with the IoP Handbook https://vkrizan.github.io/foreman-iop-handbook/?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. I want to have some amount of local information to aid developers and AI with context. That being said, if you have a suggestion of how to balance that duplication or reference I am all ears. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally I would suggest to reference the existing documentation. However, since the iop-handbook is not yet "official" I am fine with keeping it as is. I would keep here details that are relevant to the installation or that are not found in the existing docs. AI could read the reference if the link would be accessible. Luckily the rspress, the static generator that the iop-handbook uses, has a support for llms that we could try to use. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| # IOP | ||
|
|
||
| IOP deploys the on-premise Insights services that provide advisor, vulnerability, and remediation capabilities integrated with Foreman. | ||
|
|
||
| ## Enabling IOP | ||
|
|
||
| Add `iop` to `enabled_features` in your flavor configuration. IOP requires internal database mode (`database_mode: internal`). | ||
|
|
||
| The `iop` feature depends on `rh-cloud`, which installs the `foreman_rh_cloud` plugin into Foreman and `katello` as a transitive dependency. | ||
|
|
||
| ## Architecture | ||
|
|
||
| IOP runs as a set of containerized services managed via podman quadlets on the `iop-core-network` (bridge, `10.130.0.0/24`). The gateway is registered as a Foreman smart proxy at `https://localhost:24443`. | ||
|
|
||
| ```mermaid | ||
| graph TB | ||
| subgraph Host["Host System"] | ||
| Foreman["Foreman<br/>(foreman_rh_cloud)"] | ||
| Apache["Apache httpd"] | ||
| PG[(PostgreSQL)] | ||
|
|
||
| subgraph Network["iop-core-network (10.130.0.0/24)"] | ||
| Kafka[Kafka] | ||
|
|
||
| subgraph Core["Core Pipeline"] | ||
| Ingress[Ingress] | ||
| Puptoo[Puptoo] | ||
| Yuptoo[Yuptoo] | ||
| Engine[Engine] | ||
| end | ||
|
|
||
| Gateway["Gateway<br/>:24443"] | ||
|
|
||
| subgraph Services["Application Services"] | ||
| Inventory["Inventory API<br/>:8081"] | ||
| Advisor["Advisor API<br/>:8000"] | ||
| Remediation["Remediation API<br/>:3000"] | ||
| VMAAS["VMAAS<br/>(reposcan + webapp)"] | ||
| Vuln["Vulnerability<br/>(8 containers)"] | ||
| end | ||
| end | ||
|
|
||
| subgraph Frontends["Frontend Assets (/var/www/iop)"] | ||
| AdvisorFE[Advisor Frontend] | ||
| VulnFE[Vulnerability Frontend] | ||
| end | ||
| end | ||
|
|
||
| Foreman -- "smart proxy<br/>relay" --> Gateway | ||
| Gateway --> Kafka | ||
| Apache -- "Alias" --> Frontends | ||
|
|
||
| Ingress --> Kafka | ||
| Puptoo --> Kafka | ||
| Yuptoo --> Kafka | ||
| Engine --> Kafka | ||
|
|
||
| Inventory --> Kafka | ||
| Inventory --> PG | ||
| Advisor --> Kafka | ||
| Advisor --> Inventory | ||
| Advisor -. "FDW" .-> PG | ||
| Remediation --> Advisor | ||
| Remediation --> Inventory | ||
| VMAAS --> PG | ||
| VMAAS --> Gateway | ||
| Vuln --> Kafka | ||
| Vuln --> Inventory | ||
| Vuln --> VMAAS | ||
| Vuln -. "FDW" .-> PG | ||
| ``` | ||
|
|
||
| ### Services | ||
|
|
||
| | Service | Container(s) | Port | Description | | ||
| |---------|-------------|------|-------------| | ||
| | kafka | `iop-core-kafka` | 9092 (internal) | Message broker (KRaft mode) | | ||
| | ingress | `iop-core-ingress` | 8080 (internal) | Upload ingestion endpoint | | ||
| | puptoo | `iop-core-puptoo` | - | Puppet/system facts processor | | ||
| | yuptoo | `iop-core-yuptoo` | - | Yum/package data processor | | ||
| | engine | `iop-core-engine` | - | Insights rules engine | | ||
| | gateway | `iop-core-gateway` | 127.0.0.1:24443 | nginx proxy, smart proxy relay to Foreman | | ||
| | inventory | `iop-core-host-inventory`, `iop-core-host-inventory-api` | 8081 (internal) | Host inventory with MQ consumer and REST API | | ||
| | advisor | `iop-service-advisor-backend-api`, `iop-service-advisor-backend-service` | 8000 (internal) | Advisor recommendations | | ||
| | remediation | `iop-service-remediations-api` | 3000 (host network) | Remediation playbook generation | | ||
| | vmaas | `iop-service-vmaas-reposcan`, `iop-service-vmaas-webapp-go` | - | Vulnerability metadata and advisory sync | | ||
| | vulnerability | 8 containers (manager, taskomatic, grouper, listener, evaluators, vmaas-sync) | 8443 (internal) | Vulnerability assessment pipeline | | ||
|
|
||
| ### Frontend Assets | ||
|
|
||
| Advisor and vulnerability frontend assets are extracted from container images and served by Apache: | ||
|
|
||
| - Assets are deployed to `/var/www/iop/assets/apps/{advisor,vulnerability}` | ||
| - Apache serves them via `Alias` directives in `/etc/httpd/conf.d/05-foreman-ssl.d/` | ||
| - Assets include gzip precompression support and 1-year cache headers | ||
|
|
||
| ### Databases | ||
|
|
||
| IOP creates five PostgreSQL databases, all accessible to containers via `host.containers.internal:5432`: | ||
|
|
||
| | Database | User | | ||
| |----------|------| | ||
| | `inventory_db` | `inventory_admin` | | ||
| | `advisor_db` | `advisor_user` | | ||
| | `remediations_db` | `remediations_user` | | ||
| | `vmaas_db` | `vmaas_admin` | | ||
| | `vulnerability_db` | `vulnerability_admin` | | ||
|
|
||
| Advisor and vulnerability services use PostgreSQL foreign data wrappers (FDW) to query the inventory database directly. | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Foreman Connection | ||
|
|
||
| Set in the playbook vars or inventory to match your Foreman deployment: | ||
|
|
||
| | Variable | Default | Description | | ||
| |----------|---------|-------------| | ||
| | `iop_core_foreman_url` | `https://{{ ansible_facts['fqdn'] }}` | Foreman server URL | | ||
| | `iop_core_foreman_admin_username` | `admin` | Foreman admin username | | ||
| | `iop_core_foreman_admin_password` | `changeme` | Foreman admin password | | ||
|
|
||
| ### Certificates | ||
|
|
||
| Gateway certificates are configured per certificate source: | ||
|
|
||
| **Default certificates** (`certificate_source: default`): | ||
| - Server: `/root/certificates/certs/localhost.crt` | ||
| - Client: `/root/certificates/certs/localhost-client.crt` | ||
| - CA: `/root/certificates/certs/ca.crt` | ||
|
|
||
| **Installer certificates** (`certificate_source: installer`): | ||
| - Server: `/root/ssl-build/localhost/localhost-iop-core-gateway-server.crt` | ||
| - Client: `/root/ssl-build/localhost/localhost-iop-core-gateway-client.crt` | ||
| - CA: `/root/ssl-build/katello-default-ca.crt` | ||
|
|
||
| ### Container Images | ||
|
|
||
| All IOP images default to `quay.io/iop/<service>:foreman-3.16`. Each role exposes `iop_<role>_container_image` and `iop_<role>_container_tag` variables to override. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| iop_advisor_container_image: "quay.io/iop/advisor-backend" | ||
| iop_advisor_container_tag: "foreman-3.18" | ||
| iop_advisor_registry_auth_file: /etc/foreman/registry-auth.json | ||
|
|
||
| iop_advisor_database_name: advisor_db | ||
|
ehelms marked this conversation as resolved.
|
||
| iop_advisor_database_user: advisor_user | ||
| iop_advisor_database_password: CHANGEME | ||
| iop_advisor_database_host: host.containers.internal | ||
| iop_advisor_database_port: 5432 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| - name: Restart advisor | ||
| ansible.builtin.systemd: | ||
| name: "{{ item }}" | ||
| state: restarted | ||
| loop: | ||
| - iop-service-advisor-backend-api | ||
| - iop-service-advisor-backend-service |
Uh oh!
There was an error while loading. Please reload this page.