rmetcalf9 / dockjob Goto Github PK
View Code? Open in Web Editor NEWJob scheduler designed for use in a docker container.
License: MIT License
Job scheduler designed for use in a docker container.
License: MIT License
Display new lines in output
It is possible for the browser to keep a cached version of the frontend application even though a newer backend is being run.
If as part of the container build process the version number was embedded into the webfrontend as a javascript constant the versions could be compared and a warning displayed to the user if the versions mismatch
Need to update replacements to take into account links like
Make settings sticky in same session so that switching in and out doesn't reset
Add sorting to the Job data services and reflect this by adding sorting to the frontend.
Clean up the readme files and update them to include screenshots of the program.
Make the datatable remember the last settings
When using dockJob in a container it is important to know what environment variables are available and how each one should be configured.
Create a document for these.
When we are using JWT tokens we should reset the cookie when the user logs out
Currently parameters with spaces don't work because I added an eval in.
I think adding a quote around the eval will fix this.
Create build process which will run all tests, and build the docker image.
When testing on my phone it is not clear to the user that something is happenning.
Add new auth type which supports JWT tokens
Portainer reports two deploy sections
Add a total count of jobs run to serverinfo
Implement a setting to give a number of days to keep logs around for
Needs to add sudo in front of the continuous test example
Needs to explain how to use run_app_developer whilst developing
Needs to explain how to inject test jobs into a running instance
Needs to explain how to run the quasar frontend to test the application
If the internal base path differs from the external one then the swagger.json file should be altered with the correct location.
dockJob/app/src/jobsDataAPI.py
Line 25 in 6bf5b19
At the moment the monthly mode can only run one set day of month. Allow it to run on mutiple days by specifying mutiple day of month values.
Some APIURL params are supplied without a trailing slash and others require a trailing slash.
Change these so they are consistent.
Currently normal user confirmation pops are red and styled the same as errors.
Change them to a better colour.
Job page should show only summary of command with the option to expand
Add next job to run box onto dashboard
Refer to Python Packaging users guide and split off common tasks into a separate package for re-usability.
https://www.pypa.io/en/latest/
When I have a scheduled task I get this error:
127.0.0.1 - - [09/Apr/2018 16:17:33] "GET /frontend/index.html HTTP/1.1" 200 -
10.0.0.28 - - [09/Apr/2018 16:17:35] "POST /api/jobs/bed06152-a2c9-40bf-a81e-5ac0cd5809a3/execution HTTP/1.1" 200 -
Executing (Execution name = ddsa)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/app/JobExecutor.py", line 232, in run
self.loopIteration(curDatetime)
File "/app/JobExecutor.py", line 217, in loopIteration
if from_iso8601(self.JobExecutions[curJobExecution].dateCompleted) < timeToPurgeBefore:
File "/usr/lib/python3.6/site-packages/baseapp_for_restapi_backend_with_swagger/utils.py", line 11, in from_iso8601
raise Exception('Error - Only conversion of utc times from iso8601 is supported')
Exception: Error - Only conversion of utc times from iso8601 is supported
Reconfigure sample compose file to configure kong to apply basic auth.
Get the basic Auth feature working. If basic auth is present app should show a login screen and use these credentials to access the service.
Getting lots of output:
tzutc()
tzutc()
tzutc()
tzutc()
tzutc()
Probably somewhere in thread loop
Do I want to count stats of passed and failed jobs and report on dashboard?
Should it be number of passed/failed in set time period?
Currently filtering is just a text search.
I would like to be able to filter on a particular field.
One use case is to search for failing jobs with ResultCode<>0
When the daily interval is selected the Sunday value is not read in and always assumed to be false.
This means that no jobs will run on Sundays.
Schedule executions when they are due
Job Name and Command should be editable
Submit to https://github.com/quasarframework/quasar-awesome#notification-settings when I get to version 1
Create a compose file which will host the image and put it behind a Kong API gateway.
At this stage with no auth
Include more detail
For jobs with a schedule it should be possible to disable/enable them
Dockjob needs to supply the user with endpoint url's as it is required by linking between the webapp, the API and the apidocs.
When embedding dockjob into a compose file the user endpoint URL's can be supplied but docker compose has no concept of variables so it is not possible to make a compose file that will work for both developers who are exposing the app via different URL's.
To get around this docker compose can be used to supply a config/secret option. This will generate a particular file in a directory with the config/secret value. I will make it possible to specify a DOCKRUN_USERHOSTFILE environment variable. If this variable is set the docker batch script will create an environment variable DOCKERRUN_USERHOST. It will then go through all environment variables starting with APIAPP_ and will evaluate them.
This will allow the compse file to contain something like the following:
secrets:
- userhostfilesecret
environment:
- DOCKERRUN_USERHOSTFILE=/run/secrets/userhostfilesecret
- APIAPP_APIURL=https://${DOCKERRUN_USERHOST}:5443/dockjobapi
- APIAPP_APIDOCSURL=https://${DOCKERRUN_USERHOST}:5443/dockjobapidocs/
- "APIAPP_APIACCESSSECURITY=[{\"type\": \"basic-auth-login-toget-jwttoken\", \"loginurl\": \"https://${DOCKERRUN_USERHOST}:5443/login/\", \"cookiename\": \"jwt-auth-cookie\" }]"
Note: I am not sure if a leading \ will be required before the $
The secret file has the host name but not the port. I have thought about repeating this for the port but I don't think it makes sense for my use case at the moment.
When using a JWT endpoint we currently just clear the token when we want to logout.
Instead we should send the service a logout call and have the token deleted from the backend so it can't be used. This would be more secure in case it is intercepted.
Once the login service implements this rmetcalf9/kong_ldap_login_endpoint#12 we should alter this code to support it.
It should be possible to adjust the job run schedule
Lines 7 to 12 in 39e0831
For development the headers are always present.
We need a way where these are removed in production
User interface improvement
At the moment the hourly mode can only run one time an hour. Allow it to run mutiple times per hour by specifying mutiple minute values.
Create an example stack that is deployable via portanier. This should use enviroment variables for the sample username and password, as well as host name.
https://portainer.readthedocs.io/en/stable/templates.html
documents how portainer environment variables can be described.
https://docs.docker.com/compose/compose-file/#variable-substitution
Refers to docker compose enviroment variables. I hope it applies to stack
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.