dad

command module
v0.0.0-...-f07dfbc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

README

Deployment Analytics Dashboard

Build Status Docker Automated buil Go Report Card Code Coverage Dependencies Status Dev Dependencies Status

Development

Tools and dependencies:

Don't forget to add $GOPATH/bin to your $PATH

Get the dependencies

npm install
govendor sync

Run a MongoDB database

docker run --name mongo -p 27017:27017 -v /data/mongo:/data/db -d mongo

Specify the server configuration

DAD requires a LDAP configuration. You can write a ~/.dad.toml file with the following settings:

[server]
mongo-addr = "localhost:27017"

[auth]
jwt-secret = "enter a unique pepper here"

[ldap]
address = ""
baseDN = ""
bindDN = ""
bindPassword = ""
searchFilter = ""

[ldap.attr]
username = ""
firstname = ""
lastname = ""
realname = ""
email = ""

[docktor]
addr = "http://<DocktorUrl>/#!/"
user = "<DocktorUsername>"
password = "<DocktorPassword>"

[tasks]
recurrence = "@every 20m"
recurrence.update.progress = false

You can see all the available settings with:

go run main.go serve --help

Note: DAD allows three methods for the configuration:

  • Use a config file as described above
  • Use environment variables (server.mongo.addr becomes DAD_SERVER_MONGO_ADDR)
  • Use CLI parameters (--server.mongo.addr)

Run the project

Run DAD in dev mode, with live reload, with the command:

npm start

You can then browse http://localhost:8080/

Populate the database with data

You can use the shell scripts in bin/. The scripts use CSV files. The format of these files is described in the shell scripts.

Production

You can generate the binaries with:

npm run dist

The relevant files are in the dist folder.

Run deployment analytics job

In order to run the routine to analyses which functional services of projects are deployed or not, you can POST a request to the endpoint API /api/admin/jobs/deployment-indicators with an admin account.

Every project with Docktor URL will be updated with data from Docktor.

This kind of routine is also executed at regular time (default to 23:00 everyday, can be overridden with --tasks-recurrence option)

License

See the LICENSE file.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL