Swarmlab docs

Application development in a distributed system

Development of Distributed Systems from Design to Application


You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

114 lines
2.2 KiB

= Implementing infrastructure-as-code with Ansible!
image::ROOT:swarmlab.png[swarmlab,150,float=right]
== What is "infrastructure-as-code"?
Imaging
* a single click and you’re able to get a full server up and running.
** include your favorite operating system,
** applications
** security rules
** and custom settings.
And the configuration
can be replicated dozens, hundreds, or even thousands of times, all without human intervention.
Thats the world of infrastructure as code, IaC for short.
IaC is a process where instead of manually setting up every server, you define a configuration script with all the required settings and customizations, and a provisioning tool will take care of the rest.
== implement infrastructure-as-code
To successfully implement infrastructure-as-code
and To keep the concept simple we will use:
* git for "Code Repository and Versioning"
* ansible for "Automation tool" that takes control of the infrastructure configuration and performs the necessary actions to reach the desired end-state.
== Usage
=== run instance
* Run "microservice-ansible"
** Instances->running Containers->Actions [microservice-ansible_masterservice_1]
*** connect [Open a terminal and Run]
=== find examples
* Run "microservice-ansible"
** Instances->running Containers->Actions [microservice-ansible_masterservice_1]
*** connect [Project BaseDir]
cd in [Project BaseDir]/examples
=== Attach network
* Run "microservice-ansible"
** Instances->running Containers->Actions [microservice-ansible_masterservice_1]
*** Networks->"Select Network"
== Scenario
=== run swarm
* Run "hybrid-linux"
** Labroom->"Swarmlab LabRoom Deploy - Local "->Actions [hybrid-linux]
*** Number of Instances (e.g. 5) -> Up
=== run ansible
* Run "microservice-ansible"
** Instances->running Containers->Actions [microservice-ansible_masterservice_1]
*** connect [Open a terminal and Run]
=== Attach network
* Run "microservice-ansible"
** Instances->running Containers->Actions [microservice-ansible_masterservice_1]
*** Networks->"Select Network" [network hybrid linux]
====
Terminal: microservice-ansible
cd /home/docker/project/examples
edit inverntory.yml (ifconfig, nmap etc)
run fluentd.yml.sh
TIP: make a cup off cafe!
====