The packer template builds should be scheduled via the job-runner service. To do so we first need to extend the job runner architecture with a ScheduledJobs model that can be used to create new pending Jobs at the given times.
- Create a new Sequelize model/migration(s)
ScheduledJobs (id PK AUTOINCREMENT, schedule ???, command STRING). I am not sure what datatype schedule needs to be, perhaps STRING using cron-style schedules. This record will be read and when the schedule condition is met will create a "pending" Jobs record with the given command.
- A system is needed to convert the
ScheduledJobs to Jobs. This could be an extra step in the job-runner to, before checking for pending jobs, check for scheduled jobs whose conditions are met and queue them, then continue as normal
- Implement a
ScheduledJob for running the packer builds. This can use a Sequelize seed since all installations should include it.
- The
command used by the SheduledJob for the packer builds should read all of it's configuration from the database directly (reminder that job commands will have full access to the create a container environment and models). This can be used to read the Nodes model and use the API URL and keys for uploading.
- The
Nodes model may need extended to include defaultStorage which would be the storage that the container template would be uploaded to. In this case, the Nodes form will also need updated so administrators can configure that setting.
The packer template builds should be scheduled via the
job-runnerservice. To do so we first need to extend the job runner architecture with aScheduledJobsmodel that can be used to create new pendingJobsat the given times.ScheduledJobs (id PK AUTOINCREMENT, schedule ???, command STRING). I am not sure what datatype schedule needs to be, perhaps STRING using cron-style schedules. This record will be read and when the schedule condition is met will create a "pending"Jobsrecord with the given command.ScheduledJobstoJobs. This could be an extra step in thejob-runnerto, before checking for pending jobs, check for scheduled jobs whose conditions are met and queue them, then continue as normalScheduledJobfor running the packer builds. This can use a Sequelize seed since all installations should include it.commandused by theSheduledJobfor the packer builds should read all of it's configuration from the database directly (reminder that job commands will have full access to the create a container environment and models). This can be used to read theNodesmodel and use the API URL and keys for uploading.Nodesmodel may need extended to includedefaultStoragewhich would be the storage that the container template would be uploaded to. In this case, the Nodes form will also need updated so administrators can configure that setting.