1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Explain roles/remoteit + avoid contention among its 3 services

This commit is contained in:
root 2022-04-03 22:58:28 -04:00
parent a40183fd2e
commit dd3bf7381a
3 changed files with 27 additions and 23 deletions

View file

@ -12,20 +12,20 @@ For other approaches, please see http://FAQ.IIAB.IO -> "How can I remotely manag
1. Browse to [https://remote.it](https://remote.it) (Web Portal) and sign up for an account.
2. Download and install the remote.it [desktop application](https://remote.it/download/) (e.g. for Windows, macOS or Linux) on your own laptop/computer. Their https://remote.it Web Portal and [mobile apps](https://docs.remote.it/introduction/get-started/readme#installation-packages) are also sometimes possible, but less functional.
2. Download and install the remote.it [desktop application](https://remote.it/download/) (e.g. for Windows, macOS or Linux) on your own laptop/computer. Their https://remote.it Web Portal and [mobile apps](https://docs.remote.it/introduction/get-started/readme#installation-packages) are also sometimes sufficient, but less functional.
COMPARISON: "The Desktop and [CLI](https://docs.remote.it/software/cli) can [each] support both peer to peer connections and proxy connections [whereas] the Web Portal and API can only support proxy connections" according to https://docs.remote.it/software/device-package/usage
<!-- ### Install remote.it onto an IIAB + register it + authorize services/ports -->
### Generate a remote.it claim code for your IIAB + register it + authorize services/ports
Prerequisite: Find an IIAB with `remoteit_installed: True` in `/etc/iiab/iiab_state.yml`.
Prerequisite: Find an IIAB with `remoteit_installed: True` in `/etc/iiab/iiab_state.yml`
1. Run `sudo iiab-remoteit`
Hit `[Enter]` twice if you want to quickly generate a new claim code for your IIAB.
The claim code is stored in `/etc/remoteit/config.json` and must be used [within 24 hours](https://docs.remote.it/device-package/installation#2.-update-your-package-manager-and-install).
The claim code is put in `/etc/remoteit/config.json` and must be used [within 24 hours](https://docs.remote.it/device-package/installation#2.-update-your-package-manager-and-install).
<!--
1. Connect your IIAB device to the Internet.
@ -75,13 +75,13 @@ Prerequisite: Find an IIAB with `remoteit_installed: True` in `/etc/iiab/iiab_st
2. Submit the claim code within the remote.it [desktop application](https://remote.it/download/) on your own laptop/computer. Or if you prefer, do that by logging into their Web Portal at: https://remote.it
Either way, click on the '+' icon to enter the remote.it claim code (to register the IIAB device to your account) as shown in this [screenshot](https://docs.remote.it/software/device-package/installation#3.-claim-and-register-the-device).
Either way, click on the '+' icon to enter the remote.it claim code (to register the IIAB device to your remote.it account) as shown in this [screenshot](https://docs.remote.it/software/device-package/installation#3.-claim-and-register-the-device).
3. Authorize services/ports (e.g. SSH, HTTP, etc) for your IIAB device, as shown in these [screenshots](https://docs.remote.it/software/device-package/installation#4.-set-up-services-on-your-device).
SUMMARY: One or more remote.it "Services" need to be authorized (registered) to allow remote access to your IIAB device:<br>https://support.remote.it/hc/en-us/articles/360060992631-Services
SUMMARY: One or more [remote.it "Services"](https://support.remote.it/hc/en-us/articles/360060992631-Services) needs to be authorized (registered) to allow remote access to your IIAB device.
EXAMPLES: SSH (port 22) and/or HTTP (port 80):<br>https://support.remote.it/hc/en-us/articles/360058603991-Configuring-remoteit-Services-on-devices-with-remote-it-Desktop
EXAMPLES: Add an SSH Service on port 22 and/or add an http Service on port 80 [screenshot guide](https://support.remote.it/hc/en-us/articles/360058603991-Configuring-remoteit-Services-on-devices-with-remote-it-Desktop).
### How to I disable remote.it on my IIAB?
@ -123,4 +123,4 @@ Prerequisite: Find an IIAB with `remoteit_installed: True` in `/etc/iiab/iiab_st
## Known Issues
- <strike>2021-10-27: This needs to be enhanced rather urgently, so remote.it also works when IIAB is installed on Raspberry Pi OS 11 (Bullseye), Ubuntu, Mint and Debian:</strike> [#3006](https://github.com/iiab/iiab/issues/3006)
- 2021-10-29: The above OS issues should be resolved by [PR #3007](https://github.com/iiab/iiab/pull/3007), [PR #3009](https://github.com/iiab/iiab/pull/3009) and [PR #3010](https://github.com/iiab/iiab/pull/3010) &mdash; but this needs final testing! (Initial testing occurred on [1] 32-bit Raspberry Pi OS Lite on Raspberry Pi 4 and [2] Ubuntu Server 20.04 on x86_64 VM.)
- <strike>2021-10-29: The above OS issues should be resolved by [PR #3007](https://github.com/iiab/iiab/pull/3007), [PR #3009](https://github.com/iiab/iiab/pull/3009) and [PR #3010](https://github.com/iiab/iiab/pull/3010) &mdash; but this needs final testing! (Initial testing occurred on [1] 32-bit Raspberry Pi OS Lite on Raspberry Pi 4 and [2] Ubuntu Server 20.04 on x86_64 VM.)</strike>

View file

@ -1,16 +1,20 @@
- name: Enable & (Re)Start remote.it's daemons {connectd, schannel}
- name: Enable & Restart remote.it service connectd, which exits after spawning 2 services/daemons below
systemd:
name: "{{ item }}"
name: connectd
daemon_reload: yes
enabled: yes
state: restarted
with_items:
- connectd
- schannel
state: restarted
when: remoteit_enabled
- name: Enable remote.it daemon schannel ("Remote tcp command service") -- try to avoid contention with connectd also spawning it above!
systemd:
name: schannel
enabled: yes
state: started
when: remoteit_enabled
- name: Disable & Stop remote.it's daemons {connectd, schannel}
- name: Disable & Stop remote.it services {connectd, schannel}
systemd:
name: "{{ item }}"
enabled: no
@ -20,8 +24,8 @@
- schannel
when: not remoteit_enabled
- name: Identify remoteit service (connector) unit file name, including uuid
shell: ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit # e.g. remoteit@80:00:01:7F:7E:00:56:36.service
- name: Identify remoteit "Remote tcp connection service" unit file name, including uuid, e.g. remoteit@80:00:01:7F:7E:00:56:36.service
shell: ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit
register: remoteit_service
ignore_errors: yes

View file

@ -36,19 +36,19 @@ else
# '|| true' overrides 'bash -e' so script continues if config.json missing
mv /etc/remoteit/config.json /etc/remoteit/config.json.$(date +%F_%T_%Z) || true
echo -e "In just a few seconds, all 3 services should be enabled + started.\n"
echo -e "In just a few seconds, all 3 services should be enabled/started.\n"
systemctl restart connectd # Claim Code logic + kickstarts 2 svcs below
systemctl enable connectd # 3 enable lines, like enable-or-disable.yml
systemctl enable connectd # 2 enable lines, like enable-or-disable.yml
# "Remote tcp command service" started above
systemctl enable schannel # 3 enable lines, like enable-or-disable.yml
# schannel = "Remote tcp command service" started by connectd above if nec
systemctl enable schannel # 2 enable lines, like enable-or-disable.yml
# "Remote tcp connection service" appears a few seconds after connectd is
# started above. It's also auto-enabled by above, so this may be overkill:
systemctl enable $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@) # 3 enable lines, like enable-or-disable.yml
# started above. Auto-enabled when spawned by connectd, SO NOT NEC HERE:
# systemctl enable $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@)
# Its systemd service name (e.g. remoteit@80:00:01:7F:7E:00:56:36.service)
# changes when a new claim code is generated.
# changes when a new claim code is generated!
fi
if grep -q '^remoteit_enabled:' /etc/iiab/local_vars.yml; then