Create a Java API library which gives complete access and control over Shepherd via a lovely Java API.
List all apps
Read app configuration (will be stored as json project definition file since it's not really viable to parse the app configuration from existing kubernetes yaml files).
give access to running app logs via docker/kubernetes
memory/cpu stats of the app
memory/cpu stats of the host machine
access to app build logs downloaded from Jenkins. Perhaps last 100 lines for now, depending on whether we'll access the build logs from the FS or via some Jenkins REST API.
access to build metadata - list of builds, datetime started, outcome, logs, ...
Maybe support for adding/editing a project:
Only basics can be specified: app name, max memory (maxes at 512mb), env variables, whether it uses PostgreSQL or not, maybe build args, checkbox for redirect rewriting #18 .
On create/save, the library would create a json project definition file, and would generate/overwrite the kubernetes yaml, apply it (don't forget to delete old rules, e.g. if PostgreSQL is unchecked). Will also create/modify Jenkins job.
Idempotent/error-resilient: e.g. if it fails in the middle then rerunning the same action should succeed.
Maybe add support for custom additional kubernetes yaml config
A Shepherd Admin will use this library; maybe a CLI tool at the beginning, and later a Vaadin UI tool. Vaadin UI may run outside of Kubernetes or from within Kubernetes - investigate both options. Maybe simpler is to start with the outside of Kubernetes for now, since shepherd scripts are also designed to run from outside ot Kubernetes.
To ease the development of Shepherd Admin, the library should also work with fake backend, where everything would be faked - kubernetes, jenkins, projects. The library will not even access the filesystem (or perhaps create a dummy one in /tmp ).
If the Admin runs outside of Kubernetes then https may be tricky. But that might be solvable by some clever kubernetes ingress rule somehow "breaking out of kubernetes" and redirecting to an app running on host. But that's for later.
Create a Java API library which gives complete access and control over Shepherd via a lovely Java API.
A Shepherd Admin will use this library; maybe a CLI tool at the beginning, and later a Vaadin UI tool. Vaadin UI may run outside of Kubernetes or from within Kubernetes - investigate both options. Maybe simpler is to start with the outside of Kubernetes for now, since shepherd scripts are also designed to run from outside ot Kubernetes.
To ease the development of Shepherd Admin, the library should also work with fake backend, where everything would be faked - kubernetes, jenkins, projects. The library will not even access the filesystem (or perhaps create a dummy one in
/tmp
).If the Admin runs outside of Kubernetes then https may be tricky. But that might be solvable by some clever kubernetes ingress rule somehow "breaking out of kubernetes" and redirecting to an app running on host. But that's for later.