![]() Sudo apt install ruby-all-dev (necessary required packages) Sudo apt-get install libxslt-dev libxml2-dev zlib1g-dev (necessary required packages) Sudo gem update –system (update bundler version before running it) Sudo apt install ruby-bundler (install the bundler package so I can call bundler command) Sudo -u postgres psql’ and then ‘alter user mradwan createdb Sudo -u postgres createuser mradwan (backup don’t use it) Sudo apt install postgresql postgresql-contrib Sudo apt-get update (update the repositories package URLs) Once I pushed my application to the Azure App Service, this will run Ruby on Rails migration, which will create the tables on Postgres Server on Azure, then I can access the application but in this time from the Azure Web App.įor more info about the rest of the step, see all the video…… Commands Then push my application Azure App service Set Azure App settings (Ruby on Rails environment variables for production)Īfter that, I will set some configuration in this Web App settings, which using the username and password I created with Postgres Server on Azure and use the name of the Postgres Server. So, I can push the application using Git command. ![]() Part of this creating is Git deployment enabled. Create Azure Service Plan and Web AppĪfter that, I will create Azure service plan, think of it as the infrastructure for the Web App, I will create the service plan with the basic pricing tier in a Linux container.Īfter that, I will create the Web App based on the created App service plan. After that, I will create a firewall rule for Postgres on Azure, this needed in order to be able to connect to Postgres Server on Azure.Īfter that, I will connect to Postgres Server on Azure from the local Linux machine, then create a database.Īfter that, I will create a deployment user which is just a username and passwords, that I will use them later for pushing my application to the Azure App Service using Git command. Tip ( Kubernetes cluster for beginner ) For more information about how to work with Kubernetes cluster and deploy it to Azure Kubernetes Service (AKS) and work with Azure Container Registry, see Kubernetes cluster for beginnerĪfter that, I will create the main resource group that will have the rest of the resources for our lab, the first component is to create a Postgres Server on Azure, I will use a username and password which I will use them later for configuring the connection string, which required to connect to the database. After that, migrate Postgres DB locally on the local database and then run the application. So, the first step is just to clone this repo from GitHub to my local VM, once I did that, I will start installing some library for Ruby on Rails, then the blunder to restore the packages for Ruby on Rails application. ![]() So, I can connect to the Linux machine using SSH, then install Postgres, then Ruby on Rails on the Linux machine that we connected using SSH.Ĭlone the sample application locally from GitHubĪfter that, we will use a sample application on GitHub, this sample application is a sample To-do list, which using Ruby on Rails and Postgres with a basic CRUD (create read update delete). I will install all the prerequisite, the first is Git on the Windows machine. Ruby on Rails and Postgres on Azure End-To-End Tutorial So it can run Ruby on Rails and Postgres DB application. ![]() So, you can get a better understanding of how to configure and prepare your client machine. So, in the first Resource Group, I will create 2 VMs, the main virtual machines that I will use in the demo. For example, you can choose to delete the entire Resource Group in one step later. The Resource Group is a logical container in which Azure resources like Web App, VMs and Storage Account are deployed and managed. The first step is to create the first Resource Group. In this post, we will see, how to build and deploy Ruby on Rails application, using Postgres DB on Azure App Service.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |