Skip to content

rajatguptarg/samantha

Repository files navigation

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:

    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:

    smtp:
      username: test
      password: test
      host: test
      port: 123
      sender: test
      sender_name: test
    
    slack:
      bot_token: test
    
    ansible:
      vault_pass: test
      inventory_file: /samantha/iaac/inventory/
    
    dialogflow:
      project_id: test
      session_id: test
      lang_code: en
      credentials_file: /samantha/dev_credentials.json
    
    commands_settings:
      mpstat:
        send_via:
          - email
          - slack
  • Either set the following environment variables or:

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

    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: