Browse Source

list

master
zeus 2 years ago
parent
commit
d24316514d
  1. 2
      auto-complete.sh
  2. 10
      build.sh
  3. 5
      tech-list/antora.yml
  4. BIN
      tech-list/modules/ROOT/images/adhoc.png
  5. BIN
      tech-list/modules/ROOT/images/swarmlab.png
  6. BIN
      tech-list/modules/ROOT/images/trafic.png
  7. BIN
      tech-list/modules/ROOT/images/vehigle.png
  8. 1
      tech-list/modules/ROOT/nav.adoc
  9. 354
      tech-list/modules/ROOT/pages/index-setup.adoc
  10. 125
      tech-list/modules/ROOT/pages/index.adoc
  11. 4
      tech-list/run/build-intro.sh
  12. 4
      tech-list/run/build.sh
  13. 21
      tech-list/site.yml

2
auto-complete.sh

@ -4,7 +4,7 @@ function libs()
{
if [ "$1" != "" ];
then
COMPREPLY=($(compgen -W "network-scanning network-adhoc raspi-docker sensor-node ssh-tunneling iptables poc-datacollector help" "${COMP_WORDS[$COMP_CWORD]}"))
COMPREPLY=($(compgen -W "network-scanning network-adhoc raspi-docker tech-list sensor-node ssh-tunneling iptables poc-datacollector help" "${COMP_WORDS[$COMP_CWORD]}"))
fi
}

10
build.sh

@ -43,6 +43,8 @@ usage ()
echo ""
echo -e " ${txtg}ssh-tunneling:${NOCOLOR} This tutorial demonstrates, howto create a ssh-tunneling & howto use it "
echo ""
echo -e " ${txtg}tech-list:${NOCOLOR} This tutorial provides a list of commonly used tools "
echo ""
echo -e " ${txtg}help:${NOCOLOR} show this message"
echo " ./build.sh help"
echo ""
@ -141,6 +143,14 @@ do
COMMAND_CREATE=1
;;
tech-list)
DESC="tech-list" ;
build="build.sh" ;
# source adoc directory
docdir="tech-list" ;
COMMAND_CREATE=1
;;
iptables)
DESC="iptables" ;
build="build.sh" ;

5
tech-list/antora.yml

@ -0,0 +1,5 @@
name: swarmlab_tech-list
title: swarmlab_tech-list
version: docs
nav:
- modules/ROOT/nav.adoc

BIN
tech-list/modules/ROOT/images/adhoc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
tech-list/modules/ROOT/images/swarmlab.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
tech-list/modules/ROOT/images/trafic.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
tech-list/modules/ROOT/images/vehigle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

1
tech-list/modules/ROOT/nav.adoc

@ -0,0 +1 @@
* xref:index.adoc[list]

354
tech-list/modules/ROOT/pages/index-setup.adoc

@ -0,0 +1,354 @@
= Setup
TIP: Tested on a Raspberry Pi with "Buster"
== Intro
networkd is a small and lean service to configure network interfaces, designed mostly for server use cases in a world with hotplugged and virtualized networking. Its configuration is similar in spirit and abstraction level to ifupdown, but you don't need any extra packages to configure bridges, bonds, vlan etc. It is not very suitable for managing WLANs yet; NetworkManager is still much more appropriate for such Desktop use cases.
There are mainly three setups to have a peer to peer network:
* unprotected ad-hoc interface by configuring the WiFi device
* unprotected ad-hoc interface using wpa_supplicant (Recommended)
* Only with suitable (RSN-IBSS capable) USB dongle:
* protected ad-hoc interface using wpa_supplicant and WPA encryption (best solution if possible)
* ad-hoc interface with additional USB/WiFi dongle for uplink to internet router
== Install systemd-networkd
=== deinstall classic networking and install it!
* *sudo su* # if not already done
*deinstall*
[source,sh]
----
systemctl daemon-reload
systemctl disable --now ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog
apt --autoremove purge -f ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog
rm -r /etc/network /etc/dhcp
# setup/enable systemd-resolved and systemd-networkd
systemctl disable --now avahi-daemon libnss-mdns
apt --autoremove -f purge avahi-daemon
apt install -f libnss-resolve
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
apt-mark hold avahi-daemon dhcpcd dhcpcd5 ifupdown isc-dhcp-client isc-dhcp-common libnss-mdns openresolv raspberrypi-net-mods rsyslog
systemctl enable systemd-networkd.service systemd-resolved.service
----
== Install optional
[source,sh]
----
apt-get install raspberrypi-kernel-headers -y
----
=== setup wired connection
*wired connection*
[source,sh]
----
cat > /etc/systemd/network/04-wired.network <<EOF
[Match]
Name=e*
[Network]
## Uncomment only one option block
# Option: using a DHCP server and multicast DNS
LLMNR=no
LinkLocalAddressing=no
MulticastDNS=yes
DHCP=ipv4
# Option: using link-local ip addresses and multicast DNS
#LLMNR=no
#LinkLocalAddressing=yes
#MulticastDNS=yes
# Option: using static ip address and multicast DNS
Address=192.168.1.18/24 // <1>
Gateway=192.168.1.1 // <2>
DNS=8.8.8.8 1.1.1.1 // <3>
MulticastDNS=yes
EOF
----
<1> use your settings
<2> use your settings
<2> use your settings
=== Reboot
NOTE: reboot
== Config
=== NSS
*config nss*
[source,sh]
----
apt --autoremove purge avahi-daemon
apt-mark hold avahi-daemon
apt install -f libnss-resolve
echo ""
echo "For troubleshooting you may have a look at /etc/nsswitch.conf. It should contain a line like this:"
echo ""
echo "hosts: files resolve [!UNAVAIL=return] dns"
echo ""
echo ""
echo ""
echo ""
----
=== DNS
*config dns*
[source,sh]
----
echo ""
echo "Configure DNS stub listener interface"
echo ""
echo "Here we have to symlink /etc/resolv.conf to the stub listener:"
echo ""
echo " exec4you ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf"
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
echo ""
echo "Check name resolution"
resolvectl status
----
== unprotected ad-hoc interface using wpa_supplicant
Follow *Install systemd-networkd*
Then come back here.
TIP: unprotected
* *sudo su* # if not already done
[source,sh]
----
cat > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf <<EOF
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
update_config=1
p2p_disabled=1
country=GR
network={
ssid="IBSS-RPiNet"
frequency=2412 # channel 1
mode=1 # IBSS (ad-hoc, peer-to-peer)
key_mgmt=NONE
}
EOF
chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
systemctl enable wpa_supplicant@wlan0.service
echo ""
echo "enabled4you"
echo "systemctl enable wpa_supplicant@wlan0.service"
echo ""
----
=== Reboot
NOTE: Reboot
=== Check
[source,sh]
----
echo ""
echo "Check with:"
echo ""
echo "iw dev"
echo ""
echo "iw dev wlan0 link"
echo ""
echo "ip addr"
echo ""
echo "sudo iw dev wlan0 scan | grep -B8 -A3 "IBSS-RPiNet""
echo ""
# From another ad hoc connected device you should be able to
echo "From another ad hoc connected device you should be able to"
echo ""
echo "ping -c3 raspberrypi.local"
echo ""
----
== protected ad-hoc interface using wpa_supplicant
CAUTION: Raspberry Pi does not support encrypted IBSS connections!. You have to use an additional USB WiFi dongle that usually registers an interface wlan1. My setup shows:
Follow *Install systemd-networkd*
Then come back here.
*check*
[source,sh]
----
iw list | grep -P "Wiphy|RSN-IBSS"
----
*output*
[source,sh]
----
Wiphy phy1
Device supports RSN-IBSS.
Wiphy phy0
----
You cannot find this support entry for Wiphy pyh0 that is the on-board WiFi device.
=== Install driver
TIP: Example TP-Link
[source,sh]
----
echo "lsusb"
echo ""
echo "Example for TP-Link"
echo ""
echo "Bus 001 Device 005: ID 2357:0109 TP-Link TL WN823N RTL8192EU"
echo ""
sudo wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi
echo ""
echo "sudo install-wifi -h"
echo ""
echo "will give details on how to use the script."
echo ""
echo "To download the driver for your current kernel use command"
sudo install-wifi
echo "sudo install-wifi 8192eu"
echo ""
sudo install-wifi 8192eu
echo ""
echo "If you update your kernel version you will need to re-run the script to update the driver version."
----
NOTE: *On message: *
====
[source,sh]
----
Your Pi revision number is a02082
You have a Pi 3B v1.2
Checking for a 8188eu wifi driver module for your current kernel.
A driver does not exist for this update.
----
* Find source for driver e.g.
[source,sh]
----
git clone https://github.com/lwfinger/rtl8188eu.git
cd rtl8188eu
make all
sudo make install
sudo depmod
sudo modprobe 8188eu
lsmod 8188eu
----
====
=== setup
[source,sh]
----
sudo systemctl disable --now wpa_supplicant@wlan0.service
echo "sudo -Es # if not already done"
echo ""
cat > /etc/wpa_supplicant/wpa_supplicant-wlan1.conf <<EOF
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
update_config=1
p2p_disabled=1
country=GR
network={
ssid="IBSS-RPiNet"
key_mgmt=WPA-PSK
proto=RSN
psk="verySecretPasswordi123"
mode=1
frequency=2412
}
EOF
chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
systemctl enable wpa_supplicant@wlan1.service
----
=== Reboot
NOTE: reboot
[source,sh]
----
echo ""
echo "reboot."
echo ""
----
=== Check
[source,sh]
----
echo "iw dev"
echo ""
echo "iw dev wlan1 link"
echo ""
echo "ip addr"
echo ""
echo "sudo iw dev wlan1 scan | grep -B8 -A3 "IBSS-RPiNet""
echo ""
echo "From another ad hoc connected device you should be able to"
echo ""
echo "ping -c3 raspberrypi.local"
echo ""
----
* https://raspberrypi.stackexchange.com/questions/94047/how-to-setup-an-unprotected-ad-hoc-ibss-network-and-if-possible-with-wpa-encry/94048#94048[origin^]

125
tech-list/modules/ROOT/pages/index.adoc

@ -0,0 +1,125 @@
= List!
image::ROOT:swarmlab.png[swarmlab,150,float=right]
== Why Docker
https://www.cloudbees.com/blog/why-dockero[Why Docker^]
== Intro docker
https://www.compose-spec.io/
https://github.com/veggiemonk/awesome-docker
https://twitter.com/awesome_docker
=== Learn to build and deploy your distributed applications easily to the cloud with Docker
https://docker-curriculum.com/
== Next Step DockerSwarm
https://www.youtube.com/watch?v=Tm0Q5zr3FL4
https://www.simplilearn.com/tutorials/docker-tutorial/docker-swarm
=== Getting started with swarm - official from docker
https://docs.docker.com/engine/swarm/swarm-tutorial/https://k21academy.com/docker-kubernetes/docker-swarm/
=== Replicability, use the same files as when developing locally.
https://dockerswarm.rocks/
=== Open Source Cloud Guide από την IBM
https://open-cloud-guide.dev/
=== Alternatives
https://www.nomadproject.io/
https://dev.to/stevenmcgown/kubernetes-for-dummies-5hmh
=== Raft consensus in swarm mode
https://docs.docker.com/engine/swarm/raft/
https://raft.github.io/
http://thesecretlivesofdata.com/raft/
== Next Step Storage
https://www.youtube.com/watch?v=W2Z7fbCLSTw
=== Generic
https://docs.mongodb.com/manual/replication/
https://docs.mongodb.com/manual/core/capped-collections/
=== On memory
https://redis.io/topics/cluster-tutorial
https://redis.io/
https://www.instaclustr.com/blog/redis-vs-memcached/
=== Sharing
==== NFS
https://cloud.netapp.com/blog/azure-anf-blg-linux-nfs-server-how-to-set-up-server-and-client
https://www.gluster.org/
== Deploy
https://www.compose-spec.io/
https://www.youtube.com/watch?v=zLltQxVb3NI
https://12factor.net/
== Technologies
=== programming language
==== nodeJS
https://www.youtube.com/watch?v=ENrzD9HAZK4
https://nodejs.org/en/
https://p5js.org/
https://threejs.org/
==== python
https://www.python.org/
=== Big data and Scientific analysis
https://numpy.org/
https://scipy.org/
https://jupyter.org/
=== Rest API
https://www.youtube.com/watch?v=s7wmiS2mSXY
=== Sockets
https://www.youtube.com/watch?v=ZBM28ZPlin8
https://socket.io/
== Auth
https://oauth.net/2/
https://oauth.net/code/nodejs/
=== Auth server
https://www.keycloak.org/
== Security VPN etc
https://www.wireguard.com/
== POC
=== netflix
https://www.youtube.com/watch?v=CZ3wIuvmHeM
6:50 monolithic
8:24 minroservices
19:00 microservice
see also 37:00
https://netflix.github.io/
=== Robots and IoT
https://nodebots.io/
http://johnny-five.io/
https://ardupilot.org/
https://github.com/ArduPilot/ardupilot

4
tech-list/run/build-intro.sh

@ -0,0 +1,4 @@
antora --fetch /antora/site-intro.yml
antora /antora/site-intro.yml
ifconfig
http-server build/site -c-1

4
tech-list/run/build.sh

@ -0,0 +1,4 @@
antora --fetch /antora/site.yml
antora /antora/site.yml
ifconfig
http-server build/site -c-1

21
tech-list/site.yml

@ -0,0 +1,21 @@
site:
title: Swarmlab tech-list
url: http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs
start_page: swarmlab_tech-list::index.adoc
content:
sources:
- url: https://git.swarmlab.io:3000/docs/Documentation.git
branches: master
start_path: tech-list
ui:
bundle:
url: https://git.swarmlab.io:3000/docs/docs/raw/branch/master/ui-bundle.zip
snapshot: true
supplemental_files: ./supplemental-ui
asciidoc:
attributes:
:plantuml-server-url: http://www.plantuml.com/plantuml
extensions:
- '@djencks/asciidoctor-mathjax'
- asciidoctor-plantuml
Loading…
Cancel
Save