Important
|
This project is still in a very early stage, more to come |
Udash is an Updatecli backend application. Its mission is to visualize Updatecli pipeline report and to provide various insights such as Git repositories "update" state.
Pipeline Report
Updatecli can be configured to upload pipeline reports after each execution. The goal is to have a central place to visualize all pipelines for a specific project.
Insight
Insight reuse pipeline report to provide a visualization per theme such as the state for all dependencies for a specific git repository.
Still work in progress
The best way to discover Udash is to try it yourself. There is a docker compose example available in the demo directory.
Deploy Udash with the following steps:
-
Make sure you have Docker and Docker Compose installed.
-
Run
docker compose up -d
in the directorydemo
. -
Configure your browser to access Udash at
http://localhost:8080
. -
Run
updatecli udash login "http://localhost" --experimental
to configure Updatecli to upload reports to Udash. -
Then you can run any updatecli command (apply/diff) to start publishing reports to Udash
INFO: You may have to run docker compose restart server
if the postgresql database
wasn’t ready in time to receive connections when the Udash server started.
Don’t worry if you don’t have any Updatecli manifest yet, you can still try the demo by using the Updatecli policies used by this Git repository. For that you need Updatecli and GitHub access token to interact with the GitHub API.
You can run the following commands to configure Updatecli to use the policies defined in this repository:
-
export GITHUB_TOKEN=<your-github-token>
-
export GITHUB_ACTOR=<your-github-username>
-
docker login ghcr.io
to authenticate on the GitHub Container Registry for pullling Updatecli policies -
updatecli compose diff --experimental
to execute Updatecli policies defined in the fileupdatecli-compose.yaml
Udash application requires a postgresql database to store the various pipeline reports, and an oauth provider to handle authorization.
Postgresql Database
OAuth provider
The oauth provider must allow the PKCE flow.
-
Auth0 (tested)
-
GitHub Not supported yet
Udash must be configured via a configuration file, and some settings can be overridden by environment variables
Config File
The configuration file must be one of ["/etc/udash/config.yaml", "/.udash/config.yaml","/config.yaml"]
server:
auth:
# If mode is unset then authentication is disabled
mode: "oauth"
issuer: "auth0 auth URL"
audience: "udash URL"
database:
# uri defines the postgresql URI used to connect with its database
uri: "postgresql URI"
Environment
-
UDASH_AUTH_MODE: Enable authentication Accept value ["","none","oauth"]
-
UDASH_AUTH_ISSUER: Define oauth domain url require
UDASH_AUTH_MODE
set to "oauth" -
UDASH_AUTH_AUDIENCE: Define oauth audience require
UDASH_AUTH_MODE
set to "oauth" -
UDASH_DB_URI: Define the postgresql URI
Even though the Udash frontend is a client-side javascript application, it expects two configuration files that must exist in the public
directory.
-
config.js
const config = (() => {
return {
"OAUTH_DOMAIN": "updatecli.example.oauth.com",
"OAUTH_CLIENTID": "86FVLxxxxxxxxxxxxxxxxxx",
"OAUTH_AUDIENCE": "http://app.updatecli.io/api"
};
})();
config.js
is used by the frontend application for the login
-
config.json
{
"OAUTH_DOMAIN": "updatecli.example.oauth.com",
"OAUTH_CLIENTID": "86FVLxxxxxxxxxxxxxxxxxx",
"OAUTH_AUDIENCE": "http://app.updatecli.io/api"
}
config.json
is used by the Updatecli application to retrieve oauth setting when running:
updatecli login http://app.updatecli.io
Updatecli is expected to run as usual from CI environment.
But it must be authenticated before uploading any reports, by running:
updatecli login "https://app.updatecli.io" --experimental
Then any apply/diff command will upload pipeline reports
You can try Udash yourself by running the following steps:
Udash is composed of a Postgresql database, an Updatecli API, and an Updatecli Frontend.
Using Docker, you can start all services with the following command:
docker compose --file docker-compose.example.yaml up
Please keep in mind that no authentication is enabled in this example.
Udash is now available on udash.localhost
and the API on udash.localhost/api
Once Udash is running, you can configure Updatecli to upload reports to Udash by running:
updatecli udash login --api-url http://udash.localhost/api http://udash.localhost --experimental
-
❏ Versioned API endpoint
-
❏ Add tests
-
❏ Add sql linting check using sqlfluff
-
❏ Support paginationhttps://meet.google.com/vnj-momt-brs?authuser=0