From b9022d805a0667e32e24c1f9054c0a5c8e3534d3 Mon Sep 17 00:00:00 2001 From: zeus Date: Mon, 27 Dec 2021 22:30:25 +0200 Subject: [PATCH] add --- Makefile | 52 ++++++++ README.md | 121 +++++++++++++++++- .../usr/share/swarmlab.io/sec/swarmlab-sec | 7 +- 3 files changed, 175 insertions(+), 5 deletions(-) create mode 100755 Makefile diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..9e9aa75 --- /dev/null +++ b/Makefile @@ -0,0 +1,52 @@ + +DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))) +mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) +RHOST= + +SHELL := /bin/bash + +.PHONY: create help start stop list clean + +help: + @echo "" ; + @echo "" ; + @echo "--------------" ; + @echo " SwarmLab.io " ; + @echo "--------------" ; + @echo "" ; + @echo " USAGE: make [COMMAND]" ; + @echo "" ; + @echo " Examples of [COMMAND] can be:" ; + @echo "" ; + @echo " create: create service " ; + @echo "" ; + @echo " start: start service " ; + @echo "" ; + @echo " stop: shutdown service" ; + @echo "" ; + @echo " clean: remove images in the system" ; + @echo "" ; + @echo " list: show running containers of instance" ; + @echo "" ; + @echo " help: show this message" ; + @echo "" ; + @echo "More info:" ; + @echo "http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/index.html" ; + @echo "" ; + @echo "" ; + +create: + @./install/usr/share/swarmlab.io/sec/swarmlab-sec create 2>/dev/null ; true + +start: + @./install/usr/share/swarmlab.io/sec/swarmlab-sec up 2>/dev/null ; true + +list: + @./install/usr/share/swarmlab.io/sec/swarmlab-sec list 2>/dev/null ; true + +stop: + @./install/usr/share/swarmlab.io/sec/swarmlab-sec down 2>/dev/null ; true + +clean: + @./install/usr/share/swarmlab.io/sec/swarmlab-sec clean 2>/dev/null ; true diff --git a/README.md b/README.md index 836cf62..095f425 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,30 @@ -# microservice-redisserver +## Swarmlab is a collection of services that aims to + > - provide teachers and professors with online remote tools to do their lessons + > + > - give students the opportunity to study real life examples in their chosen area of expertise + > + > - allow developers to fully test and debug their applications and provide POC’s + > + > - or you simply want to use a Application (in a microservices-based architecture) + > + > Swarmlab provides you with all the required tools, tools to teach work or try out demos in a completely virtual environment. + > + > More info: http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/index.html -## LabInstance redisserver ![alt text](images/swarmlab-network.png "") +## LabInstance redisserver ## Quickstart -This is a quickstart guide of howto use this *LabInstance to deploy Vue js applications* +This is a quickstart guide of howto use this *LabInstance* -### HowTo use it ### Default Configuration @@ -41,3 +51,106 @@ This is a quickstart guide of howto use this *LabInstance to deploy Vue js appli > > port 6379 > + +## Swarmlab is a collection of services that aims to + + > - provide teachers and professors with online remote tools to do their lessons + > + > - give students the opportunity to study real life examples in their chosen area of expertise + > + > - allow developers to fully test and debug their applications and provide POC’s + > + > - or you simply want to use a Application (in a microservices-based architecture) + > + > Swarmlab provides you with all the required tools, tools to teach work or try out demos in a completely virtual environment. + > + > More info: http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/index.html + + +![alt text](images/swarmlab-network.png "") + +## LabInstance TWINT - twintexplorer + +Twint is an advanced Twitter scraping tool written in Python that allows for scraping Tweets from Twitter profiles without using Twitter's API. + +Graph Visualization How-To + +https://github.com/twintproject/twint/wiki/Graph + +## start GUI + +> +> Instances->Actions +> +> Connect->[Click to open Terminal emulator] +> +> bash ./bin/start-gui.sh +> + + +### Default Configuration + +- Working Directory + +> /home/docker/project + +- Default user + +> docker + +- Default password + +> docker + +- Default password4root + +> pass + + + + +### USAGE + +Swarmlab services can be run in different ways. + +- You can run them **through the swarmlab hybrid environment** (http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/hybrid/start-microservices.html) +- or use them individually at will on the **command line of your system** + + + +#### CLI + +> git clone ... +> +> cd [DIRECTORY] +> + +#### help +> +> make help +> + +#### create service +> +> make create +> + +#### start service +> +> make start +> + +#### stop service +> +> make stop +> + +#### list service +> +> make list +> + +#### clean service +> +> make clean +> diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index c4d163c..8b27ce3 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -109,6 +109,11 @@ SSH_PORT=$servicesshport WEB_PORT=$(EPHEMERAL_PORT) WEB_PORT1=$(EPHEMERAL_PORT) WEB_PORT2=$(EPHEMERAL_PORT) +R_PORT1=$(EPHEMERAL_PORT) +R_PORT2=$(EPHEMERAL_PORT) +R_PORT3=$(EPHEMERAL_PORT) +R_PORT4=$(EPHEMERAL_PORT) +R_PORT5=$(EPHEMERAL_PORT) EOF fi @@ -349,7 +354,7 @@ Project is Ready ├── id_rsa └── id_rsa.pub -Run: swarmlab-sec up size=5 +Run: make start or run swarmlab-sec help for USAGE