Sitemap
Arjun PT

Arjun PT

DevOps engineer who love to share stories, ideas, projects, and perspectives on Technology

Azure App Service

5 min readJun 19, 2023

--

How to Build and deploy app service

  • Azure app service is the only cloud service which help to quickly and easily build web and mobile app for any platform and device
  • Fully managed platform so called a PAAS
  • it have powerful capabilities such as built in devops, continuous integration with visual studio team service and github, staging and production support, automatic patching

App type:
App service allow you to create the following app type from a single development experience

  1. web Apps: quickly create and deploy critical web app that scale with your business
  2. Mobile Apps: engage employees, partners and customers on any device at any time
  3. API Apps: easily build and consume cloud API’s
  4. Logic Apps: Automate the access and use of data across cloud without writing code
  5. serverless functions: function written by developer and executed without any dedicated hardware

Why web Apps:

  1. multiple language and framework
  2. Application template in azure marketplace: if we want to host wordpress
  3. Devops optimization. continuous delivery and continuous deployment
  4. test in production using deployment slots: testing can performed before moving to production
  5. Global scale with high availability
  6. Visual studio integration

How to create ?

Press enter or click to view image in full size
  • Domain will end with azurewebsite.net later we can change that to custom domain
  • Do we want to publish the code or we want to create a docker container image
  • code run time stack: we have nodeks ruby pho tomact .net with different version
  • we can go with any OS
  • Based on app service plan the cost will decide: dev/test, production, isolated, and we have many plan in each section with ssl, backup features and all
  • application insight: responsible for providing the insight like speed performance, from where the traffic coming from for monitoring purpose
Press enter or click to view image in full size

How to Deploy wordpress on Azure app service:

  • We will deploy the wordpress as a container
  • container is mostly based on alpine based with the webserver and php running on it
  • backend have azure mysql flexible server where we have access to database as it a fully managed database server
  • In the deployment it will create a azure front door
  • it have the integration with blob storage to store the media file and text contents
  • database is secured as it is deployed in private endpoint so not exposed outside
  • we can perform the database operation through phpmyadmin
  • Currently customer cannot create new wpsite on windows apps service as they have taken back the service so migrate to linux machine

Steps:

  1. create resource -> got to market place -> wordpress -> create
Press enter or click to view image in full size

2. We have to give the admin username and password while creating the wordrpress app service.

3. we have a different plans available for the wordpress deployment

Press enter or click to view image in full size

4. Once deployed we can access them using the appservice url

Press enter or click to view image in full size

5. we will get the the database name,password,cdn endpoint and everything from the configuration. we can update the domain name in the custom domain section and applicaiton insight can be used for monitoring purpose.

Press enter or click to view image in full size

6. we have the scale up and out function as well

Press enter or click to view image in full size

How to migrate wordpress to Azure VM:

  1. Install all-in-one-wp-migration plugin on onpremise server and activate it on wordpress
  2. export the media and database and file to system
  3. got to azure market place and search for wordpress and then create the vm
  4. loginto wordpress admin page
  5. we will get the usernam and password of admin from boot diagnostic logs
  6. install the all-in-one wp migration plugin and activate
  7. click on import and import the file after updating the maximum file upload size
  8. search for DNS zone and create the zone there
  9. update the NS in the domain registrar

Database creation:

Get Arjun PT’s stories in your inbox

Join Medium for free to get updates from this writer.

1. create reosurce group inside the subscription
2. got to market place and choose azure databse for mysql as it is the pass version
3. we have so many mysql options available choose appropraiate
4. we have flexible and single server option for the database. flexible is low cost and have maximum control with simolified developer experience
5. while creating the deployment of the flexible mysql server we have to give workload type such as (dev , prod ) , availablity zone , high avaialability, compute storage
6. click review nad deployed
9. create azure wordpress webapp service
10. got to configuration and click on the new application settings
11. add wordpess_DB_host and add the db host url then add the wordpress_db_user ,wordpress_db_password followed by thier value
12. we need to create the user and password by connecting to the database

Press enter or click to view image in full size

--

--

Arjun PT
Arjun PT

Written by Arjun PT

DevOps engineer who love to share stories, ideas, projects, and perspectives on Technology