|
@ -2,199 +2,50 @@ |
|
|
|
|
|
|
|
|
image::ROOT:swarmlab.png[swarmlab,150,float=right] |
|
|
image::ROOT:swarmlab.png[swarmlab,150,float=right] |
|
|
|
|
|
|
|
|
[#netflix0] |
|
|
[#How_to_get_the_path_of_current_script0] |
|
|
xref:index.adoc#netflix[netflix] |
|
|
xref:index.adoc#netflix[How to get the path of current script] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
== Why Docker |
|
|
[#How_to_get_the_path_of_current_script] |
|
|
|
|
|
|
|
|
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] |
|
|
|
|
|
[.text-right] |
|
|
[.text-right] |
|
|
=== netflix xref:index.adoc#netflix0[image:up-1.png[28,28,float=right]] |
|
|
=== How to get the path of current script xref:index.adoc#How_to_get_the_path_of_current_script0[image:up-1.png[28,28,float=right]] |
|
|
|
|
|
|
|
|
**** |
|
|
[source,bash] |
|
|
TIP: Netflix |
|
|
---- |
|
|
|
|
|
#!/bin/bash |
|
|
video::CZ3wIuvmHeM[youtube, start=0] |
|
|
SOURCE="${BASH_SOURCE[0]}" |
|
|
**** |
|
|
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink |
|
|
|
|
|
TARGET="$(readlink "$SOURCE")" |
|
|
6:50 monolithic |
|
|
if [[ $TARGET == /* ]]; then |
|
|
|
|
|
SOURCE="$TARGET" |
|
|
8:24 minroservices |
|
|
else |
|
|
|
|
|
DIR="$( dirname "$SOURCE" )" |
|
|
19:00 microservice |
|
|
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 |
|
|
see also 37:00 |
|
|
done |
|
|
|
|
|
|
|
|
https://netflix.github.io/[netflix github^] |
|
|
SRPATH="$( dirname "$SOURCE" )" |
|
|
|
|
|
SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|
|
|
|
|
if [ "$SFPATH" != "$SRPATH" ]; then |
|
|
|
|
|
RDIR=$SRPATH # relativ path directory |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
=== Robots and IoT |
|
|
#echo "full path file $SOURCE" |
|
|
https://nodebots.io/[nodebot^] |
|
|
#echo "full path dir $SFPATH" |
|
|
|
|
|
#echo "relativ path dir $SRPATH" |
|
|
http://johnny-five.io/[johny-five^] |
|
|
|
|
|
|
|
|
cwdir=$PWD |
|
|
https://ardupilot.org/[eduplot^] |
|
|
wdir=$SFPATH |
|
|
|
|
|
cd $wdir |
|
|
|
|
|
|
|
|
|
|
|
echo "current working directory," |
|
|
|
|
|
echo $cwdir |
|
|
|
|
|
echo "dir of running program" |
|
|
|
|
|
echo $wdir |
|
|
|
|
|
---- |
|
|
|
|
|
|
|
|
https://github.com/ArduPilot/ardupilot[ardupilot^] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|