Eolmanager
EOL Manager Integrations
Introduction
In Metaport, larger software components - typically associated with end-of-life dates - are known as a "Component". Examples might be Nginx, Laravel, Postgresql etc. By default, Metaport will attempt to query its own database for component records which it periodically fetches from a 3rd party API and will match them against incoming agent data. However, Metaport is also capable of iterrogating version control systems (VCS) such github and gitlab for components declared in Terraform files and Helm charts.
CI/CD pipelines are the ideal means to trigger this mechanism, but since agents are not used in this context, a qualifying payload is required instead which authenticates and authorizes a pipeline to "report in":
curl -X PUT \
-H "User-Agent: metaport-ci" \
-H "Content-Type: application/json"
-H "Authorization: Basic <token>" \
-d @./<payload>.json https://metaport.dev/api/v1/app/
Where the JSON payload has the following structure:
{
"format": "MetaportIngest",
"version": "1.0",
"data": {
"identifier": "c8a96227-3460-48cb-8a86-34a4b5c3283a",
"environment": "PROD",
"domain": "my-app.xyz",
"stack":"PHP/Composer",
"version": "1.2.3",
"source": "CI"
}
}
Tip
You can obtain the data needed for the identifier, environment, and domain keys from the "Developer Export" in each application's "App Centre".
Setup
Navigate to an applications' "Settings" area and expand the "EOL Source Settings" accordion.
Warning
API tokens need to be appropriately scoped with api and read permissions, but do not provide them with destructive permissions such as write or delete.
Metaport/Agent
No further configuration is necessary as Agent is the system-wide default. In this mode, data is received from an agent.
Terraform
Metaport will use the configured version control system (VCS) e.g. Github to interrogate a repository for the following files:
main.tfdata.tfvariables.tflocals.tfproviders.tfversions.tfcompute.tf
Info
The file-names listed above follow best-practice Terraform naming.
The settings are as follows:
- Ingestion System field: Select "Terraform"
- Version control system (VCS) field: Select your VCS e.g. "Github"
- Repository identifier field: Use the repository's name e.g.
myorg/myproject, an identifier, or a complete URL (for internally hosted repositories) - API Key or Token field: Use a personal access token generated in/by the selected VCS
Helm
Metaport will use the configured version control system (VCS) e.g. Github to interrogate a repository for Chart.yml|.yaml and values.yml|.yaml files.
The settings are as follows:
- Ingestion System field: Select "Helm"
- Version control system (VCS) field: Select your VCS e.g. "Github"
- Repository identifier field: Use the repository's name e.g.
myorg/myproject, a unique project identifier, or a complete URL (for internally hosted repositories) - API Key or Token field: Use a personal access token generated in/by the selected VCS