{"id":13449307,"url":"https://github.com/microsoft/azure-redcap-paas","last_synced_at":"2025-04-06T21:15:22.667Z","repository":{"id":48475749,"uuid":"141514628","full_name":"microsoft/azure-redcap-paas","owner":"microsoft","description":"Automated deployment of REDCap with Azure Blob storage as the storage back-end","archived":false,"fork":false,"pushed_at":"2024-11-12T17:24:04.000Z","size":2734,"stargazers_count":29,"open_issues_count":34,"forks_count":62,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-03-30T19:09:23.809Z","etag":null,"topics":["arm-templates","azure","blob-storage","mysql","paas","php","redcap","storage"],"latest_commit_sha":null,"homepage":"","language":"Bicep","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-19T02:33:02.000Z","updated_at":"2025-03-26T22:46:16.000Z","dependencies_parsed_at":"2024-01-17T21:44:24.429Z","dependency_job_id":"79fb0a7f-beac-4595-968b-a46a2befc4ac","html_url":"https://github.com/microsoft/azure-redcap-paas","commit_stats":{"total_commits":86,"total_committers":10,"mean_commits":8.6,"dds":0.5930232558139534,"last_synced_commit":"ffa513054b4af87794ff4ad47842f14fb10822ee"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fazure-redcap-paas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fazure-redcap-paas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fazure-redcap-paas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fazure-redcap-paas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/azure-redcap-paas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550690,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm-templates","azure","blob-storage","mysql","paas","php","redcap","storage"],"created_at":"2024-07-31T06:00:35.280Z","updated_at":"2025-04-06T21:15:22.645Z","avatar_url":"https://github.com/microsoft.png","language":"Bicep","funding_links":[],"categories":["Cloud Deployment"],"sub_categories":[],"readme":"# REDCap Deployment on Azure\n\n## Overview\n\nThis repository provides you with the necessary resources and guidance to deploy the REDCap application on Microsoft’s Azure cloud platform. This allows you to leverage the power of cloud computing for your research data management needs.\n\nThis template automates the deployment of the REDCap solution into Azure using managed PaaS resources. The template assumes you are deploying a version of REDCap that supports direct connection to Azure Blob Storage. If you deploy an older version, deployment will succeed but you will need to manually provision NFS storage in Azure, and delete the new storage account. For NFS, consider:\n\n## Deployment Options\n\n- ### Manual deployment\n\n  - For manual deployment process, please navigate [***here***](manual.md)\n\n- ### CI/CD Deployment with GitHub\n\n  - Information pending\n\n- ### CI/CD Deployment with Azure DevOps\n\n  - Information pending\n\n## Details\n\nThis template automates the deployment of the REDCap solution into Azure using managed PaaS resources. The template assumes you are deploying a version of REDCap that supports direct connection to Azure Blob Storage. If you deploy an older version, deployment will succeed but you will need to manually provision NFS storage in Azure, and delete the new storage account. For NFS, consider:\n\n- \u003chttps://learn.microsoft.com/azure/azure-netapp-files/\u003e\n- \u003chttps://azuremarketplace.microsoft.com/marketplace/apps/softnas.buurst_nas\u003e\n- \u003chttps://learn.microsoft.com/samples/azure/azure-quickstart-templates/nfs-ha-cluster-ubuntu/\u003e\n\nTo deploy the REDCap source to Azure App Service, you must supply your REDCap Community site credentials. The deployment automation will use them to pull the REDCap source directly from the community site.\n\n\u003e NOTE: These values will be stored within the Azure App Service as configuration settings. Once your deployment has succeeded, you should navigate to your Azure App Service resource and delete or clear the values so that they aren't stored here.\n\n![Azure App Service](/images/app-settings.png)\n\n\u003chttps://projectredcap.org/wp-content/resources/REDCapTechnicalOverview.pdf\u003e\n\n- The template deploys the following:\n  - Azure Web App\n  - Azure DB for MySQL (1)\n  - Azure Storage Account\n  - Key Vault\n  - Private DNS zones\n  - Virtual Network\n  - Application Insights\n  \u003c!-- - (optional) SendGrid 3rd Party Email service (2) --\u003e\n\n(1) Review \u003chttps://learn.microsoft.com/azure/mysql/flexible-server/concepts-service-tiers-storage\u003e for details on available features, regions, and pricing models for Azure DB for MySQL.\n\nAdvanced deployments can enable high availability for the MySQL Flexible Server and availability zone redundancy for the MySQL Flexible Server and web app. These capabilities can be controlled using parameters for the Bicep deployment.\n\n\u003c!--(2) SendGrid is a paid service with a free tier offering 25k messages per month, with additional paid tiers offering more volume, whitelisting, custom domains, etc. There is a limit of two instances per subscription using the free tier. For more information see \u003chttps://docs.microsoft.com/en-us/azure/store-sendgrid-php-how-to-send-email#create-a-sendgrid-account\u003e. The service will be accessed initially using the password you enter in the deployment template. You can click \"Manage\" on the SendGrid service after deployment to administrate the service in their portal, including options to create an API key that can be used for access instead of the password.\n\nIf after deployment, you would instead like to use a different SMTP relay, edit the values \"smtp_fqdn_name\", \"smtp_port\", \"smtp_user_name\", and \"smtp_password\" to point to your preferred endpoint. You can then delete the SendGrid service from this resource group.\n\nIf you use Exchange Online (part of the Microsoft 365 Suite), you can follow these steps to set it up and use it as an SMTP relay for this service: \u003chttps://learn.microsoft.com/Exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365\u003e --\u003e\n\n## Setup\n\nThis template will automatically deploy the resources necessary to run REDCap in Azure using PaaS (Platform-as-a-Service) features.\n\n**IMPORTANT**: *The \"Workload Name\" you choose will be re-used as part of the storage, website, and MySQL database name. Make sure you don't use characters that will be rejected.*\n\nAfter the template is deployed, deployment automation will download the REDCap ZIP file you specify, and install it in your web app. It will then automatically update the database connection information in the app.\n\n\u003e NOTE: The database will not be initialized; therefore, REDCap will not be usable until then. See the [Post-Setup](#post-setup) section below on how to initialize the database.\n\nWith the download and unzipping of REDCap application, the entire operation will take between 12-16 minutes.\n\nIf you need to connect to the MySQL database using the MySQL client, you will need to deploy a Virtual Machine with Bastion or AVD to the virtual network to run the client.\n\nThe database user name defaults to `sqladmin` and the password is a random string of 25 characters. The password is stored in Key Vault.\n\n## Post-Setup\n\nAfter the deployment and installation of REDCap has completed, you will need to configure some database settings manually. The application gets deployed via Kudu which calls the `deploy.sh` script. After deployment, the `postbuild.sh` script will call REDCap's built-in capability to deploy the database schema. However, the configuration of the attachment storage to Azure Storage requires executing SQL statements that cannot be automated at this time. There is an `install.sh` file that contains the statements to be executed.\n\nOnce the source control deployment of REDCap has completed, you will need to SSH into the running container:\n\n![ssh](images/ssh.png)\n\nExecute the following command from the `/home` directory:\n\n```sh\nbash ./site/repository/scripts/bash/install.sh\n```\n\n![ssh](images/install.png)\n\nOnce you regain access to the console, you can navigate to the root of your app service and confirm everything shows green on the REDCap Configuration Check page - with the exception of CronJob status which you may have to manually invoke. If anything displays on that page in red or yellow, it is recommended that you perform a \"Restart\" of the Azure \"App Service\". This needs to be done due to the fact that some necessary server environment settings get changed after the initial deployment, but restarting the App Service will load the service with the intended settings.\n\n## Note about REDCap \"Easy Upgade\"\n\nThe \"Easy Upgrade\" feature in REDCap 8.11.0 and later is currently _not_ supported when deploying a REDCap instance on Azure. Support for \"Easy Upgrade\" on Azure is expected to come at a later time in a future REDCap release.\n\n## Resources\n\n- App Services overview\n  \u003chttps://learn.microsoft.com/azure/app-service/overview\u003e\n- Application Settings\n  \u003chttps://learn.microsoft.com/azure/app-service/configure-common?tabs=portal\u003e\n- Web Jobs (background tasks) overview\n  \u003chttps://learn.microsoft.com/azure/app-service/webjobs-create\u003e\n- Project Kudu (App Service back end management and deployment engine)\n  \u003chttps://github.com/projectkudu/kudu/wiki\u003e\n- Explanation of how isolation occurs in Azure Web Apps\n  \u003chttps://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox\u003e\n- Adding custom domain names\n  \u003chttps://learn.microsoft.com/azure/app-service/app-service-web-tutorial-custom-domain\u003e\n- TLS/SSL Certificates\n  \u003chttps://learn.microsoft.com/azure/app-service/configure-ssl-certificate\u003e\n- Updating PHP configurations\n  \u003chttps://learn.microsoft.com/azure/app-service/configure-language-php?pivots=platform-linux#customize-phpini-settings\u003e\n- MySQL Flexible Server overview\n  \u003chttps://learn.microsoft.com/azure/mysql/flexible-server/overview\u003e\n- SendGrid overview\n  \u003chttps://docs.sendgrid.com/for-developers/partners/microsoft-azure-2021\u003e\n- Blob storage overview\n  \u003chttps://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction\u003e\n- Azure Resource Manager (ARM) overview\n  \u003chttps://learn.microsoft.com/azure/azure-resource-manager/management/overview\u003e\n- Exchange Online SMTP Relay Configuration\n  \u003chttps://learn.microsoft.com/Exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365\u003e\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit \u003chttps://opensource.microsoft.com/cla/\u003e.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fazure-redcap-paas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fazure-redcap-paas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fazure-redcap-paas/lists"}