healthlocker / oxleas-adhd

https://focus.headscapegreenwich.co.uk/
8 stars 0 forks source link

Add script to restart Oxleas app if production server ever reboots #289

Closed RobStallion closed 5 years ago

RobStallion commented 6 years ago

Relates to HL #1148.

RobStallion commented 6 years ago

Script has been written on the prod server but have not been able to test that it is working yet as we would need to temporarily take the production site down.

@katyedwards is checking with Oxleas when the best time for us to test this would be.

katyedwards commented 6 years ago

@RobStallion Tuesday 6th during the day would be good please - the clinical team are off.

katyedwards commented 6 years ago

No news from Matt on whether/ when he can restart the server, but can you still do your bit to test at least? @RobStallion

RobStallion commented 6 years ago

Yeah that is not a problem @katyedwards. I will give it a go in the next 30 minutes or so and will update the issue accordingly.

RobStallion commented 6 years ago

Taking the oxleas live site down

RobStallion commented 6 years ago

Started the oxleas live site using the service file. Seems to be working as expected.

RobStallion commented 6 years ago

Site appears to be running as expected. Going to stop the app running now and run the following...

systemctl enable app_name.service

This should allow the application to be started when the server boots up.

RobStallion commented 6 years ago

Created symlink from /etc/systemd/system/multi-user.target.wants/oxleas.service to /lib/systemd/system/oxleas.service.

Everything appears to be working as expected.

@katyedwards All that is left is for SLaM to reboot the server at some point to test this.

reddog commented 6 years ago

@RobStallion Just to check, where you've put /lib/systemd/system/oxleas.service did you mean /etc/systemd/system/oxleas.service ?

Were you waiting for Matt to be available in case anything unexpected went wrong or something else? You should be able to restart the server with sudo reboot

reddog commented 6 years ago

@RobStallion Can you include the service script in the repo and update the documentation? Similar to https://github.com/healthlocker/healthlocker/issues/1148#issuecomment-361966911

Sorry, I missed this: https://github.com/healthlocker/oxleas-adhd/issues/291

RobStallion commented 6 years ago

@reddog /lib/systemd/system/oxleas.service is the correct file path.

If SLaM are happy for me to reboot the server the way you suggested then I would be happy to give it a go 👍

katyedwards commented 6 years ago

@RobStallion either way leave it til Weds and the support day then we can hopefully find out from SLaM what is happening!

katyedwards commented 6 years ago

Waiting for confirmation from SLaM that they are happy for us to proceed with restarting the server.

katyedwards commented 5 years ago

Tested I believe