Giter Site home page Giter Site logo

ansible-dojot's Introduction

ansible-dojot-teste

dojot Logo

Deploy dojot on Kubernetes using Ansible

Description

This module is responsible for deploying the dojot service and dependencies to a Kubernetes cluster.

It contain playbooks that execute the deployment based on the inventory file where the kubernetes node informations, access parameters and dojot configuration is defined.

Module Requirements

This module requires:

  • Ansible > 2.6

To install the requirements run the following command:

pip install -r requirements.txt

Deploy Requirements

To deploy dojot it is required an environment of at least one node of Kubernetes with access to docker hub in order to download the components containers.

It is necessary a kubeconfig file containing access and authorization information for this kubernetes environment.

The minimal Kubernetes version support is Kubernetes v1.11.

If persistent storage is required, it is expected that a Storage Class named dojot exists with a proper storage backend previously configured and working with the K8s environment.

Inventory Configuration

The inventory configuration that is required for using the deployment playbook is:

  • The list of nodes that are part of the K8s cluster groupped as: dojot-k8s where the first of this nodes will be used to call the K8s API
  • Obligatory configuration variables for the dojot deployment associated with the group
  • Optional variables for environment customization

There is an example inventory defined in this repository that can be used as reference on the folder inventories/example.

Variables definition and default values are explained further down on this document.

Deployment Steps

The steps required for executing the deployment playbook are defined below:

  • Install the requirements:
pip install -r requirements.txt
  • Create an inventory folder for your setup or copy an example inventory
mkdir -p inventories/SETUP_NAME

or

cp -r inventories/example_local inventories/SETUP_NAME
  • Fill up the hosts.yaml file with the nodes that compose the environment, the kubernetes nodes should be added to the groups dojot-k8s

  • Set the variables with proper values for the deployment, default values and the meaning of each variable is defined on the variables file

  • Run the ansible-playbook to proceed with the deployment

ansible-playbook -K -i inventories/SETUP_NAME DEPLOYMENT_FILENAME.yaml
  • The dojot services are acessible on the Node Ports that were set by Kubernetes, to verify what ports are configured, execute:
kubectl get service -n dojot kong iotagent-mosca

Inventory Variables

A reference of the variables that have to be set on the inventory is found on the document:

Inventory Variables

Node exporter

The perf collector may not work by default on all Linux systems due to kernel configuration and security settings. To allow access, set the following sysctl parameter:

sysctl -w kernel.perf_event_paranoid=X

  • 2 allow only user-space measurements (default since Linux 4.6).
  • 1 allow both kernel and user measurements (default before Linux 4.6).
  • 0 allow access to CPU-specific data but not raw tracepoint samples.
  • -1 no restrictions.

Scripts

In the scripts folder you can find the up and down scripts. You can use them to bring up the project and to remove all brought up services, respectively. You can check out their help by passing the -h flag.

License

This software is licensed under Apache License, Version 2.0.

Copyright

Copyright 2019, CPqD <www.cpqd.com.br>

Authors:

  • Anderson Luis Ribeiro
  • Mariane Previde
  • Eduardo Garcia Misiuk
  • Eric Baum
  • Leonardo Mariano
  • Jonaphael Aristil
  • Luis Antonio Dias de Sa Júnior

ansible-dojot's People

Contributors

marianoleonardo avatar eduardogmisiuk avatar andersonluisribeiro avatar aluisribeiro avatar danielapetito avatar jonaphael avatar mprevide avatar luissajunior avatar thiagodpf avatar giovannicuriel avatar rascaraficci avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.