modernisation-platform icon indicating copy to clipboard operation
modernisation-platform copied to clipboard

Analyse ordering of instances

Open gfou-al opened this issue 2 years ago • 4 comments

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

How to write good user stories

gfou-al avatar Nov 08 '22 14:11 gfou-al

This issue is stale because it has been open 90 days with no activity.

github-actions[bot] avatar Feb 07 '23 01:02 github-actions[bot]

This issue is stale because it has been open 90 days with no activity.

github-actions[bot] avatar Sep 10 '23 01:09 github-actions[bot]

we will close this if Nick Buckingham raises his similar, but more useful, ticket

SimonPPledger avatar Oct 26 '23 10:10 SimonPPledger

This issue is stale because it has been open 90 days with no activity.

github-actions[bot] avatar Jan 25 '24 01:01 github-actions[bot]

replaced by another ticket

SimonPPledger avatar Mar 28 '24 10:03 SimonPPledger