fbpx

In this hands-on lab, you will migrate an on-premises based help desk application called OsTicket, to Azure. This will be a two-phase project to lift-and-shift the application into Azure IaaS and then migrate it to Azure PaaS. The application is Linux based using Apache, PHP and MySQL (LAMP). During the process of these phases, you will ensure zero data loss.

By the end of the hands-on lab you will be better able to configure Linux VMs and VM Scale Sets in Azure for availability, storage, and connectivity. You will also be better prepared to migrate data from on-premises to Azure, establish connectivity between multiple regions and on-premises to Azure. You will also learn how to deploy and scale applications to Azure Web Apps on Linux.


Abstract and Learning Objectives

In this hands-on lab, you will migrate an on-premises based help desk application called OsTicket, to Azure. This will be a two-phase project to lift-and-shift the application into Azure IaaS and then migrate it to Azure PaaS. The application is Linux based using Apache, PHP and MySQL (LAMP). During the process of these phases, you will ensure zero data loss.

By the end of the hands-on lab you will be better able to configure Linux VMs and VM Scale Sets in Azure for availability, storage, and connectivity. You will also be better prepared to migrate data from on-premises to Azure, establish connectivity between multiple regions and on-premises to Azure. You will also learn how to deploy and scale applications to Azure Web Apps on Linux.

Linux Lift and Shift Hands-on Lab - Microsoft Cloud Workshop 1
Microsoft Cloud Workshop

Azure Services and Related Products

Here’s a list of the technologies within Microsoft Azure, including related products, that are used within this hands-on lab.

  • Azure Virtual Machines (VMs)
  • Azure Portal
  • Azure CLI
  • Azure App Services on Linu
  • Azure Database for MySQL
  • Azure Resource Manager (ARM) Templates
  • MySQL Workbench

Overview

Fabrikam Global Manufacturing & Operations Corporation, based in Japan, provides product design, manufacturing, and repair services of domestic individual or industrial electronics, as well as global support for their customers.

To avoid any impact from restructured support operations, executives decided to migrate on-premises customer support systems into Microsoft Azure. The hope is that running Linux VMs on Azure should enable Fabrikam to lower costs while sustaining or even increasing availability of the application.

  • Phase I: Lift and shift the application from on-premises to Azure IaaS using an auto scaling Virtual Machine Scale Set and a MySQL cluster with 3 nodes.

  • Phase II: Migrate to PaaS using Azure App Services with a Linux Docker Container and Azure Database for MySQL.

Phase I will result in an environment resembling this diagram:

The Phase I diagram has two Resource Groups, which are connected by VNet Peering. The first Resource Group is MySQLVNet, and has MySQL, Bitnami, and Linux. The second Resource Group is OsticketVNet, and has Linux, Apache, PHP, and Osticket.

Phase II will result in an environment resembling this diagram:

The Phase II diagram has /OsTicket with an arrow pointing to a Resource Group containing Linux, Docker, osTicket, a web client, and MySQL.

Before the Hands-on Lab Setup Guide

Before you go on through the full Linux Lift and Shift Hands-on Lab, please go through these initial setup steps. These will setup the environment that you will need to run through the Hands-on Lab. This setup process should take you approximately 30 minutes to go through.

Requirements

  • You must have a working Azure subscription to carry out this hands-on lab step-by-step.

Task 1: Create a virtual machine to execute the lab

  1. Launch a browser and navigate to https://portal.azure.com. Once prompted, login with your Microsoft Azure credentials. If prompted, choose whether your account is an organization account or just a Microsoft Account.

  2. Click on +Create a resource, and in the search box type in Visual Studio Community 2017 and press enter. Click the Visual Studio Community 2017 image running on Windows Server 2016 and with the latest update.

  3. In the Marketplace solution blade, at the bottom of the page keep the deployment model set to Resource Manager, and click Create.

  4. Set the following configuration on the Basics tab and click Next: Disks >:

    • Subscription: If you have multiple subscriptions choose the subscription to execute your labs in.

    • Resource Group: OPSLABRG

    • Virtual machine name: LABVM

    • Region: Choose the closest Azure region to you

    • Availability options: No infrastructure redundancy required

    • Image: Visual Studio Community 2017 (latest release) on Windows Server 2016 (x64)

    • Size: Standard D2S v3

    • Username: demouser

    • Password: demo@pass123

    • Public inbound ports: Allow selected ports

    • Select inbound ports: RDP

    • Already have a Windows License?: No

    The basics tab is selected, all of the configuration options have been set and the Next Disks button is selected.

  5. Verify the following configurations on the Disks tab and then click Next: Networking >.

    • OS disk type: Premium SSD
  6. Accept the defaults on the Networking tab and then click Next: Management.

  7. On the Management tab, turn off Boot diagnostics and Enable auto-shutdown and then click Review + Create.

  8. After the validation has passed, click the Create button to deploy the virtual machine. The deployment should begin provisioning. It may take 10+ minutes for the virtual machine to complete provisioning.

    Note: Please wait for the LABVM to be provisioned prior to moving to the next step.

  9. After the deployment completes, navigate to your LABVM and click Connect to establish a new Remote Desktop Session.

  10. Depending on your remote desktop protocol client and browser configuration you will either be prompted to open an RDP file, or you will need to download it and then open it separately to connect.

  11. Log in with the credentials specified during creation:

    • User: demouser

    • Password: demo@pass123

  12. You will be presented with a Remote Desktop Connection warning because of a certificate trust issue. Click Yes to continue with the connection.

  13. When logging on for the first time you will see a prompt on the right asking about network discovery. Click No.

  14. Notice that Server Manager opens by default. On the left, click Local Server.

  15. On the right side of the pane, click On by IE Enhanced Security Configuration.

  16. Change to Off for Administrators and click OK.

Task 2: Install the MySQL Workbench

  1. While logged into LABVM via remote desktop, open Internet Explorer and navigate to https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-6.3.10-winx64.msi this will download an executable. After the download is finished, click Run to execute it.

  2. Follow the directions of the installer to complete the installation of MySQL Workbench.

  3. After the installation is complete, reboot the machine.

Task 3: Download hands-on lab step-by-step attendee files

  1. After the reboot has completed, download the zipped hands-on lab step-by-step attendee files by clicking on this link:
    https://cloudworkshop.blob.core.windows.net/linux-lift-shift/MCW-linux-lift-shift.zip.

  2. Extract the downloaded files into the directory C:\HOL.

You should follow all steps provided before performing the Hands-on lab.

Hands-on Lab Guide

Exercise 1: Deploy the on-premises OsTicket VM application

Duration: 45 Minutes

In this exercise, you will deploy a VM using an ARM template that will act as the on-premises installation of the OsTicket application. This will consist of a single Ubuntu Linux 16.04-LTS VM with Apache, PHP and MySQL installed (LAMP). This application is a helpdesk management software that you will lift and shift into Azure. There is sample data in the application that will be retained throughout the two phases of the project.

This Resource group for OnPremVNet includes the previously mentioned products.

Task 1: Deploy the OnPremVM

  1. From the Azure portal, click on the Cloud Shell icon on the top navigation. Select Bash (Linux) and, when prompted, create a storage account for your Cloud Shell to use.

  2. Execute the following command to create a resource group that will contain the application:

    Note: You can also specify an alternate region.

    az group create --name OsTicketOnPremRG --location "East US"
    
  3. Execute the following command to deploy the ARM template:

    az group deployment create --name OsTicketOnPremRG --resource-group OsTicketOnPremRG --template-uri "https://cloudworkshop.blob.core.windows.net/linux-lift-shift/onpremvmdeploy.json" 
    
  4. This deployment will take about 5 minutes to complete. Wait until it has been deployed before moving on to the next step.

  5. Once the deployment has completed open the resource group OsTicketOnPremRG and review the deployment.

  6. Next, click on the onpremvmip Public IP address. Locate the IP address and paste this into a new tab of your web browser. The Support Center OsTicket application should load.

  7. Click the Sign in link in the upper-right hand corner of the screen.

  8. Locate I’m an agent and click the corresponding sign in here link.

  9. At the OsTicket screen, enter the credentials shown below and click Log In:

    a. Username: demouser

    b. Password: demo@pass123

  10. Once logged into the OsTicket system, click My Tickets.

  11. On the My Tickets screen, click through to one of the tickets.

  12. Next, click the Users tab and notice the users that are entered into the system.

  13. Feel free to create new tickets or new users to add to your dataset.

Task 2: Export the osticket database

  1. From your LABVM, connect to the Azure portal and then open the OsTicketOnPremRG resource group.

  2. Locate the onpremvmip Public IP address and take note of the address.

  3. Next on the LABVM click Start and then locate the MySQL Workbench.

  4. Click the Plus sign next to MySQL Connections on the Workbench.

  5. Enter the following information to configure to connect to your OnPremVM:

    • Connection Name: OnPremVM

    • Connection Method: Standard TCP/IP over SSH

    • SSH Hostname: <enter the Public ip address>:22

    • SSH Username: demouser

    • SSH Password: Click Store in Vault: demo@pass123

    • MySQL Hostname: 127.0.0.1

    • MySQL Server Port: 3306

    • Username: osticket

    • Password: Click Store in Vault: demo@pass123

  6. Once configured, click Test Connection.

  7. A pop up will appear with a notice that the SSH Server Fingerprint Missing, click continue.

  8. If configured correctly, you will receive a message: Successfully made the MySQL Connection. Click OK.

  9. The connection will appear. Double-click to start a session with the MySQL instance running on the OnPremVM.

  10. Once the Workbench loads, in the Navigator pane, click Server Status. Review the details of the server.

  11. Next, in the Navigator pane, click the osticket database under Schemas and expand to see the tables.

  12. Locate the ost_user table, right-click and then click Select Rows — Limit 1000.

  13. This will launch a query in the Workbench and list all of the users on the system. Notice that these are the same users that you saw in the OsTicket UI.

  14. In the Navigator pane to the left, click Data Export.

    Note: You may have to toggle tabs in the pane to Management.

  15. On the Data Export screen, select the osticket schema. Then, select Export to Self-Contained File, and name the file c:\HOL\onpremvm.sql and click Start Export.

  16. You will get a version mismatch warning, click Continue Anyway.

  17. Once the export has completed, you will receive this message.

Exercise 2: Migrate to Azure IaaS VM Scale Sets and MySQL cluster

Duration: 90 Minutes

In this exercise, you will deploy the OsTicket application to Azure IaaS. In the first task, you will deploy and configure a MySQL Cluster with multiple nodes. Next, you will restore the database that was exported using MySQL Workbench. After the data tier of your application has been configured you will deploy a Virtual Machine Scale Set. The OsTicket application will be installed on the instances using the Custom Linux Extension and will be self-configuring. The Scale Set will be setup to autoscale and the VMs that spin up will also self-configuring.

Task 1: Deploy the MySQL HA cluster

  1. From the Azure portal, click on the Cloud Shell icon in the top navigation.

  2. Execute the following command to create a resource group that will contain the MySQL HA environment:

    Note: Ensure you that use the same region as the OsTicket application.

    az group create --name OsTicketMySQLVMRG --location "East US"
    
  3. Execute the following command to deploy the ARM template:

    az group deployment create --name OsTicketMySQLVMRG --resource-group OsTicketMySQLVMRG --template-uri "https://cloudworkshop.blob.core.windows.net/linux-lift-shift/mysqlhadeploy.json" 
    

    Note: The settings that are being deployed as part of the template will be referenced later in the lab.

    • OS User Name: bitnami

    • OS Admin Password: demo@pass123

    • App Database: osticket

    • App Password: demo@pass123

  4. This deployment will take about 15 minutes to complete. Wait until it has been deployed before moving on to the next step.

  5. Once the deployment has completed open the OsTicketMySQLVMRG and review the deployment. Notice that there are three VMs which are a part of a three-node MySQL cluster.

  6. Locate the osticketip public IP address and take note of the address. Notice that this is attached to the VM osticket0, which is the master node in the cluster.

Task 2: Connect to the MySQL cluster and restore the database

  1. On the LABVM, if it isn’t still open, click Start and then select MySQL Workbench.

  2. Click the Plus sign next to MySQL Connections on the Workbench.

  3. Enter the following information to configure to connect to your MySQL master node:

    • Connection Name: MySQL Cluster

    • Connection Method: Standard TCP/IP over SSH

    • SSH Hostname: <enter the Public ip address>

    • SSH Username: bitnami

    • SSH Password: Click Store in Vault: demo@pass123

    • MySQL Hostname: 127.0.0.1

    • MySQL Server Port: 3306

    • Username: root

    • Password: Click Store in Vault: demo@pass123

  4. Once configured, click Test Connection.

  5. A popup will appear with a notice that the SSH Server Fingerprint Missing, click continue.

  6. If the connection is configured correctly, you will receive a message: Successfully made the MySQL Connection. Click OK.

  7. Click OK to save the connection that you just configured.

  8. The Connection will appear. Double-click to start a session with the MySQL Cluster instance running on the Azure IaaS.

  9. Once the Workbench loads, click Server Status. Review the details of the cluster. Remember you are connected to the master for the cluster.

  10. Click the New Query button.

  11. Execute the following query to show the status of the cluster nodes known as "Slaves". Click the Lighting Bolt to run the query. Notice that the two replication partners appear in the results window as well as their TCP port of 3306.

    SHOW SLAVE HOSTS
    
  12. Next, click the osticket database under Schemas and expand to see the tables. This time, notice that nothing is in the database yet, since you have not restored it yet from the MySQL data export you created in a previous task.

  13. This is the part of the lift and shift where we will restore the existing database for the application. On the Management tab of the Navigator pane, click the Data Import/Restore button.

  14. On the Data Import screen, click the Import from Self-Contained File, and then select the C:\HOL\onpremvm.sql data file.

  15. Next, set the Default Target Schema as osticket and click Start Import. This will restore the data from the OnPremVM to the MySQL cluster. Then, in the bottom right-hand corner of the screen, click Start Import.

  16. Once the restore is completed, the following screen will appear:

  17. Move back to the Schemas area of the MySQL Workbench, and click the refresh icon.

  18. The tables of the database now appear since they have been restored. Locate the ost_user table, right-click and then click Select Rows — Limit 1000.

  19. This will launch a query in the Workbench and list all the users on the system. Notice that now the data from the application has been lifted and shifted into a MySQL Cluster running in Azure IaaS. The term lift and shift means that there was zero data loss during the move.

Task 3: Deploy the Virtual Machine Scale Set for the OsTicket Application

  1. From the Azure portal, click on the Cloud Shell icon on the top navigation.

  2. Execute the following command to create a resource group that will contain the MySQL HA environment:

    Note: Ensure you that use the same region as the OsTicket application.

    az group create --name OsTicketVMSSRG --location "East US"
    
  3. Execute the following command to deploy the ARM template. This command requires a parameter to be passed to the template. In the example, osticketXX is used. Replace that value with a unique value that is lowercase and less than 10 characters. Just replace the value of XX into any number which is unique. It will take up to 10 minutes to run and complete the command.

    az group deployment create --name OsTicketVMSSRG --resource-group OsTicketVMSSRG --template-uri "https://cloudworkshop.blob.core.windows.net/linux-lift-shift/scalesetdeploy.json" --parameters vmssName=osticketXX
    

    Take note of the credentials for the VMSS:

    • Admin Username: demouser

    • OS Admin Password: demo@pass123

  4. Once the deployment has completed, open the OsTicketVMSSRG and review the deployment.

  5. Open the Virtual Machine Scale Set (it has the same name that you passed in earlier as a parameter). Notice that there are two instances (to start out with), which are a part of a VM Scale Set and that autoscaling has been enabled. After some time, it will be scaled down to only one instance given the lack of traffic to the site.

  6. Take note of the public IP address.

  7. If you browse to the IP address in a new tab, you will not be able to connect to the webpage. This is due to the lack of connectivity to the MySQL Cluster.

  8. Click the Instances link in Settings.

  9. Here you can take different actions on the Scale Set instances. Click on the instances, and review the information pane.

  10. In the information pane, notice the "Latest model applied" information. This is where you can update the image being used for the OS. By selecting the instances and then clicking the update, you can apply system updates to the VMs that are currently running.

  11. Click the Scaling link in the Settings menu section of the Scale Set.

  12. Review the rules for Scale Out and Scale In.

  13. Click the Notify tab on this page, check the Email Administrators and Email co-administrators, and add any additional emails you wish. Also, notice that a Webhook could be entered here. Anytime an event happens related to autoscaling, Azure will send a notification. Click Save to configure.

Task 4: Connect the MySQLVNet to the Scale Sets VNet

The MySQL Cluster and the Scale Set are running in isolated VNets. To bring the OsTicket application online, you will need to create a peering between these VNets. This was the reason that both deployments needed to be in the same regions along with performance hit if they were in different regions.

  1. In the Azure portal, click on Virtual Networks followed by MySQLVNet and Peerings.

  2. Click +Add.

  3. Enter the name OSTicketPeering followed by Choose a virtual network. Select the VNet you created with your Scale Set (should follow the pattern of <your-scale-set-name>vnet). Click OK.

  4. Your peering will appear in the blade as Initiated (you may have to refresh the blade to see this update).

  5. In the Azure portal, click on Virtual Networks followed by the name of your Scale Set VNet and Peerings. In the case of the example, the VNet is named osticket11vnet.

  6. Click +Add.

  7. Enter the name OSTicketPeering followed by Choose a virtual network. Select the VNet that you created when you deployed your MySQL HA cluster (i.e. MySQLVNet). Click OK.

  8. Your peering will appear in the blade as Connected (you may have to refresh the blade to see this update).

  9. Immediately, the two networks can see each other, which means the Scale Set will be able to see the MySQL Cluster. Open a new browser tab and attempt to connect to the public IP address of the Scale Set. You should see the Support Center website again.

  10. Click the Sign in link.

  11. Locate I’m an agent, and click the sign in here link.

  12. At the OsTicket screen enter the username and password, and click Log In.

    a. Username: demouser

    b. Password: demo@pass123

  13. Once logged into the OsTicket system, click My Tickets.

  14. On the My Tickets screen, click through to one of the tickets. Once again, you see that the data from the on-premises installation of the OsTicket system is preserved, which means that you have successfully lifted and shifted the application to Azure IaaS!

Task 5: Export the osticket database from the MySQL cluster

  1. Next, on the LABVM, click Start and then locate the MySQL Workbench.

  2. Double-click to start a session with the MySQL cluster.

  3. In the Navigator pane, on the Management tab, click Data Export.

  4. On the Data Export screen, select the osticket. Then select Export to Self-Contained File, and name the file C:\HOL\mysqlcluster.sql and click Start Export.

  5. You will get a version mismatch warning. Select Continue Anyway.

  6. Once the export has completed, you will receive this message.

Exercise 3: Migrate the OsTicket application from Azure IaaS to PaaS

Duration: 60 Minutes

In this exercise, you will implement Phase II of the migration to Azure. Here you will retire the Azure IaaS implementation and move to Azure App Service and Azure Database for MySQL. The first steps will be to build the MySQL DB and again migrate the data using MySQL Workbench. Then, you will create the Azure Web App and connect it to GitHub repository to download the app using a Docker Container with PHP 7.0.

Task 1: Create the MySQL database

  1. From the Azure portal, click on the Cloud Shell icon on the top navigation.

  2. Execute the following command to create a resource group to contain the MySQL DB, using a region of your choice:

    az group create --name OsTicketPaaSRG --location "East US"
    
  3. Execute the following command to create a MySQL Database:

    Note: You must choose a unique name for the MySQL server. Replace osticketsrv01 with a more unique value / name.

    az mysql server create --resource-group OsTicketPaaSRG --name osticketsrv01 --location "East US" --admin-user demouser --admin-password demo@pass123 --sku-name GP_Gen5_8 --storage-size 51200 --ssl-enforcement Disabled
    
  4. Add an open firewall rule to the database by executing the following command. Ensure you replace the server name with the unique value from the previous step.

    az mysql server firewall-rule create --resource-group OsTicketPaaSRG --server-name osticketsrv01 --name Internet --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255
    
  5. Once the MySQL database has been deployed, locate and open it from the OsTicketPaaSRG resource group using the Azure Portal.

  6. Click Connection Strings.

  7. Locate the Web App connection string, and press the Click the copy button.

  8. Open a new notepad window and paste this into a new file to retain this string and more information in the next few steps. Update the script to the following:

    Note: Your hostname is the unique name you chose to name your Azure Database instance.

    Database=osticket; Data Source={host_name}.mysql.database.azure.com; User Id=demouser@(host_name); Password=demo@pass123
    
  9. Click Overview for the MySQL server.

  10. Notice the Server name and Server Admin Login name. You can compare them to the edited connection string in your text file (they should be the same).

  11. Scroll down, and notice that there are currently four databases that are running on your server.

Task 2: Restore the osticket database to MySQL PaaS

  1. On the LABVM, click Start and then launch MySQL Workbench.

  2. Click the Plus sign next to MySQL Connections on the Workbench.

  3. Enter the following information to configure to connect to your Server:

    • Connection Name: <enter your MySQL Server DNS Name — found in the connection string >

    • Connection Method: Standard TCP/IP

    • MySQL Hostname: <enter your MySQL Server DNS Name — found in the connection string >

    • MySQL Server Port: 3306

    • Username: <enter your user name — found in the connection string>

    • Password: Click Store in Vault: demo@pass123

  4. Once the connection is configured, click the Test Connection Button.

  5. If the connection is configured correctly, you will receive a message: Successfully made the MySQL Connection. Click OK.

  6. Click OK to save the connection that you just configured.

  7. The new connection will appear. Double-click it to start a session with the MySQL database server running on the Azure PaaS.

  8. Once the Workbench loads, click Server Status. Review the details of the MySQL PaaS Server.

  9. This is the part of the lift and shift where we will restore the existing database for the application. Click the Data Import/Restore button.

  10. On the Data Import screen, click the Import from Self-Contained File, and select the c:\HOL\mysqlcluster.sql data file.

  11. In the Default Schema to be Imported To section, click New.

  12. In the Create Schema dialog, type osticket and click OK.

  13. MySQL Workbench will create the schema (database), on the server for you and select it as the Default Target Schema for the restore.

  14. Click Start Import after reviewing the screen.

  15. Once the restore is completed, the following screen will appear.

  16. Navigate back to the Schemas tab in the Navigator pane of the MySQL Workbench, and click the Refresh icon.

  17. The tables of the database now appear since they have been restored. Locate the ost_user table in the osticket database. Right-click it, and click Select Rows — Limit 1000.

  18. This will launch a query in the Workbench and list all of the users on the system. The data from the application has been lifted and shifted into a MySQL server running in Azure PaaS. This means there was zero data loss from the move to PaaS.

  19. Move back to the Azure portal, and click Overview for the Azure Database for MySQL Server instance you created earlier.

  20. Scroll down and notice now that there are five databases and the addition of the osticket.

Task 3: Create the Web App

  1. From the Azure portal, click the Cloud Shell icon in the top navigation menu.

  2. Execute the following command to create a Linux-based App Service Plan for the new web app, using the SAME region where you created your Azure Database for MySQL server instance in the previous task.

    az appservice plan create -n OsTicket -g OsTicketPaaSRG --is-linux -l "East US" --sku S1 --number-of-workers 1
    
  3. Execute the following command to create a new web app configured for PHP 7.0 inside of the new App Service Plan. The name of the web app (the value after -n) must be unique, so specify some numbers at the end to make it a more unique value. Example osticketsystem999 or osticketsystem87876.

    az webapp create -n osticketsystem -g OsTicketPaaSRG -p OsTicket -r "php|7.0"
    
  4. Once the deployment has completed, open the OsTicketPaaSRG resource group. Notice there are now three objects: MySQL database, Linux App Service Plan and the Web App.

Task 4: Configure the OsTicket Web App

  1. Open the Web App using the Azure portal. Notice the details of the application including the URL.

  2. If you click the URL, you will get a Forbidden error from the server. This is because no application has yet been deployed.

  3. In the Azure portal in your web app blade, click Application settings in the Settings menu area.

  4. Locate the Connection Strings section. Click the +Add new connection string then enter a new connection string name of osticket, copy the data source string from your connection sting into the value area from notepad. Select MySQL in the dropdown list next to the string. Click Save.

  5. Open a new browser tab and connect to https://github.com/opsgility/osTicket. This is a public repository for the OsTicket software. Sign in to your personal GitHub account or create a new one.

  6. On this page locate and then click the Fork button.

  7. If prompted, select your personal account when prompted with "Where should we fork this repository?"

  8. After the repository is forked to your GitHub account, scroll down and locate the include folder and click it.

  9. Once in the include folder, scroll down and locate the file named ost-config.php.

  10. The file will open in the browser. Click the Pencil icon to edit this file.

  11. The file will open in an editor. Scroll down to the Database Options area of the file. Update the text in this file with your MySQL database settings from your notepad file. The DBHOST name and the DBUSER should be updated.

  12. Once you have updated the text, scroll down, name your commit and click Commit changes.

  13. Move back to the Azure portal and, in the Web App blade, click Deployment center in the Deployment menu area.

  14. Select GitHub, and then click the Authorize button and follow the prompts to connect your Github account with your Azure subscription.

  15. Once authorized, select Github and choose Continue.

  16. On the build provider step, choose App Service Kudu build server and select Continue.

  17. On the configure step, choose your organization or Github account, then select the osticket repository and the master branch.

  18. The OsTicket application will be downloaded from the GitHub account. First, it will show as Pending and then Active. You may need to refresh the view to see it.

  19. Navigate back to the Overview page of your Web App, and then select the URL for the Web App.

  20. Immediately, the Web App will load. You should see the Support Center website again.

  21. Click the Sign in link.

  22. Locate I’m an agent and click the sign in here link.

  23. At the OsTicket screen, enter the username and password and click Log In.

    a. Username: demouser

    b. Password: demo@pass123

  24. Once logged into the OsTicket system, click My Tickets.

  25. On the My Tickets screen, click through to one of the tickets. Once again, you see that the data from the IaaS installation of the OsTicket system is preserved which means that you have successfully lifted and shifted the application to Azure PaaS!

After the hands-on lab

Duration: 10 minutes

After you have successfully completed the Linux Lift & Shift Azure hands-on lab step-by-step, you will want to delete the Resource Groups. This will free up your subscription from future charges.

  • OPSLABRG

  • OsTicketMySQLVMRG

  • OsTicketOnPremRG

  • OsTicketPaaSRG

  • OsTicketVMSSRG

You should follow all steps provided after attending the Hands-on lab.

Attribution & License

This Hands-on Lab was originally published as the “Linux Lift and Shift Microsoft Cloud Workshop” by Microsoft and is licensed using the MIT License.

The latest update for this Microsoft Cloud Workshop was made December 2018.

Microsoft MVP

Chris Pietschmann is a Microsoft MVP, HashiCorp Ambassador, and Microsoft Certified Trainer (MCT) with 20+ years of experience designing and building Cloud & Enterprise systems. He has worked with companies of all sizes from startups to large enterprises. He has a passion for technology and sharing what he learns with others to help enable them to learn faster and be more productive.
HashiCorp Ambassador Microsoft Certified Trainer (MCT) Microsoft Certified: Azure Solutions Architect