Closed bjornoleh closed 3 years ago
Github: a single account is enough PS> Completely agree
Heroku: Adding control over multiple NS sites from the same Heroku login PS> many were already thinking about it and if the 1000 free dynos are per app that would make sense
Heroku: Use "Automatic deploy of master" (must use "pull request for updating for this to work, not the "delete fork" procedure) PS> Now that we won't have Azure users anymore (hopefully) it might be an idea. I don't believe deploying is the worst for users. Most stumble on Github upgrade...
MongoDB Atlas: Adding control over multiple NS databases from the same Atlas login PS> This need to be digged as there were worries it would create a data flow not covered by the M0 plan, might be possible too
(and a hint about Reverting to a previous deploy in Heroku, which is useful, but slightly off topic) PS> yes, downgrade is planned to be documented
I used Snagit to capture screenshots and mixed border styles by mistake, mostly PrtScr and Paint. Eventually I'll have to uniformize all pictures. I like having a border as it improves readability.
I still need to complete https://nightscout.github.io/nightscout/admin_tools/ before Decembre 8th when we'll have the last wave of migrations and Upgrade pages will be removed or simplified... then yes, I also think about adding an Advanced section covering other deployments like Ocean Droplets, Containers, home NAS, etc...
Heroku: Adding control over multiple NS sites from the same Heroku login PS> many were already thinking about it and if the 1000 free dynos are per app that would make sense
I don't think the dyno hours is an issue at all. You are simply giving others with a Heroku account access to your app as a "Collaborator". So the dyno hours should not be affected. We have done this for a month or two now with three apps which are registered on individual email accounts connected to my Heroku user (which is used for one of the three). No issues!
It is actually also a nice feature to use if helping someone remotely too. @sulkaharo introduced me to this option, and we used it for some troubleshooting a while ago. Just ask the person you are helping to add your email as a Contributor, and you will have access to the Config Vars, deployment, and Papertrail logs etc. If the person asking for help really isn't on top of things, this may speed things up considerably. Of course, do remember to remove yourself as collaborator when you are done.
Heroku: Use "Automatic deploy of master" (must use "pull request for updating for this to work, not the "delete fork" procedure) PS> Now that we won't have Azure users anymore (hopefully) it might be an idea. I don't believe deploying is the worst for users. Most stumble on Github upgrade...
Possibly, but if managing two or more accounts, it will speed things up if you are done after updating Master by a pull request, instead of visiting each Heroku app and hitting Deploy.
As long as people use the NS-guide for updating (as described here: http://nightscout.github.io/update/update/#step1-update-your-repository-in-github), it should not be a problem. But the list of open PRs in nightscout/cgm-remote-monitor suggests that this is a bit of an issue :-)
MongoDB Atlas: Adding control over multiple NS databases from the same Atlas login PS> This need to be digged as there were worries it would create a data flow not covered by the M0 plan, might be possible too
I think this is ok, similarly as with Heroku. I believe you just grant others the access privileges to your organization. We have done this with three organizations since migrating (10. Oct), and have not run into any issues yet.
@bjornoleh reading your comments I see I completely misunderstood. Now I got you. I need to think how to insert this without confusing the documentation, I guess another page is what is required, and I'll put your text in it.
Cool. Let me know when or if you need the screenshots. I can pm you if you want them unedited (with url and database names visible) , or I can edit them for you.
@bjornoleh ready for your review https://psonnera.github.io/nightscout.github.io/troubleshoot/multiadmin/
Nice! I am quite sure this will be useful for some people. And it doesn't look like too much hassle to set up either. Thanks!
Just a few comments:
https://psonnera.github.io/nightscout.github.io/troubleshoot/multiadmin/#heroku
You will now see it as a collaborator. Using the pen icon you can modify it or delete it (like when used for other people remote support).
To rename the organization, klick the gear icon next to the selected name Edit the Organization Name by clicking the pen icon
@bjornoleh can't find the FB post regarding profiles and Loop... is that the same idea? https://looptips.wordpress.com/deleting-loop-profiles-in-nightscout
@psonnera yes, that is the crude one for deleting the whole profile collection.
Alternatively, selective deletion is possible, for example by using Robo 3T (https://robomongo.org/) as shown in this video (remember to viev it in 720P, otherwise it'll be too blurry) https://youtu.be/iipp0MfPKNQ
This is the FB post https://m.facebook.com/groups/CGMITCOFFTOPIC/permalink/1191967457866937/
@bjornoleh looking at the amount of work to duplicate this, I believe I'll just link the video and Wordpress document in an additional troubleshooting entry. Is this acceptable?
Just deleting the profile collection is not that bad, but yes, the selective deletion is too much, just link to the video for that. Perhaps you could include the steps in the wordpress document properly in the troubleshooting? And just make a warning that all profile data will be deleted, and if this is not acceptable: please follow the steps in the video. Sounds good?
Implemented
Ping related to this topic: when people add other users to their Heroku accounts, this opens up potential vulnerability of those users being able to deploy new malicious versions of Nightscout and/or modify data in Mongo, so this should be done with extreme care.
While migrating our NS sites to Atlas, I documented some steps to simplify the management of multiple NS sites. I didn't want to mention this earlier, as there have been more than enough to deal with regarding the migration process.
Perhaps we could now consider adding these steps to a separate page in http://nightscout.github.io/?
The hints are given in the order of usefulness. Number 1. - 3. are easy, and could be considered mandatory when managing multiple NS sites. Number 4 is the most effort, and probably not very useful to most.
(and a hint about Reverting to a previous deploy in Heroku, which is useful, but slightly off topic)
I have the required screenshots, but haven't edited out the usernames etc yet. @psonnera , what are you using to edit screenshots? It could be good to do it consistently throughout the documentation.
Managing multiple Nightscout sites: Hints to reduce the administrative burden -but it will take a few clicks now to set it up:
Github: You need only one Github account!
Then, the Github part of the update Nightscout will only have to be done once. (must use "pull request for updating for this to work, not the "delete fork" procedure)
(make it even clearer in http://nightscout.github.io/nightscout/new_user/#step-1-create-a-github-account that only one account is needed for multiple NS sites).
Heroku https://dashboard.heroku.com/apps
Log into the Heroku account that you wish to administer from another account (let’s call the other account the “master Heroku account”). Select the “App” you want to access from the master account. Click Access Click Add collaborator Enter the email address which is used with the master Heroku account Click Save changes
You will receive an email, but no actions are needed. Log out of the current account Log into your “master Heroku account” All “Apps” (NS-instances) will be available after login. Select either one to do what you need to do.
Automatic deploy of Nightscout Master: Click Deploy
Scroll down to Deployment method – Check that your Github account is connected Scroll down to Automatic deploys Click Enable Automatic Deploys
Do this for each Nightscout instance in Heroku. Now, all your NS sites will be updated to the latest Master as soon as you perform a “Pull request” in Github.
To update NS, please follow the instructions from within the NS site Click Check for Updates and follow the instructions. There is a mention about how to proceed with “Enable Automatic Deploys” turned on. You will only have to do this for one of the NS-sites, the others will be updated simultaneously if you followed the steps above.
(Reverting to a previous deploy:) Should you ever regret updating your NS, it is easy to revert to any previous version. Click Activity Find your previous deploy in the list Click “Roll back to here” This goes for any changes made to the Heroku Config variables as well.
MongoDB Atlas After having migrated your NS databases to MongoDB Atlas (or set up a new NS site with Atlas), these few steps will let you manage all your databases from one login.
https://account.mongodb.com/account/login Log into the Atlas account that you wish to administer from another account (let’s call the other account the “master Atlas account”). ORGANIZATION: Click Access Manager Click Invite Users
Enter the email address of the “master Atlas account” Select access permissions: Organization Owner Click Invite to Organization
The invited account will be listed in the Access Manager
Log out of the current Atlas user, and into the “master Atlas account”. You should never have to log into the other accounts again. Check the email which is used for the “master Atlas account”, look for “Invitation to MongoDB Cloud”, and click “Accept Invite”.
You will be prompted to log into your “master Atlas account” to accept the invite. Click your name in the upper left-hand corner You will find all your organizations here. Select either one.
Optional: To rename the organization, klick the gear icon next to the selected name Edit the Organization Name by clicking the pen icon