Git Product home page Git Product logo

showcase-ansible-chatops's Introduction

Ansible & ChatOps with Slack, Hubot and StackStorm - Vagrant demo

Part of tutorial: Ansible and ChatOps. Get started ๐Ÿš€

Introduction

This is quick demonstration of the StackStorm event-driven automation platform running with Ansible configuration management tool and Hubot ChatOps engine. The objective is to operate servers with Ansible directly from Slack chat.

Ansible and ChatOps with Slack and Hubot

It will get you up and running with chatops control VM with all St2 components prepared as well as Ansible and Hubot configured. Additionally, it installs 2 Ubuntu VMs: web server with nginx and db server with mysql.

As a result you should get 100% ready environment allowing you to execute Ansible ad-hoc commands and run Ansible playbooks against VMs directly from your Slack chat. In this showcase we already crafted some simple, but useful real world ChatOps commands.

Getting started

1. Prepare Slack

  • Create slack.com account if you don't have it yet.
  • Navigate Configure Integrations -> Filter -> Hubot and generate Slack & Hubot API Token.

2. Vagrant up

Edit Vagrantfile and add the just generated API token under HUBOT_SLACK_TOKEN constant, or just export it:

export HUBOT_SLACK_TOKEN=xoxb-1234-5678-91011-00e4dd

To provision the environment run:

vagrant up

Installation takes some time (st2 engine comes with Python, RabbitMQ, PostgreSQL, MongoDB, OpenStack Mistral).

3. Try ChatOps

You should see your bot online in Slack and now you're ready to type some chat commands. Don't forget to invite your bot into the Slack channel: /invite @stanley. Your first ChatOps command is:

!help

Ansible ChatOps with StackStorm, Hubot and Slack. List of ChatOps commands Full list of available commands from st2_chatops_aliases pack:

Additionally check the results of performed commands in StackStorm control panel:
https://www.chatops/ username: demo password: demo

4. Don't stop!

Try it, explore the internals. For configuration see: ansible.sh, chatops.sh which are usual Vagrant shell provisioner scripts. Integrate your custom workflows and deployment mechanisms, you'll see how your work becomes more efficient during time.

Feel the power of control center and may the force will be with you!

Need Help? Want to talk?

Join our community Slack IRC

We're always ready to help, feel free to:

  • Ask questions on our public Slack or IRC
  • Report bug, provide feature request or just give us a โœฎ star at GitHub st2
  • Tell us how you use st2, share your StackStorm story. We love stories!

showcase-ansible-chatops's People

Contributors

armab avatar lindsayhill avatar ruizink avatar pixelrebel 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.