diff --git a/auto-complete.sh b/auto-complete.sh index a94b201..527cf87 100755 --- a/auto-complete.sh +++ b/auto-complete.sh @@ -4,7 +4,7 @@ function libs() { if [ "$1" != "" ]; then - COMPREPLY=($(compgen -W "network-scanning network-adhoc raspi-docker tech-list sensor-node ssh-tunneling iptables poc-datacollector help" "${COMP_WORDS[$COMP_CWORD]}")) + COMPREPLY=($(compgen -W "network-scanning network-adhoc raspi-docker tech-list faq sensor-node ssh-tunneling iptables poc-datacollector help" "${COMP_WORDS[$COMP_CWORD]}")) fi } diff --git a/build.sh b/build.sh index fbe0afc..abf11bc 100755 --- a/build.sh +++ b/build.sh @@ -29,6 +29,8 @@ usage () echo "" echo " Examples of [OPTIONS] can be:" echo "" + echo -e " ${txtg}faq:${NOCOLOR} FAQ " + echo "" echo -e " ${txtg}iptables:${NOCOLOR} This tutorial demonstrates, howto setup iptables & howto use it " echo "" echo -e " ${txtg}network-scanning:${NOCOLOR} This tutorial demonstrates some common nmap port scanning scenarios and explains the output. " @@ -104,6 +106,13 @@ do COMMAND_CREATE=1 ;; + faq) + DESC="faq" ; + build="build.sh" ; + docdir="faq" ; + COMMAND_CREATE=1 + ;; + network-adhoc) DESC="network-adhoc" ; build="build.sh" ; diff --git a/faq/antora.yml b/faq/antora.yml new file mode 100644 index 0000000..2f15087 --- /dev/null +++ b/faq/antora.yml @@ -0,0 +1,5 @@ + name: swarmlab_faq + title: swarmlab_faq + version: docs + nav: + - modules/ROOT/nav.adoc diff --git a/faq/modules/ROOT/images/adhoc.png b/faq/modules/ROOT/images/adhoc.png new file mode 100644 index 0000000..6256678 Binary files /dev/null and b/faq/modules/ROOT/images/adhoc.png differ diff --git a/faq/modules/ROOT/images/swarmlab.png b/faq/modules/ROOT/images/swarmlab.png new file mode 100644 index 0000000..d94ea42 Binary files /dev/null and b/faq/modules/ROOT/images/swarmlab.png differ diff --git a/faq/modules/ROOT/nav.adoc b/faq/modules/ROOT/nav.adoc new file mode 100644 index 0000000..ed063c5 --- /dev/null +++ b/faq/modules/ROOT/nav.adoc @@ -0,0 +1 @@ +* xref:index.adoc[faq] diff --git a/faq/modules/ROOT/pages/index.adoc b/faq/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000..ce919db --- /dev/null +++ b/faq/modules/ROOT/pages/index.adoc @@ -0,0 +1,197 @@ += FAQ! + +image::ROOT:swarmlab.png[swarmlab,150,float=right] + + +xref:index.adoc.adoc#netflix[netflix] + + + + +== Why Docker + +https://www.cloudbees.com/blog/why-dockero[Why Docker^] + +== Intro docker + +https://www.compose-spec.io/[docker-compose^] + +https://github.com/veggiemonk/awesome-docker[github docker-compose^] + +https://twitter.com/awesome_docker[github awesome docker] + +=== Learn to build and deploy your distributed applications easily to the cloud with Docker + +https://docker-curriculum.com/[HowTo] + +== Next Step DockerSwarm + +**** +TIP: DockerSwarm + +video::Tm0Q5zr3FL4[youtube, start=0] +**** + +https://www.simplilearn.com/tutorials/docker-tutorial/docker-swarm[docker-swarm tutorial^] + +=== Getting started with swarm - official from docker + +https://docs.docker.com/engine/swarm/swarm-tutorial/https://k21academy.com/docker-kubernetes/docker-swarm/[docker-swarm^] + +=== Replicability, use the same files as when developing locally. + +https://dockerswarm.rocks/[dockerswarm.rocks^] + +=== Open Source Cloud Guide από την IBM + +https://open-cloud-guide.dev/[open-cloud huide^] + +=== Alternatives + +https://www.nomadproject.io/[monad^] + +https://dev.to/stevenmcgown/kubernetes-for-dummies-5hmh[kubernetes^] + +=== Raft consensus in swarm mode + +https://docs.docker.com/engine/swarm/raft/[raft^] + +https://raft.github.io/[raft github^] + +http://thesecretlivesofdata.com/raft/[raft demo^] + +== Next Step Storage + +**** +TIP: Storage + +video::W2Z7fbCLSTw[youtube, start=0] +**** + +=== Generic + +https://docs.mongodb.com/manual/replication/[Mongo replica^] + +https://docs.mongodb.com/manual/core/capped-collections/[mongo capped^] + +=== On memory + +https://redis.io/topics/cluster-tutorial[Redis cluster^] + +https://redis.io/[redis server^] + +https://www.instaclustr.com/blog/redis-vs-memcached/[redis vs memcached^] + +=== Sharing + +==== NFS + +https://cloud.netapp.com/blog/azure-anf-blg-linux-nfs-server-how-to-set-up-server-and-client[NFS^] + +https://www.gluster.org/[GlusterFS^] + + +== Deploy + +https://www.compose-spec.io/[docker-compose^] + +**** +TIP: Deploy + +video::zLltQxVb3NI[youtube, start=0] +**** + +https://12factor.net/[12factor^] + + +== Technologies + +=== programming language +==== nodeJS +**** +TIP: NodeJS + +video::ENrzD9HAZK4[youtube, start=0] +**** + +https://nodejs.org/en/[nodeJS^] + +https://p5js.org/[p5js^] + +https://threejs.org/[threejs^] + +==== python +https://www.python.org/[python^] + +=== Big data and Scientific analysis + +https://numpy.org/[numpy^] + +https://scipy.org/[scipy^] + +https://jupyter.org/[jupyter^] + +=== Rest API +**** +TIP: Rest api + +video::s7wmiS2mSXY[youtube, start=0] +**** + +=== Sockets +**** +TIP: Sockets + +video::ZBM28ZPlin8[youtube, start=0] +**** + +https://socket.io/[socket.io^] + +== Auth + +https://oauth.net/2/[auth2^] + +https://oauth.net/code/nodejs/[Nodejs auth library^] + +=== Auth server + +https://www.keycloak.org/[auth2 server^] + +== Security VPN etc + +https://www.wireguard.com/[simply the best VPN out there^] + +== POC + +=== netflix + +[#netflix] +**** +TIP: Netflix + +video::CZ3wIuvmHeM[youtube, start=0] +**** + + 6:50 monolithic + + 8:24 minroservices + + 19:00 microservice + + see also 37:00 + +https://netflix.github.io/[netflix github^] + +=== Robots and IoT +https://nodebots.io/[nodebot^] + +http://johnny-five.io/[johny-five^] + +https://ardupilot.org/[eduplot^] + +https://github.com/ArduPilot/ardupilot[ardupilot^] + + + + + diff --git a/faq/run/build-intro.sh b/faq/run/build-intro.sh new file mode 100755 index 0000000..af181d8 --- /dev/null +++ b/faq/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 diff --git a/faq/run/build.sh b/faq/run/build.sh new file mode 100755 index 0000000..7122c21 --- /dev/null +++ b/faq/run/build.sh @@ -0,0 +1,4 @@ +antora --fetch /antora/site.yml +antora /antora/site.yml +ifconfig +http-server build/site -c-1 diff --git a/faq/site.yml b/faq/site.yml new file mode 100644 index 0000000..7a70705 --- /dev/null +++ b/faq/site.yml @@ -0,0 +1,21 @@ +site: + title: Swarmlab faq + url: http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs + start_page: swarmlab_faq::index.adoc +content: + sources: + - url: https://git.swarmlab.io:3000/docs/Documentation.git + branches: master + start_path: faq +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 + diff --git a/test-path.sh b/test-path.sh new file mode 100644 index 0000000..cf07317 --- /dev/null +++ b/test-path.sh @@ -0,0 +1,48 @@ +#!/bin/bash + + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + TARGET="$(readlink "$SOURCE")" + if [[ $TARGET == /* ]]; then + SOURCE="$TARGET" + else + DIR="$( dirname "$SOURCE" )" + SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located + fi +done + +SRPATH="$( dirname "$SOURCE" )" +SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +if [ "$SFPATH" != "$SRPATH" ]; then + RDIR=$SRPATH # relativ path directory +fi + +#echo "full path file $SOURCE" +#echo "full path dir $SFPATH" +#echo "relativ path dir $SRPATH" + +check_compose_version() { + composeversion=$(docker-compose version | head -1 | cut -d',' -f1 | cut -d' ' -f3) + version_good=$(echo $composeversion | awk 'BEGIN{ FS="."}; + { if ($1 < 1) { print "N"; } + else if ($1 == 1) { + if ($2 < 26) { print "N"; } + else { print "Y"; } + } + else { print "Y"; } + }') + + echo "$version_good" +} + +composeversioncheck=$(check_compose_version) + +cwdir=$PWD +wdir=$SFPATH +cd $wdir + +echo "current working directory," +echo $cwdir +echo "dir of running program" +echo $wdir