New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activate local-only mode [Lokole "offline" email] #1853
Conversation
Signed-off-by: Aidan Fitzgerald <acf67@cornell.edu>
@aidan-fitz can you put a sentence into https://github.com/iiab/iiab/blob/master/roles/lokole/README.rst explaining how (and when!) to override variable |
e.g. some IIAB's are run with various kinds of (intermittent?) Internet connections, and some are run more fully offline. In which circumstances do you recommend manually overriding this variable? And is changing this possible at the command line, for less technical field operators — when the IIAB machine's placement/circumstances unexpectedly change after it's been installed — e.g. the village receives partial Internet of some kind? |
A few 3G/4G LTE modem suggestions, that others have used with Lokole: |
@c-w Based on this passage from the README, if a sysadmin wanted to configure Lokole to work with a modem, they would have to use the installation script. They could not just set
For context, some IIAB devices will be connected with USB modems. |
@holta I'm thinking that we can add a separate playbook to configure an already installed Lokole software instance to use a modem plugged into the IIAB device, and to deconfigure it back to local-only mode. Possible failure: the Lokole instance was configured to use a modem, but starts up with no modem or a different modem plugged in. Would it fail? |
@m-anish @jvonau can you review the suggested IIAB + 3G/4G Modem approach below? My own hunch (I could be quite wrong!) is that many/most technical implementers would prefer to have clean docs / HOWTO in this case? Rather than an additional playbook that might be hard to maintain with all sorts of different/evolving USB "GSM" modems?
|
@aidan-fitz Part of my concern is that IIAB 7.0 should not be adding any playbooks at this very late stage in its release cycle. But if that's definitely the best way to skin the cat, for IIAB 7.1 or an emergency exception to IIAB 7.0's current feature freeze or whatever, we'll certainly be understanding...of what's most practical+pragmatic for Lokole communities! |
There are quite a few things that need to happen for Lokole to use a USB modem and send live emails (see our full install script) such as setting up WiFi (hostapd and dnsmasq), setting up modem tools (usb_modeswitch and wvdial) and setting up the MX records and Sendgrid account (requires a registration credential included in a http request to opwen-cloudserver). Additionally, we recently offloaded email exchange to a worker thread to increase reliability so the opwen-webapp daemons (celery worker, celery beat and restarter) would also have to be set up. Once all of this machinery is set up, the app will take care of period or on-demand email exchange as well as configuring the supported modems. Modem dial-up information can either be pulled from a database via mkwvconf or configured manually. Both of these tasks can be done in the admin UI so adding support for new SIM card configurations is essentially self-service. Adding support for new modems is mode involved since it requires knowing the correct magic bytes to switch the modem from storage mode to dial-up mode via usb_modeswitch so supporting new modems currently requires a code change. While all of this is somewhat involved, it can all be done: we already solved all these problems in the Lokole project so it should be possible to port the code to IIAB. My bigger concern is how to manage client registration. Setting up a new Lokole email domain is fully automated but we don't have the support staff to handle the increased operational burden from unplanned/ungated registrations which is why we currently onboard new inboxes after discussing with the owner of the inbox. How would you propose to best share the workload between IIAB deployments that wish to use a live Lokole integration? |
Sorry, but can someone outline:
|
Ignore this for now as the settings page seems to be irrelevant. |
I don't want to delay this PR from being merged, so if there's anything y'all need me to do, I'll do it in a follow-up PR. |
I've lived through more than enough decades to know that documentation needs to happen before merging, not sometime later (-: So call if it's easier. As mentioned at the beginning of the week, https://github.com/iiab/iiab/blob/master/roles/lokole/README.rst needs to be updated, to explain We should also say...something like:
|
After https://github.com/iiab/iiab/blob/master/roles/lokole/README.rst communicates the very basics (as this PR should do) these other Lokole docs can sometime later be refined as necessary: (not every doc below is preaching to the same choir of course, so the focus/audience/expectation of each can be quite different!)
|
Signed-off-by: Aidan Fitzgerald <acf67@cornell.edu>
Signed-off-by: Aidan Fitzgerald <acf67@cornell.edu>
@holta: I've added three paragraphs toward the end of the README about the default configuration and how Lokole could be configured to use the Internet. I've written it without making any assumption as to whether the IIAB device is using a USB modem, Ethernet cable, or SIM card, even though it seems like only USB modems are used in reality. |
Fixes Bug
#1830 -- even with the previous PR (#1844), the bug isn't actually fixed!
Description of changes proposed in this pull request.
Configure the Lokole webapp with environment variable
OPWEN_SIM_TYPE='LocalOnly'
so that the Lokole offline instance knows that it is offline.Here's a screenshot of the app with this change:
Smoke-tested in operating system.
Confirmed that this works on my staging box.
Mention a team member for further information or comment using @ name
@holta @m-anish