项目作者: rajatguptarg

项目描述 :
Bot for SRE and DevOps
高级语言: Python
项目地址: git://github.com/rajatguptarg/samantha.git
创建时间: 2018-12-28T22:01:30Z
项目社区:https://github.com/rajatguptarg/samantha

开源协议:GNU General Public License v3.0

下载


alt-text

Circle CI: CircleCI

Code Maintainability: Maintainability

Code Climate Test Coverage: Test Coverage

Coveralls Test Coverage: Coverage Status

Travis CI: Build Status

Bot for managing deployments and monitoring infrastructure.

Introduction

To learn about building bots, please refer to Setting Up Slack Bot.

Install

  • First install the dependencies by:

    1. pip install -r requirements.txt
  • Create the application configuration file in YAML format just like config.yml and fill all the values correctly. The config.yml should look like:

    1. smtp:
    2. username: test
    3. password: test
    4. host: test
    5. port: 123
    6. sender: test
    7. sender_name: test
    8. slack:
    9. bot_token: test
    10. ansible:
    11. vault_pass: test
    12. inventory_file: /samantha/iaac/inventory/
    13. dialogflow:
    14. project_id: test
    15. session_id: test
    16. lang_code: en
    17. credentials_file: /samantha/dev_credentials.json
    18. commands_settings:
    19. mpstat:
    20. send_via:
    21. - email
    22. - slack
  • Either set the following environment variables or:

    1. export CONFIG_FILE="/path/to/config.yml"
    2. export LOG_LEVEL=1
  • Run the project by passing command line args:

    1. python run.py -c /path/to/config.yml -d

Build

If you want to build your own version of Samantha, you need the following:

  • DiaglogFlow
  • Slack Bot
  • Ansible

Architecture

The architecture of Samantha as follows:

alt-text

User can choose, whether to send data to slack or to email.

Deploy

Coming Soon!

Onboarding

The onboaring involves adding new servers for Samantha to reach or modify the existing commands for your need. Here are list of commands for onboarding: