Recreate a Site in Azure

30 Sep

Revision for “Recreate a Site in Azure” created on October 1, 2015 @ 09:25:29

Title
Recreate a Site in Azure
Content
So, you've tried everything... you've redeployed, you've disconnected and reconnected, you've deleted your fork and reforked. And nothing is working. Sometimes, things happen in Azure, and a site gets corrupted, and none of the regular troubleshooting steps help. <strong>You may be told that the next step is to recreate your site.</strong> Don't worry. You've already done most of the hard work in the past (when you first set up Nightscout). Recreating is fairly straightforward, but <strong>if you want to use the same url</strong> (the same name for your site), you need to follow directions. <ol> <li style="padding-bottom: 10px;">Log into Github. (You need to be logged in for steps later in this process to work.)</li> <li style="padding-bottom: 10px;">Open you Azure site in a browser window. Click the configure tab. Scroll down to connection strings and click the link to reveal the hidden text.</li> <li style="padding-bottom: 10px;">Copy the contents of each box into a separate text file (e.g., Notepad, Word, Google doc, Gmail message, Evernote file, etc.). This gives you a copy of the information you can use to cut/paste later to help avoid errors. (If you have settings in App Settings, you may want to also copy those into the text file for reference. Be sure and save the file. It may come in handy in the future!)</li> <li style="padding-bottom: 10px;">Open your Azure site in <em>another</em> browser window. Click the dashboard tab.</li> <li style="padding-bottom: 10px;">Click the <span class="color: red;">delete</span> button at the bottom. <br /> <a href="http://www.nightscout.info/wp-content/uploads/2015/09/recreate-delete.png"><img src="http://www.nightscout.info/wp-content/uploads/2015/09/recreate-delete.png" alt="recreate-delete" width="482" height="56" class="alignnone size-full wp-image-2936" style="border: black solid thin;" /></a> <br /></li> <li style="padding-bottom: 10px;">When the popup window comes up, click the arrow to confirm the deletion. <br /> <a href="http://www.nightscout.info/wp-content/uploads/2015/09/recreate-delete-confirm.png"><img src="http://www.nightscout.info/wp-content/uploads/2015/09/recreate-delete-confirm.png" alt="recreate-delete-confirm" width="654" height="442" class="alignnone size-full wp-image-2937" style="border: black solid thin;" /></a> <br /> </li> <li style="padding-bottom: 10px;">After the site has been deleted, you can use the following steps to create a new site (these are the same steps used during regular Nightscout site setup). <blockquote> <ul> <li style="padding-bottom: 10px;">Click on "Globe" (WEB APPS) icon on the left navigation of your Azure site. <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/08/azure-menu.png"><img src="http://www.nightscout.info/wp-content/uploads/2014/08/azure-menu.png" alt="azure-menu" width="58" height="401" class="alignnone size-full wp-image-2820" style="border: black solid thin;" /></a> <br /> As you click the buttons described below, the options will open up in a horizontal cascade of menus that look, together, like this: <a href="http://www.nightscout.info/wp-content/uploads/2014/08/azure-newsite.png"><img src="http://www.nightscout.info/wp-content/uploads/2014/08/azure-newsite.png" alt="azure-newsite" width="1203" height="326" class="alignnone size-full wp-image-2805" style="border: black solid thin;" /></a> </li> <li style="padding-bottom: 10px;">After clicking the 'Globe' (WEB APPS), go to the bottom of the page and click on the '<strong>+ NEW</strong>' Button <img class="alignnone wp-image-429" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-new.png" alt="azure-new" width="73" height="30" style="border: black solid thin;" /></li> <li style="padding-bottom: 10px;">From the expanded menu that appears, click <strong>COMPUTE</strong>: <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/08/azure-compute.png"><img src="http://www.nightscout.info/wp-content/uploads/2014/08/azure-compute.png" alt="azure-compute" width="215" height="54" class="alignnone size-full wp-image-2810" style="border: black solid thin;" /></a> <br /> </li> <li style="padding-bottom: 10px;">From the next menu that appears, click <strong>WEB APP</strong>: <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/08/azure-webapp.png"><img src="http://www.nightscout.info/wp-content/uploads/2014/08/azure-webapp.png" alt="azure-webapp" width="215" height="54" class="alignnone size-full wp-image-2811" style="border: black solid thin;" /></a></li> <br /> <li style="padding-bottom: 10px;">From the next menu that appears, click <strong>QUICK CREATE</strong>: <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/08/azure-quickcreate.png"><img src="http://www.nightscout.info/wp-content/uploads/2014/08/azure-quickcreate.png" alt="azure-quickcreate" width="215" height="54" class="alignnone size-full wp-image-2812" style="border: black solid thin;" /></a> <br /> </li> <li style="padding-bottom: 10px;">The next menu that appears looks like this: <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/08/azure-newsite-url.png"><img src="http://www.nightscout.info/wp-content/uploads/2014/08/azure-newsite-url.png" alt="azure-newsite-url" width="352" height="174" class="alignnone size-full wp-image-2803" style="border: black solid thin;" /></a> <br /> </li> <li style="padding-bottom: 10px;">Enter your old site name in the <strong>URL</strong> box (unless you are creating a new site with a new name).</li> <li style="padding-bottom: 10px;">For <strong>APP SERVICE PLAN</strong> (formerly called the <strong>WEB HOSTING PLAN</strong>), leave the default option of '<em>Create new app service plan</em>'</li> <li style="padding-bottom: 10px;">For <strong>REGION</strong> select one from the drop down list.  It does not need to be near you. </li> <li>When you have filled in the information, you should have something like this (with an App Service Plan selected): <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/08/azure-newsite-region1.jpg"><img src="http://www.nightscout.info/wp-content/uploads/2014/08/azure-newsite-region1.jpg" alt="azure-newsite-region" width="344" height="260" class="alignnone size-full wp-image-2809" style="border: black solid thin;" /></a> <br /> </li> <li style="padding-bottom: 10px;">On the bottom right side of screen, Click on <strong>CREATE WEB SITE</strong>: <br /> <img class="alignnone wp-image-433 size-full" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-create.png" alt="azure-create" width="174" height="46" style="border: black solid thin;" /> <br /> </li> <li style="padding-bottom: 10px;">The website details will appear, and the <strong>STATUS</strong> will show '<strong>Creating...</strong>.' Wait until it completes and says '<strong>Running</strong>' before continuing.  (It may stall out or give you a message that it cannot be created.  Log in with a different browser and try again.  It may take several tries to get it to work.)<img class="alignnone wp-image-434" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-newsite-info2.png" alt="azure-newsite-info2" width="648" height="109" style="border: black solid thin;" /> </li> <li style="padding-bottom: 10px;">Click on the web site name, and you will see a welcome page stating '<strong>Your site has been created!</strong>'</li> <li style="padding-bottom: 10px;">On the top navigation menus, click on <strong>CONFIGURE</strong> as shown below: <br /> <img class="alignnone wp-image-435 " src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-newsitenavbar.png" alt="azure-newsitenavbar" width="663" height="83" style="border: black solid thin;" /> <br /> </li> <li style="padding-bottom: 10px;">Next, scroll down the page until you find the <strong>CONNECTION STRINGS</strong>. You need to re-enter the SAME information from your previous site, specifically the <span style="color: red;">mongo</span>, <span style="color: red;">mongo_collection</span>, and <span style="color: red;">API_SECRETE</span> need to be re-entered.</li> <li style="padding-bottom: 10px;">Use either the text file you have (where you pasted the values of these fields) or the open screen from your previous site to copy and paste the information in. DO NOT RETYPE THE INFORMATION. Copy and paste it to avoid creating new errors. Make sure ALL of these variables are set to <span style="color: red;">custom</span> as the "type." </li> <li style="padding-bottom: 10px;">If you had other variables set in the <strong>App Settings</strong> portion of the Azure site, you can enter those now, if you choose.</li> <li>Once you are done entering variables, click "Save" at the bottom of Azure. <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/07/azure-config-save.png"><img src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-config-save.png" alt="azure-config-save" width="49" height="50" class="alignnone size-full wp-image-441" /></a> <br /> </li> </ul> </li> <li>Reconnect to Github and select your repository: <blockquote> <ul> <li style="padding-bottom: 10px;">Click on the <strong>DASHBOARD</strong> tab: <br /> <img class="alignnone size-full wp-image-444" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-dash-menu.png" alt="azure-dash-menu" width="278" height="69" style="border: black solid thin;" /> <br /> </li> <li style="padding-bottom: 10px;">On the right '<strong>Quick Glance</strong>' menu, click on the '<em><strong>Set up deployment from source control</strong></em>' link. <br /> <img class="alignnone size-full wp-image-445" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-quickglance.png" width="279" height="339" style="border: black solid thin;" /> <br /></li> <li style="padding-bottom: 10px;">Select Github. <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/07/azure-source-code.jpg"><img class="alignnone wp-image-406 size-medium" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-source-code-300x210.jpg" alt="azure source code" width="300" height="210" style="border: black solid thin;" /></a> <br /></li> <li style="padding-bottom: 10px;">Authorize Github/Azure access.</li> <li style="padding-bottom: 10px;">Find <code>cgm-remote-monitor</code>: <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/07/azure-choose-repository2.jpg"><img class="alignnone wp-image-407 size-medium" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-choose-repository2-300x235.jpg" alt="azure choose repository2" width="300" height="235" style="border: black solid thin;" /></a> <br /></li> <li style="padding-bottom: 10px;">Confirm, and wait for the site to deploy. <br /> <a href="http://www.nightscout.info/wp-content/uploads/2014/07/azure-waiting-for-deployment.jpg"><img class="alignnone wp-image-408 size-medium" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-waiting-for-deployment-300x166.jpg" alt="azure waiting for deployment" width="300" height="166" style="border: black solid thin;" /></a><a href="http://www.nightscout.info/wp-content/uploads/2014/07/azure-active-deployment.jpg"><img class="alignnone wp-image-409 size-medium" src="http://www.nightscout.info/wp-content/uploads/2014/07/azure-active-deployment-300x136.jpg" alt="azure active deployment" width="300" height="136" style="border: black solid thin;" /></a> <br /></li> </ul> </blockquote> </li> <li>Check your site in a browser to see if it works by reloading the site (if you have it open) or by visiting your site, e.g. <span style="color: red;">http://<strong>YOURWEBSITENAME</strong>.azurewebsites.net</span></li> </ul> <br /> <br /> Return to <a href="/wiki/welcome/how-to-update-to-latest-cgm-remote-monitor-aka-cookie">How to Update to Latest CGM-REMOTE-MONITOR Web Site</a>
Excerpt


OldNewDate CreatedAuthorActions
October 1, 2015 @ 09:25:29 Amy Cowen
September 30, 2015 @ 22:26:12 Amy Cowen
September 30, 2015 @ 22:12:34 Amy Cowen
September 30, 2015 @ 21:50:55 Amy Cowen
September 30, 2015 @ 21:49:14 Amy Cowen
September 30, 2015 @ 21:48:11 [Autosave] Amy Cowen
September 30, 2015 @ 21:46:27 Amy Cowen
September 30, 2015 @ 21:42:14 Amy Cowen
September 30, 2015 @ 21:41:15 Amy Cowen
September 30, 2015 @ 21:38:55 Amy Cowen
September 30, 2015 @ 21:37:00 Amy Cowen
September 30, 2015 @ 21:22:09 Amy Cowen