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

3 years ago
= Implementing infrastructure-as-code with Ansible and GIT!
3 years ago
image::ROOT:swarmlab.png[swarmlab,150,float=right]
== What is "infrastructure-as-code"?
Imaging
3 years ago
* one click and you can run a full server
3 years ago
3 years ago
** to include your favorite operating system
3 years ago
** applications
** security rules
3 years ago
** and custom settings
3 years ago
3 years ago
*and this can be reproduced tens, hundreds or even thousands of times, all without human intervention*
3 years ago
3 years ago
====
*Thats the world of infrastructure as code, IaC for short*
3 years ago
3 years ago
IaC is a process where, you define a configuration template with all the required settings and customizations, and a provisioning tool will take care of the rest.
3 years ago
3 years ago
====
3 years ago
== implement infrastructure-as-code
3 years ago
To successfully implement the infrastructure-as-code and to keep the concept simple we will use
3 years ago
* 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
3 years ago
TIP: It's time to relax and have a cup of coffee!
3 years ago
3 years ago
====