meraki-webhooks-teams

所属分类:构建工具
开发工具:HTML
文件大小:0KB
下载次数:0
上传日期:2020-02-11 19:53:27
上 传 者sh-1993
说明:  Meraki Webhooks Webex Teams连接器
(Meraki Webhooks Webex Teams Connector)

文件列表:
.env.sample (686, 2020-02-11)
Dockerfile (149, 2020-02-11)
LICENSE (1064, 2020-02-11)
Procfile (20, 2020-02-11)
app.json (1292, 2020-02-11)
app.py (25734, 2020-02-11)
device_alert.html (503, 2020-02-11)
device_alert.json (8264, 2020-02-11)
device_alert_image.html (524, 2020-02-11)
device_alert_image.json (8543, 2020-02-11)
images/ (0, 2020-02-11)
images/create-a-bot-button.png (105081, 2020-02-11)
images/create-a-new-app.png (30841, 2020-02-11)
images/create-an-integration-button.png (104572, 2020-02-11)
images/developer-webex-com.png (53950, 2020-02-11)
images/heroku-deploy.png (142869, 2020-02-11)
images/meraki_enable_api_access.png (274813, 2020-02-11)
images/meraki_key.png (289644, 2020-02-11)
images/meraki_profile.png (221575, 2020-02-11)
images/my-webex-teams-apps.png (108681, 2020-02-11)
images/new-bot-a.png (128309, 2020-02-11)
images/new-bot-b.png (85337, 2020-02-11)
images/new-bot-c.png (104166, 2020-02-11)
images/new-integration-a.png (114310, 2020-02-11)
images/new-integration-b.png (106726, 2020-02-11)
images/new-integration-c.png (132261, 2020-02-11)
images/new-integration-d.png (22349, 2020-02-11)
images/new-integration-e.png (99072, 2020-02-11)
images/webex-login.png (17989, 2020-02-11)
images/webhook-teams.png (66476, 2020-02-11)
meraki_addons.py (2816, 2020-02-11)
network_alert.html (436, 2020-02-11)
network_alert.json (6617, 2020-02-11)
requirements.txt (332, 2020-02-11)
static/ (0, 2020-02-11)
static/preloader.gif (3269, 2020-02-11)
templates/ (0, 2020-02-11)
templates/done.html (1169, 2020-02-11)
... ...

# Meraki Webhooks Webex Teams Connector Meraki Webhooks Webex Teams Connector This application is designed to simplify the integration and delivery of Meraki Webhooks into Webex Teams. ![webex-teams-integration](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/webhook-teams.png) # Contents - [Prerequisites](https://github.com/joshand/meraki-webhooks-teams/blob/master/#prerequisites) - [Meraki Integration](https://github.com/joshand/meraki-webhooks-teams/blob/master/#meraki) - [Enable API Access](https://github.com/joshand/meraki-webhooks-teams/blob/master/#meraki-api-access) - [Get API Token](https://github.com/joshand/meraki-webhooks-teams/blob/master/#meraki-api-token) - [Get Organization ID](https://github.com/joshand/meraki-webhooks-teams/blob/master/#meraki-org-id) - [Environment](https://github.com/joshand/meraki-webhooks-teams/blob/master/#meraki-env-setup) - [Application Installation](https://github.com/joshand/meraki-webhooks-teams/blob/master/#installation) - [Heroku](https://github.com/joshand/meraki-webhooks-teams/blob/master/#heroku-install) - [Install Locally](https://github.com/joshand/meraki-webhooks-teams/blob/master/#local-install) - [ngrok](https://github.com/joshand/meraki-webhooks-teams/blob/master/#ngrok) - [Source](https://github.com/joshand/meraki-webhooks-teams/blob/master/#source-install) - [Docker](https://github.com/joshand/meraki-webhooks-teams/blob/master/#docker-install) # Prerequisites If you don't already have a Webex Teams account, go ahead and register for one. They are free. You'll need to start by adding a new integration on the Webex Teams Developer site. 1. Navigate to https://developer.webex.com, and click "Log in" near the top right. ![developer-webex-com](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/developer-webex-com.png) 2. Log in to Webex using your credentials. ![webex-login](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/webex-login.png) 3. Click your profile picture at the top right, then select the "My Webex Teams Apps" ![my-webex-teams-apps](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/my-webex-teams-apps.png) 4. Click "Create an Integration" ![create-an-integration-button](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/create-an-integration-button.png) 5. Provide a Name for the Integration, your e-mail address and choose or Upload an Icon to represent the integration. ![new-integration-a](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/new-integration-a.png) 6. Enter a Description for the Integration. For the Redirect URI(s), enter the Public URL of your application, and append "/callback" to the end of it. ***Note: If you plan on deploying to Heroku, you should [start that process now](https://github.com/joshand/meraki-webhooks-teams/blob/master/#heroku-install) so you can fill in variables as you go. Your Redirect URI for Heroku will be https://<your-app-name>.herokuapp.com/callback.*** ![new-integration-b](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/new-integration-b.png) 7. Select the Scopes for your Application. It requires the following scopes: "spark:rooms_read spark:rooms_write spark:memberships_read spark:memberships_write spark:people_read" ![new-integration-c](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/new-integration-c.png) 8. Click your profile picture again at the top right, then select the "My Webex Teams Apps" ![my-webex-teams-apps](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/my-webex-teams-apps.png) 9. Click "Create a Bot" ![create-a-bot-button](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/create-a-bot-button.png) 10. Provide a Name for the Bot, enter a Username and choose or Upload an Icon to represent the bot. ![new-bot-a](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/new-bot-a.png) 11. Enter a Description for the Bot. ![new-bot-b](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/new-bot-b.png) 12. Copy and store your Access Token - you will need this for your application. ![new-bot-c](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/new-bot-c.png) # Meraki Dashboard Configuration --- ## Enable your Meraki organization for API Access 1. Log in to the Meraki Dashboard. Choose your organization if prompted to do so. 2. On the left Navigation bar, go to Organization and select Settings. 3. Scroll down to the Dashboard API Access section, and turn on API Access. ![meraki-enable-api-access](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/meraki_enable_api_access.png) ## Obtain your Meraki API Token 1. Log in to the Meraki Dashboard. Choose your organization if prompted to do so. 2. Under your username, select My profile ![meraki-my-profile](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/meraki_profile.png) 3. Scroll down to the API access section, and create an API key. You'll need it to get your Organization ID and to set your environment variables. ![meraki-my-key](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/meraki_key.png) # Application Installation Heroku Installation is the recommended method. However, instructions are below for local installation if you prefer to run it in your private environment. ## Cloud Installation - Heroku [![Deploy](https://github.com/joshand/meraki-webhooks-teams/blob/master/https://www.herokucdn.com/deploy/button.svg)](https://github.com/joshand/meraki-webhooks-teams/blob/master/https://heroku.com/deploy) 1. If you do not already have a Heroku account, you can create one in the free tier. Otherwise, log in to your existing account. 2. Enter a name for your application. Once you confirm that it is available, enter "https://<your-app-name>.herokuapp.com/" in the "BASE_URL" variable field. This also needs to go into the Redirect URI field for your Webex Teams Integration as "https://<your-app-name>.herokuapp.com/callback" ![heroku-deploy](https://github.com/joshand/meraki-webhooks-teams/blob/master/images/heroku-deploy.png) 3. The remaining fields will be populated as you create the Webex Integration and Bot ## Local Installation ### ngrok - Skip this step if you already have an Internet reachable web-server ngrok will make easy for you to develop your code with a live bot. If you are running a Mac with Homebrew, you can easily install via "brew cask install ngrok". Additional installation instructions can be found here: https://ngrok.com/download After you've installed ngrok, in another window start the service `ngrok http 5000` You should see a screen that looks like this: ``` ngrok by @inconshreveable (Ctrl+C to quit) Session Status online Version 2.2.4 Region United States (us) Web Interface http://127.0.0.1:4040 Forwarding http://this.is.the.url.you.need -> localhost:5000 Forwarding **https://this.is.the.url.you.need** -> localhost:5000 Connections ttl opn rt1 rt5 p50 p90 2 0 0.00 0.00 0.77 1.16 HTTP Requests ------------- POST / 200 OK ``` ### Source Create a virtualenv and install the module ``` virtualenv venv source venv/bin/activate pip install -r requirements.txt git clone https://github.com/meraki/spark-operations-bot.git ``` The easiest way to use this module is to set a few environment variables. On Windows, use "set" instead of "export". See the ngrok section below if you do not have a web server already facing the Internet. These are the Environment variables that are required to run the application (app.py): ``` export WEBEX_INTEGRATION_CLIENT_ID= export WEBEX_INTEGRATION_CLIENT_SECRET= export WEBEX_BOT_USERNAME= export WEBEX_BOT_TOKEN= export BASE_URL=.herokuapp.com/> ``` Now launch your bot!! `python app.py` ### Docker First, make a copy of the .env.sample file, naming it .env, and editing it to set your environment variables. Then build the container: ``` docker build -t joshand/meraki-webhooks-teams . docker run -p 5000:5000 -it --env-file .env joshand/meraki-webhooks-teams ```

近期下载者

相关文件


收藏者