Upgrading of the AWS OpenEMR Cloud Standard hosted version?

I’m using the AWS OpenEMR Cloud Standard (hosted) version. What do I need to know about upgrading from say … 5.0.1(1) to 5.0.1(4)?
–RBL

1 Like

hi @Ralf_Lukner ,

See here for instructions on upgrading to most recent patch (note this patch is addressing a critical security vulnerability, so is highly recommended):
openemr-devops/packages/lightsail at master · openemr/openemr-devops · GitHub

@jesdynf ,
For this instruction set, we should now have a line after the sql_patch.php web browser call that removes the sql_patch.php from the docker (this is a new step I just added with this patch and the patches now include the sql_patch.php file itself).

-brady

I’m looking at the following instructions and I noticed that a parenthesis isn’t closed (see last line of this message). It’s been a while since I did much with un*x type OS’s … near the bottom of the snippet of the instructions is what appears to be text of a script … do I need to close this parenthesis on the last line? Should I save these instructions in some kind of script file and execute it or just execute it without the comments (#) from the command line:

Applying Upgrades and Security Patches
If you’re seeking to install a feature release (to upgrade from 5.0.0 to 5.0.1, for example), see our upgrade guide for the step-by-step process of replacing your OpenEMR container and updating your database. If instead you’re applying a sub-version patch for bug-fixes or security updates (like 5.0.1-3 to 5.0.1-4), walk through the following steps as root.

#!/bin/sh

PATCHFILE=5-0-1-Patch-4.zip
OE_INSTANCE=$(docker ps | grep _openemr | cut -f 1 -d " "

That’s annoying, hang on–

Yes, just close it. I’ve patched the docs; I don’t know I missed that. Thanks!

@brady.miller Are you saying I need to add a delete, or are you telling me it’s happening?

@jesdynf ,
basically will need this at the end:
docker exec -it $OE_INSTANCE rm sql_patch.php

This process fails on the second executable line:

ubuntu@ip-10-0-1-83:~$ ls -l
total 424
-rw-r–r-- 1 ubuntu ubuntu 429303 Aug 5 23:20 5-0-1-Patch-4.zip
-rw-rw-r-- 1 ubuntu ubuntu 1151 Jun 4 00:43 newphasems.csr
ubuntu@ip-10-0-1-83:~$ PATCHFILE=5-0-1-Patch-4.zip
ubuntu@ip-10-0-1-83:~$ OE_INSTANCE=$(docker ps | grep _openemr | cut -f 1 -d " ")
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.29/containers/json: dial unix /var/run/docker.sock: connect: permission denied

I was able to assign the OE_INSTANCE this way:

ubuntu@ip-10-0-1-83:/$ sudo docker ps | grep _openemr | cut -f 1 -d " "
4024c1c…

Then:

ubuntu@ip-10-0-1-83:/$ OE_INSTANCE=4024c1c…

Let’s see if that enables me to perform the rest of the script …

I was able to complete the 5.0.1(1) to 5.0.1(4) patch after my work-around on assigning the OE_INSTANCE as above.

Thank you!
–RBL

You need to run those steps as root, that’s correct. Did the document you were referring to not mention this?

Sticking “sudo” in front of the failed line did not work … it simply generated another error.

I had to specifically get the instance manually and then go from there.
–RBL

I guess I had to put “sudo” in front of “docker” to make it work… (inside the parentheses like this
OE_INSTANCE=$(sudo docker … ???

I’m not able to log into root with ubuntu … it makes you log in as ubuntu.

Not sure if this would work, but I’ll try it.
–RBL

hi @Ralf_Lukner, you could try sudo bash to start a root shell

Thank you. Sorry, I’m dusting off cobwebs when it comes to this stuff. I was able to work around it, but for the future, I now know how to run as “root”.
–RBL