MongoDB Upgrade to 3.0

11 Sep

Revision for “MongoDB Upgrade to 3.0” created on January 30, 2016 @ 11:06:02

Title
MongoDB Upgrade to 3.0
Content
<h2>What is Happening?</h2> All free Sandbox databases running MongoDB 2.6 will be updated to MongoDB 3.0 on September 30, 2015. In order to ensure your Nightscout website continues to work, <strong>you may need to take action if <em>any</em> of the following are true</strong>: <ul> <li>You use the <strong>Nightscout uploader app</strong>.</li> <li>You use the <strong>xDrip uploader app</strong>.</li> <li>You use a <strong>Nightscout site</strong> (viewing in a browser <em>or</em> using a Nightscout Pebble watchface).</li> </ul> Depending on which of the above conditions is true for you, you <strong>may</strong> need to do one or more of the following: <ul> <li>Nightscout uploader users: <a href="#RESTAPI">switch to REST API</a> and <a href="#updateSite">update your Nightscout site</a> (if necessary).</li> <li>xDrip users: <a href="#RESTAPI">switch to REST API</a> and <a href="#updateSite">update your Nightscout site</a> (if necessary).</li> <li>Nightscout Bridge users: <a href="#updateSite">update your Nightscout site</a>.</li> </ul> <strong>Please read each section below to determine the changes you need to make. Even if you have already updated one thing (like your site), you may still need to take other steps (like switching to REST API). </strong> <blockquote><span style="color: red; font-weight: bold;">You can make these changes at <strong>any time</strong> it is convenient <strong>before</strong> September 30, 2015. If you do not make the required changes before September 30, your site may not work after that point. We recommend that you do not wait.</span></blockquote> <a name="RESTAPI"></a> <h2>Switch to REST API</h2> <span style="color: red; font-weight: strong;"><strong>[NOTE: If you use iOS/Share as your upload method, you do not need to do these steps.]</strong></span> <strong>Users of both xDrip and the Nightscout uploader app need to switch to REST API as the upload method to ensure Nightscout will continue working after 9/30/15.</strong> REST API offers several advantages, including the use of HTTPS, which improves privacy by encrypting the data sent from your uploader phone to your website. REST API also works better on WiFi networks where firewalls may block access to MongoDB upload ports (e.g., schools, hotels, and public hotspots). <strong>NOTE: After you switch to REST API, you need to turn OFF your MongoDB upload in your uploader in order to see if your change works.</strong> The basic steps to switch to REST API are: <ol> <li style="padding-bottom: 10px;">Set an API_SECRET value in your site (Azure or Heroku) settings, if you do not already have one. Your API_SECRET must be 12 characters minimum. (Care Portal users already have an API_SECRET set.) You will need to go to Configure/Connection Strings to add this variable. After adding the API_SECRET, be sure you <strong>save</strong> the altered settings.<a href="http://www.nightscout.info/wp-content/uploads/2015/09/restapi-secret2.png"><img class="alignnone size-full wp-image-2679" style="padding-top: 10px; padding-bottom: 10px;" src="http://www.nightscout.info/wp-content/uploads/2015/09/restapi-secret2.png" alt="restapi-secret2" width="472" height="31" /></a> <strong>Note:</strong> In Azure, it is recommended that the API_SECRET be placed in the <strong>Connection Strings</strong> section because it is a passphrase. The "type" should be set to "Custom," as shown above. (If you already have an API_SECRET set, and it is in the App Settings, it will still work, but please note that you can only have the API_SECRET set in one place.)</li> <li style="padding-bottom: 10px;">Configure the BASE URL for REST API on your uploader. <ul> <li style="padding-bottom: 10px;"><span style="color: red;"><strong>RECOMMENDED:</strong> You can use the <a href="/wiki/labs/mongodb-upgrade-to-3-0/using-auto-configure-for-rest-api">auto configure tool</a> to properly format your REST API string for your uploader.</span></li> <li style="padding-bottom: 10px;"><strong>OR</strong>, you can manually set up REST API in xDrip settings or the Nightscout uploader preferences.If you are using a current version (beta) of xdrip or the Dreamsicle version of the Nightscout uploader, the BASE URL takes the following format, where you replace the sample text shown in red below with your own API_SECRET and site name: <blockquote> <div style="font: normal !important;">https://<span style="color: red;">YOURAPISECRET</span>@<span style="color: red;">YOURSITENAME</span>.azurewebsites.net/api/v1/ or https://<span style="color: red;">YOURAPISECRET</span>@<span style="color: red;">YOURSITENAME</span>.herokuapp.com/api/v1/ </div></blockquote> <blockquote>(Older versions and the Medtronic uploader use a different syntax. We recommend you update your uploader application (download a current one), but if you are using Cookie Monster as an uploader or the Medtronic uploader, you will need this format: <span style="color: red;">YOURAPISECRET</span>@https://<span style="color: red;">YOURSITENAME</span>.azurewebsites.net/api/v1/</blockquote> <strong>To configure your uploader manually, use these steps:</strong> <ul> <li style="padding-bottom: 10px;"><strong>In the Nightscout uploader app</strong>, turn the API UPLOAD (REST) option "ON" (in preferences), and tap the BASE URL section to open a popup screen in which you can enter the BASE URL (using the syntax shown above for your Azure or Heroku site).<a href="http://www.nightscout.info/wp-content/uploads/2015/09/rest-ns-dreamsicle-on.png"><img class="alignnone size-full wp-image-2705" style="padding-top: 10px; padding-bottom: 10px;" src="http://www.nightscout.info/wp-content/uploads/2015/09/rest-ns-dreamsicle-on.png" alt="rest-ns-dreamsicle-on" width="400" height="628" /></a> <a href="http://www.nightscout.info/wp-content/uploads/2015/09/rest-ns-dreamsicle-enterstring.png"><img class="alignnone size-full wp-image-2706" style="padding-top: 10px; padding-bottom: 10px;" src="http://www.nightscout.info/wp-content/uploads/2015/09/rest-ns-dreamsicle-enterstring.png" alt="rest-ns-dreamsicle-enterstring" width="400" height="347" /></a></li> <li style="padding-bottom: 10px;"><strong>In xDrip</strong>, click the API UPLOAD (REST) option on the settings screen:<a href="http://www.nightscout.info/wp-content/uploads/2015/09/xdrip-restapi-300.png"><img class="alignnone size-full wp-image-2710" style="padding-top: 10px; padding-bottom: 10px;" src="http://www.nightscout.info/wp-content/uploads/2015/09/xdrip-restapi-300.png" alt="xdrip-restapi-300" width="300" height="286" /></a> Turn the option "ON" and fill in the BASE URL (using the syntax shown above for your Azure or Heroku site). <a href="http://www.nightscout.info/wp-content/uploads/2015/09/xdrip-restapi-string-300.png"><img class="alignnone size-full wp-image-2711" style="padding-top: 10px; padding-bottom: 10px;" src="http://www.nightscout.info/wp-content/uploads/2015/09/xdrip-restapi-string-300.png" alt="xdrip-restapi-string-300" width="300" height="212" /></a></li> </ul> </li> </ul> </li> <li style="padding-bottom: 10px;">Turn OFF your MongoDB upload in your uploader. (Do <strong>NOT</strong> delete your mongo strings in Azure. Those must stay as they were. REST API upload simply gets information to your database in a different way. You still <strong>have</strong> a mongo database. You are just not using mongodb as an upload method.)</li> <li style="padding-bottom: 10px;">Wait a few minutes and make sure that your site is updating normally (e.g., ensure your site gets new data with MongoDB off).</li> </ol> <strong>For additional directions to configure REST API, including how to set the API_SECRET for your site, see <a href="/wiki/labs/rest-api">REST API – How to upgrade to the new upload technique</a>. </strong> <strong>Note:</strong> if you experience a problem with the uploader battery percentage reading on your site after switching to rest, you will need to go into the mongodb, open the <strong>devicestatus collection</strong>, and delete the records. This one-time action should resolve the battery percentage problem. See <a href="http://www.nightscout.info/wiki/faqs-2/mongo/battery-information-not-updating-on-website" target="_blank">Fixing uploader battery % data</a> <strong>If you are having trouble with your REST API configuration, see these <a href="/wiki/labs/mongodb-upgrade-to-3-0/troubleshooting-rest-api-setup">troubleshooting tips</a>.</strong> <a name="updateSite"></a> <h2>Update Your Nightscout Site</h2> <strong>Nightscout sites deployed <strong>after</strong> Jan 21, 2015 should continue to work after the Mongo 3 change happens.</strong> This means if you are running Funnel Cake, Enchilada, or Dreamsicle 0.6.1 or newer, your site should have an appropriate driver to support Mongo 3. <strong>Even if you decide not to update to Funnel Cake, this does NOT mean you do not need to take other steps to be prepared for Mongo 3. PLEASE SEE THE <a href="#RESTAPI">REST API</a> SECTION ABOVE.</strong> <strong>The Funnel Cake code contains a newer mongodb driver</strong>, so updating to Funnel Cake is a <em>recommended</em> step. Step-by-step directions to update your site can be found <a href="/wiki/welcome/how-to-update-to-latest-cgm-remote-monitor-aka-cookie">here</a>. After updating, be sure and explore new <a href="/wiki/welcome/website-features/funnel-cake-0-8-features">Funnel Cake features and options</a>. <a name="nightscoutapp"></a> <h2>Users of Nightscout Uploader App</h2> <strong>The current version of the Nightscout uploader app will not work</strong> with Mongo 3 if you upload using the mongodb method. Updating to <a href="#RESTAPI">REST API</a> (<em>see above</em>) is required. <!-- An updated version <em>may</em> be available before September 30. We recommend you switch to <a href="#RESTAPI">REST API</a> (<em>see above</em>). Using <a href="#RESTAPI">REST API</a> (<em>see above</em>) will work with the current version of the Nightscout uploader app even after the Mongo 3 update. If you choose to wait to see if an updated uploader app becomes available, please realize you may need to switch to REST API at the last minute to avoid a disruption of service with your site.--> <a name="xdrip"></a> <h2>Users of xDrip</h2> <strong>UPDATED!</strong> xDrip will <strong>not</strong> currently work with Mongo 3. Updating to <a href="#RESTAPI">REST API</a> (<em>see above</em>) is required. <a name="medtronic"></a> <h2>Users of Medtronic Nightscout Uploader</h2> <strong>UPDATED NOTE:</strong> <!--To determine if changes are needed for the Medtronic Nightscout uploader, please consult with the Medtronic Nightscout group.--> The uploader app used for Medtronic Nightscout requires the <em>older</em> syntax for REST API. Please use this format when configuring the BASE URL for <strong>MEDTRONIC NIGHTSCOUT</strong>: <blockquote><span style="color: red;">YOURAPISECRET@https://YOURSITENAME.azurewebsites.net/api/v1/</span></blockquote> <h2>Nightscout Bridge Users</h2> If you use Nightscout to view your iOS/Share data, <span style="color: red;">you <strong>do</strong> need to read through the information below and ensure your site is up to date.</span> You do <strong>not</strong> need to alter your upload method (e.g., REST API does <strong>not</strong> pertain to you). If you either Nightwidget or Nightwatch, please read the information below regarding those. <h2>Nightwidget</h2> <strong>Unless you installed Nightwidget after October 2, 2015, the version of Nightwidget you have will not work with Mongo 3.</strong> An updated version is now available. You will need to download the update and then <a href="/wiki/welcome/creating-a-widget-to-view-azure-site-on-an-android-phone-optional">follow directions to configure it</a> to work with Mongo 3. <h2>Nightwatch</h2> <strong><a href="http://stephenblackwasalreadytaken.github.io/NightWatch/">Nightwatch</a> will work with Mongo 3. Nightwatch can be used as a viewer, a widget, or with an AndroidWear watch. </strong>
Excerpt


OldNewDate CreatedAuthorActions
January 30, 2016 @ 11:06:02 Amy Cowen
October 15, 2015 @ 21:15:40 Melanie Clegg
October 15, 2015 @ 21:15:32 [Autosave] Melanie Clegg
October 6, 2015 @ 22:11:39 Amy Cowen
October 6, 2015 @ 22:10:51 [Autosave] Amy Cowen
October 2, 2015 @ 14:03:00 Amy Cowen
October 1, 2015 @ 09:32:11 Amy Cowen
October 1, 2015 @ 09:31:21 Amy Cowen
September 29, 2015 @ 17:53:27 Amy Cowen
September 29, 2015 @ 13:33:57 Amy Cowen
September 29, 2015 @ 13:33:18 Amy Cowen
September 29, 2015 @ 13:32:39 Amy Cowen
September 27, 2015 @ 23:14:53 Amy Cowen
September 27, 2015 @ 13:30:16 Amy Cowen
September 27, 2015 @ 13:29:18 Amy Cowen
September 27, 2015 @ 13:28:39 Amy Cowen
September 27, 2015 @ 13:24:58 Amy Cowen
September 27, 2015 @ 10:46:54 Amy Cowen
September 27, 2015 @ 10:46:09 Amy Cowen
September 27, 2015 @ 10:44:17 Amy Cowen
September 26, 2015 @ 09:01:25 Amy Cowen
September 26, 2015 @ 09:00:13 Amy Cowen
September 26, 2015 @ 08:59:07 Amy Cowen
September 26, 2015 @ 08:56:53 Amy Cowen
September 23, 2015 @ 08:47:43 Amy Cowen
September 23, 2015 @ 08:47:22 Amy Cowen
September 22, 2015 @ 11:31:47 Amy Cowen
September 22, 2015 @ 11:31:20 Amy Cowen
September 22, 2015 @ 11:30:29 Amy Cowen
September 22, 2015 @ 10:08:03 Amy Cowen
September 22, 2015 @ 10:07:29 Amy Cowen
September 22, 2015 @ 10:05:36 Amy Cowen
September 22, 2015 @ 10:03:32 Amy Cowen
September 22, 2015 @ 10:01:09 Amy Cowen
September 22, 2015 @ 10:00:46 Amy Cowen
September 22, 2015 @ 10:00:07 Amy Cowen
September 22, 2015 @ 09:59:17 Amy Cowen
September 22, 2015 @ 09:02:27 Amy Cowen
September 22, 2015 @ 09:01:15 Amy Cowen
September 22, 2015 @ 08:58:14 Amy Cowen
September 22, 2015 @ 08:56:06 Amy Cowen
September 14, 2015 @ 13:32:32 Amy Cowen
September 14, 2015 @ 13:31:44 Amy Cowen
September 14, 2015 @ 13:29:49 Amy Cowen
September 14, 2015 @ 13:28:35 Amy Cowen
September 14, 2015 @ 13:25:30 Amy Cowen
September 12, 2015 @ 19:42:40 Amy Cowen
September 12, 2015 @ 13:42:04 Amy Cowen
September 12, 2015 @ 13:33:59 Amy Cowen
September 12, 2015 @ 13:27:22 Amy Cowen
September 12, 2015 @ 13:26:41 Amy Cowen
September 12, 2015 @ 13:26:02 Amy Cowen
September 12, 2015 @ 13:22:42 Amy Cowen
September 12, 2015 @ 13:21:06 Amy Cowen
September 12, 2015 @ 13:19:25 Amy Cowen
September 12, 2015 @ 13:16:58 Amy Cowen
September 12, 2015 @ 13:15:56 Amy Cowen
September 12, 2015 @ 13:15:14 Amy Cowen
September 12, 2015 @ 12:54:50 Amy Cowen
September 12, 2015 @ 12:53:46 Amy Cowen
September 12, 2015 @ 12:27:02 Amy Cowen
September 12, 2015 @ 12:21:12 Amy Cowen
September 12, 2015 @ 12:20:22 Amy Cowen
September 12, 2015 @ 11:19:11 Amy Cowen
September 12, 2015 @ 11:18:30 Amy Cowen
September 12, 2015 @ 11:17:06 Amy Cowen
September 12, 2015 @ 02:34:47 Amy Cowen
September 12, 2015 @ 02:30:42 Amy Cowen
September 12, 2015 @ 02:27:38 Amy Cowen
September 12, 2015 @ 02:09:26 Amy Cowen
September 12, 2015 @ 02:06:12 Amy Cowen
September 12, 2015 @ 02:05:32 Amy Cowen
September 12, 2015 @ 02:00:09 Amy Cowen
September 12, 2015 @ 01:45:42 Amy Cowen
September 12, 2015 @ 01:43:55 Amy Cowen
September 12, 2015 @ 01:43:10 Amy Cowen
September 12, 2015 @ 01:38:16 Amy Cowen
September 12, 2015 @ 01:33:10 Amy Cowen
September 12, 2015 @ 01:32:23 Amy Cowen
September 12, 2015 @ 01:31:34 Amy Cowen
September 12, 2015 @ 01:31:15 Amy Cowen
September 12, 2015 @ 00:00:37 Amy Cowen
September 11, 2015 @ 23:58:15 Amy Cowen
September 11, 2015 @ 23:57:46 Amy Cowen
September 11, 2015 @ 23:57:26 Amy Cowen
September 11, 2015 @ 23:56:13 Amy Cowen
September 11, 2015 @ 23:53:20 Amy Cowen
September 11, 2015 @ 23:52:05 Amy Cowen