Bull 2864
https://jira.il2.dso.mil/browse/BULL-2864
Description
Given the data available from prometheus, which is currently:
https://launchboard.staging.dso.mil/api/status/http/mission-app/[mission-app-name] https://launchboard.staging.dso.mil/api/status/http/dsop design and implement the necessary database schema changes to support supplying the necessary data to the FE via API.
This should also include updating https://repo1.dso.mil/platform-one/party-bus/launchboard/launchboard-be/-/blob/master/src/commands/fetch-status.js to populate the LB database.
Acceptance Criteria
- Launchboard DB is populated with status data.
Helpful Stuff For Testers
Prerequisites:
- You must be in these Keycloak groups
/Party Bus Limited Access/Dev (CAC Required)/MDO-roles/admin-routes
/Party Bus Limited Access/IL4/DSOP-roles/admin-routes
- Ask @jaredshue or @graham.smith for the HTTPS certificates required to perform the TLS handshake w/ the prometheus instances
- You must be connected to Appgate in order to communicate w/ the prometheus instances
Create a config file for testing:
cat <<EOF > ~/Downloads/prometheus.json
{
"instances": [
{
"baseUrl": "https://prometheus-preprod.admin.dso.mil",
"apps": [
{
"id": "gitlab",
"namespace": "gitlab",
"name": "Gitlab",
"url": "https://localhost"
},
{
"id": "mattermost",
"namespace": "mattermost",
"name": "Mattermost",
"url": "https://localhost"
},
{
"id": "jira",
"namespace": "jira",
"name": "Jira",
"url": "https://localhost"
},
{
"id": "confluence",
"namespace": "confluence",
"name": "Confluence",
"url": "https://localhost"
}
],
"https": {
"rejectUnauthorized": false,
"caPath":"$HOME/Downloads/launchboard-prometheus-certs/prometheus-preprod.admin.dso.mil/ca-chain.crt",
"certPath":"$HOME/Downloads/launchboard-prometheus-certs/prometheus-preprod.admin.dso.mil/lb.crt",
"keyPath":"$HOME/Downloads/launchboard-prometheus-certs/prometheus-preprod.admin.dso.mil/lb.key"
}
},
{
"baseUrl": "https://prometheus-mdo-test-il2.admin.dso.mil",
"apps": [
{
"id": "kubecost",
"namespace": "kubecost",
"name": "Kubecost",
"url": "https://localhost"
},
{
"id": "minio",
"namespace": "minio",
"name": "Minio",
"url": "https://localhost"
}
],
"https": {
"rejectUnauthorized": false,
"caPath":"$HOME/Downloads/launchboard-prometheus-certs/prometheus-mdo-test-il2.admin.dso.mil/ca-chain.crt",
"certPath":"$HOME/Downloads/launchboard-prometheus-certs/prometheus-mdo-test-il2.admin.dso.mil/lb.crt",
"keyPath":"$HOME/Downloads/launchboard-prometheus-certs/prometheus-mdo-test-il2.admin.dso.mil/lb.key"
}
}
]
}
EOF
Set required environment variables:
export MYSQL_DB_NAME=launchboard
export MYSQL_DB_ADMIN_USER=lb
export MYSQL_DB_ADMIN_PASSWORD=lb
export MYSQL_HOST=localhost
export MYSQL_PORT=4306
Run the command:
npx babel-node ./src/infrastructure/commands/create-dsop-app-status-updates.js $HOME/Downloads/prometheus.json
Edited by Jared Shue