Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Off-Internet nodes with laptop clients #1

Open
benhylau opened this issue Feb 7, 2018 · 3 comments
Open

Off-Internet nodes with laptop clients #1

benhylau opened this issue Feb 7, 2018 · 3 comments

Comments

@benhylau
Copy link

benhylau commented Feb 7, 2018

I am hoping to use this for a workshop, using this as the base OS on Raspberry Pi 3. The network is created ad-hoc and completely isolated from the Internet, with nodes communicating over cjdns tun interfaces. I have a couple questions:

  1. I cannot npm install since the nodes are not on the Internet, so I am thinking to pre-build a docker image of this based on https://github.com/nodejs/docker-node/blob/master/9/alpine/Dockerfile and place it into every node's home dir (docker-ce is already on each node). Do you think this will work?

  2. Clients are connected to the Raspberry Pi access point, how can we expect them to interact with the sbot websocket? I would like two interactions:

    • From a laptop client, command line interface to send and receive messages to the Raspberry Pi mDNS address (e.g. bloor.local) with similar syntax as what you would do from the Raspberry Pi SSH session: sbot publish --type post --text "Hello, world!"

    • From a laptop client, browse to their mDNS address (e.g. http://bloor.local) and have a UI similar to Patchwork / Patchbay / Patchfoo

Storage is not really a concern since these nodes are only active for the duration of the workshop, the ramdisk filesystem is backed by 6 GB of SD card space, and will be reset upon power cycle.

Please close if Issues is not the right place for questions.

cc. @ansuz @jkms

@vuldin
Copy link
Owner

vuldin commented Feb 9, 2018

That's awesome that you plan to use this for a workshop! Here are answers to your questions:

  1. I see no reason why this wouldn't work with a prebuilt docker image as you mention, but I haven't considered that approach up to this point. The main reason was because I too was hoping to use cjdns for generating the IP address, but I don't know enough about cjdns so I was assuming you would need to have a connection to the broader cjdns network in order to generate an valid IP address. If you have information on this IP allocation step is done with cjdns that would be awesome. Aside from that, I was looking into ansible to automate deployments (see this cool video). But again, some of the steps would require an Internet connection so it may not be helpful for your use case.
  2. I think both of your proposed ways for connecting to the sbot service would work, but the first option (using sbot cli) would be bypassing this project for the most part. My plan is to have a separate web application that connects to scuttlebot over the websocket connection provided by this project. I haven't pushed it to github yet, but I'll make sure to do so within the next day or so regardless of whether it does everything. For instance, right now it only connects and show the real-time messages (any posts or activity that happens while the websocket connection is active). I was hoping to make the app capable of pulling old activity as well, but maybe that can wait to be added into a separate commit once the project is available. It may not be what you are looking for, but it would be one possibility for getting data from scuttlebot via websocket in a web application.

I'll post a link to the project here once I push it to github.

@benhylau
Copy link
Author

benhylau commented Feb 9, 2018

so I was assuming you would need to have a connection to the broader cjdns network in order to generate an valid IP address

Nope that is not necessary. The client on first run generates a valid cjdns address without need for Internet / hyperboria / any network connection: https://github.com/cjdelisle/cjdns/blob/master/contrib/systemd/cjdns.service#L10-L14

ansible to automate deployments

I have not worked with ansible but I was looking into Terraform before. I think it would make sense if you need to deploy multiple instances, but it can still be used as orchestration for the docker containers: https://docs.ansible.com/ansible/latest/guide_docker.html

the first option (using sbot cli) would be bypassing this project for the most part

I was thinking to have a sbot-like cli that talks to the websocket, but yes I think that's not really necessary, since the point was just to show the raw messages, I can just do that with actual sbot cli in the SSH session.

My plan is to have a separate web application that connects to scuttlebot over the websocket connection provided by this project.

This would be perfect. It doesn't need to do everything, and can be iteratively added upon, and the workshop is not until April. Of course I'd like to try it much earlier than that if the software is available :) Thanks for putting this project together!

@vuldin
Copy link
Owner

vuldin commented Mar 6, 2018

@benhylau Apologies for not posting webapp project for scuttlebutt (work, side projects, move to Toronto, and tons of other things...).

But someone else has made what looks at first glance to be an awesome take on a self-hosted scuttlebutt frontend: https://github.com/fenwick67/self-hosted-ssb

Take a look and see if it doesn't work for your purposes! I'll be taking a look when I have time myself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants