Deploying OpenEMR on Azure
Published Feb 13 2023 01:11 PM 3,219 Views
Microsoft

Open EMR Deployment

 

Below is a detailed guide to installing OpenEMR Leveraging Azure Web Apps + Database. This walkthrough will guide you in:

  • Creating the Web App + Database
  • Downloading the OpenEMR Source Code
  • Deploying the Source to your Azure Web App
  • Running the database installScript from a command prompt
  • Video Demonstration - https://youtu.be/rhRzC28nI7g

Not an Azure customer yet? Click here to sign up and get $200 in free Azure credit.

 

  1. Browse to the Azure Portal and select “Create a Resource”
    DavidMGinn_0-1676322233940.png

 

  1. Search for and select “Web App + Database
”
    DavidMGinn_1-1676322233947.png

 

  1. Click “Create”
    DavidMGinn_2-1676322233951.png

 

  1. Complete the form (UPDATE- we are now using PHP 8.2 and OpenEMR 7.0.2) and click “Review and Create”
    DavidMGinn_3-1676322233956.png

 

  1. Review Settings - be sure to capture username / password for your database for later use, and then click “Create”
    DavidMGinn_4-1676322233959.png

 

  1. Wait for deployment to complete and click “Go to resource”
    DavidMGinn_5-1676322233962.png

 

  1. Download openemr-7.0.2.zip from here: OpenEMR 7.0.2 Windows Installation
  2. Extract and open the extracted folder within Visual Studio Code
  3. Ensure that the Azure App Service Extension is installed in Visual Studio Code
    DavidMGinn_6-1676322233964.png

 

  1. In the Azure Portal, browse to the resource group that was chosen as part of your deployment and find the “Azure Database for MySQL flexible server” resource
    DavidMGinn_7-1676322233966.png

  2. *UPDATE* - Select the "Server parameters" blade, choose "All" and search for "sql_generate_invisible_primary_key". Set its value to "OFF". Click the Save button.
    pjirsa_1-1706033218326.png

  3. Select the “Networking” blade under the “Settings” section, and click “Download SSL Certificate”
    Screenshot 2023-10-27 at 10.05.18 AM.png

  4. Open Visual Studio Code and copy the downloaded certificate into the “/sites/default/documents/certificates” folder and rename it to “mysql-ca” with no file extension
    DavidMGinn_9-1676322233970.png

  5. Within Visual Studio Code, navigate to “/contrib/util/installScripts/InstallerAuto.php “ and comment out the “exit;” statement on line 78, then save the file
    DavidMGinn_10-1676322233970.png

  6. Select the Azure icon in Visual Studio Code. You may need to sign-in at this stage. Once you’ve signed in, expand the Azure Subscription and App Services and look for the App Service you created in Step 5.
    DavidMGinn_11-1676322233971.png

  7. Right click on the desired App Service, and click “Deploy to Web App”
    DavidMGinn_12-1676322233972.png

  8. Select the source folder you wish to deploy. By default this will be the current folder open in Visual Studio Code
    DavidMGinn_13-1676322233973.png

  9. Click “Deploy”

    DavidMGinn_14-1676322233974.png

  10. Open the output window to view the progress. This may take some time
    DavidMGinn_15-1676322233975.png
    DavidMGinn_16-1676322233976.png

  11. Upon successful completion, browse back to the selected Resource Group, and select your App Service
    DavidMGinn_17-1676322233978.png

  12. Select “SSH” Under “Development Tools”, and click “Go ->”
    DavidMGinn_18-1676322233980.png

  13. Navigate to the installScripts folder using the command “cd site/wwwroot/contrib/util/installScripts"
    DavidMGinn_19-1676322233981.png

  14. Execute the command “php -f InstallerAuto.php server=<server-name> loginhost=% root=<username> rootpass=<password> login=<openemr-db-user> pass=<openemr-db-pass>” using the username noted in step 5 for “root” and password noted in step 5 for "rootpass" and a username and password of your choosing for “openemr-db-user “openemr-db-pass”. You may optionally include any of the parameters located on lines 84-102 of “installerAuto.php” if you wish to change any settings from their defaults. For a production installation, it is recommended to change any username and password settings from their default value.

    You can obtain the server name by browsing to your resource group and clicking the Azure Database for MySQL flexible server resource and copying the “Server name” property
    DavidMGinn_20-1676322233984.png

    DavidMGinn_21-1676322233986.png
    DavidMGinn_22-1676322233989.png

  15. Execute the above command, it will take some time to complete.

Once this command completes and returns to the command prompt, you may close the SSH browser tab to return back to your Azure Web App

  16. Select the “Overview” blade and click the “URL” to browse to your site.
    DavidMGinn_23-1676322233992.png

  17. If your install was successful, you will see the OpenEMR Login Screen. By default, the username is “admin” and password is “pass” unless these were changed when running the install command from step 23.
    DavidMGinn_24-1676322233994.png


  18. Congratulations! You have successfully installed OpenEMR on Azure!
    DavidMGinn_25-1676322233999.png

Walkthrough Video Demonstration

 

 

5 Comments
Version history
Last update:
‎Jan 23 2024 10:29 AM
Updated by: