This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

SB_Runscope2Spark

Forwards Alert requests from RunScope to Spark

Purpose

This application is a simple Runscope Alert / Cisco Spark Bot App built in Python Flask. This app is meant to be deployed to AWS Lambda to be served serverlessly using the Zappa Framework

Pre-Requirements

Runscope is a service that allows you monitor and test your APIs from an outsider perspective

  • Some knowledge of Python
  • Cisco Spark Developer Account and a Bot token.
  • AWS CLI and AWS creds - pip install awscli --upgrade --user

Use the following guide to configure your AWS CLI.

  • Zappa - pip install zappa
  • VirtualEnv - pip install virtualenv

Up and running QUICKLY!!!

  1. From your commmand line, Clone this repo and enter directory!
$ git clone https://github.com/CiscoDevNet/SB_Runscope2Spark \
&& cd SB_Runscope2Spark
  1. Create your virtualenv
$ virtualenv -p python3 <name your project>

or

$ virtualenv -p python3.6 <name your project>
  1. enter your virtualenv
$ source <name your project>/bin/activate
  1. Install your dependencies using the requirement.txt file in this directory.
$ pip install -r requirements.txt
  1. Update the config.py file in this same directory with your Cisco Spark bot token and the room ID for the Spark space you have made available for this project.

  1. Initalize your Zappa environment and follow the directions (example output below).
$ zappa init

Note: When the instructions ask if you want to deploy globally, enter 'n' for no.

  1. Deploy your application to Lambda
$ zappa deploy dev

  1. Copy the URL that is provided by zappa and add to your Runscope bucket alerts under the web hooks section.

  2. Trigger a false alert to see the result on your Spark messenger

  3. Pat yourself on the back for deploying a serverless Cisco Spark Bot!

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Programming Languages

    Python
  • License

    MIT License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.