modernisation-platform
modernisation-platform copied to clipboard
Analyse ordering of instances
User Story
We would like to enhance the Instance Scheduler so that it can stop/start instances before other instances in a specific order. This is an important feature worthy some analysis and agreement with the team.
We could borrow the approach from Unix runlevels
and the Spring SmartLifecycle phase
(https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/SmartLifecycle.html#getPhase--). Borrowing this approach, we could introduce the tag instance-scheduling-phase
with an arbitrary integer value (0,1,2,3,4..N), which will specify the phase in which the instance will be stopped/started.
Instances with lower phase value will start first. Conversely, instances with higher phase value will stop first.
Each application might have its own requirements for ordering of instances. The number of phases is specific to the application logic. The phase in which a type of instance has to start is also specific to the application. Introducing an arbitrary phase number will offer the flexibility to cope with any application-specific ordering. The scope of the phase will be within the specific environment, such as nomis-development and nomis-test.
Absence of the tag instance-scheduling-phase
will imply a default phase. RDS instances will have default phase 0. EC2 instances will have default phase 1.
See also:
- https://user-guide.modernisation-platform.service.justice.gov.uk/concepts/environments/instance-scheduling.html
Definition of done
- [ ] An agreed approach with the team for configuration
- [ ] UR test OR added to continual research plan
Reference
This issue is stale because it has been open 90 days with no activity.
This issue is stale because it has been open 90 days with no activity.
we will close this if Nick Buckingham raises his similar, but more useful, ticket
This issue is stale because it has been open 90 days with no activity.
replaced by another ticket