Follow these instructions to deploy the demo app to Azure.
- Open [Azure Management Portal] (https://ms.portal.azure.com)
- Press the
+sign and search forWeb App + SQL. Select it, and pressCreate:
- Fill in the App Name, Database and create a new Resource Group to contain all of the related resources:

- Click
Create, and wait while deployment is running. When deployment is ready, you'll be automatically redirected to the resource group and see the list of the resources allocated for you:
- Before setting up the resources, we need to create a Storage Account where the videos are being stored. Press the
+sign, and search for aStorage Account. ClickCreate:
- Type a name, make sure to selected the same resource group, and the same region for your storage account:

- Click
Createand wait until deployment is ready. - After storage account is created, click the Keys icon on the top bar and copy the storage account
NameandAccess Key(Key 1) to a temporary file. We'll use it in a bit.
- Go back to your resource group by clicking on it's tile on the Dashboard, or looking for it under the
Resource Groupsmenu item on the left. You should now see all resources:
- Fork the Video Tagging Tool repository to your own GitHub account.
- Download the
schema.sqlfile located understorage/sqldirectory. Edit the file, scroll to the end of the file and edit the last line to add you as the first user of the tool:
- Next step will be to setup the environment to host the website:
- First we need to enable access to the Sql server from your machine IP, so that you can connect and create the schema. Click
videotaggingsrv-->All Settings-->Firewalland add your IP. For the sake of the demo, I'm enabling all IP range. Save your changes.
- Use your favorite SQL Server client UI to connect to the SQL server. I'm using [Sql Server Management Studio] (https://msdn.microsoft.com/en-us/library/mt238290.aspx). You can also use Visual Studio in case you're using Windows. In case of other OS, look for Sql Server UI Client that can run on your OS. [DBeaver] (http://dbeaver.jkiss.org/download/) is a nice option for MacOS / Ubuntu.
- Use the SQL server settings, as defined when you created the SQL server. Click the
SQL Server-->Settingsto get the SQL server host name, and use the user and password you defined with the SQL Server Authentication scheme:
- After connecting, you'll see the database that was provisioned for you. Right-click and select
New Query:
- Copy-Paste the content of the
Schema.sqlfile to this window, and clickF5to execute the script and create all of the db objects:
- Browse to Google Developer Console.
- Under
Use Google APIs, clickEnable and Manage APIslink. - Select
Google+ APIand clickEnable. - Open the
Credentialstab. Click theCreate Credentialsselect box and selectOAuth client ID. - Select
Web Applicationoption from the menu and fill in the following details:
- In the
Authorized Javascript origins, add the Url for your website. This can be copied from the web app properties in the Azure portal. - In the
Authorized redirect URIs, copy the same Url (with https scheme), and add/.auth/login/google/callbackas demonstrated below:
- Click the
Createbutton.
- You'll get a
client Idand aclient secret. Copy these strings to a temporary file. We'll use it in a bit:
Next step will be to set up the web app environment variables. Go back to the MS Azure portal, and click the Web App icon on the resource group list.
Click All Settings --> Application Settings and add the following entries under the App Settings section.
Make sure you're under the Application Settings section and not under the Connection Strings section:
DB_SERVER- The SQL server host name (videotaggingsrv.database.windows.netin our case)DB_NAME- The database name (videoTaggingDemoDbin our case)DB_USER- The SQL server user name (videoin our case)DB_PASSWORD- The SQL server passwordSTORAGE_ACCOUNT- The storage account (videotaggingdemoin our case)STORAGE_KEY- The storage keyGOOGLE_CLIENT_ID- Google's client IdGOOGLE_CLIENT_SECRET- Google client secretGOOGLE_CALLBACK_URL- The website URL (using https scheme) +/.auth/login/google/callback(https://video-tagging-demo.azurewebsites.net/.auth/login/google/callbackin our case).
- Click the
Continuous deploymentoption under thePublishingoption for the Web App. - Select
Githubas the source and set up your authentication. - Choose the forked repository and select the
masterbranch.
Click OK, and hope for the best :-)
After a few minutes, if everything went well, you should be able to point your browser to the website URL and log in to the tool.
Since you're the only Admin user, you'll be able to add more users under the Users tab.
Enjoy!

