Bus for the IMAPEX CHROnIC Application
358
##Cisco Health Report & ONline Information Collector This is an application designed to interact with infrastructure components, and perform an online analysis of them.
The Challenge - It can be tedious to collect the data needed for routine health analysis. For example, the UCS Health Check requres a PowerShell script to be ran, which requires the UCS PowerTools to be installed, as well as a number of security requirements. This can be very complex for anyone who does not routinely use PowerShell.
The Solution - Create an application that will enable interaction with UCS from the cloud. This particular application has several microservices, including:
Contributors - Josh Anderson, Chad Peterson, Loy Evans
###This repo is for the following service: Bus - This microservice is designed to accept and distribute messages from a queue. Not designed to be an especially feature rich message bus, but created for a specific purpose - to asynchronously send/receive messages via HTTP REST API. This bus is designed to sit in a public infrastructure and be reachable from environments that sit behind a HTTP Proxy server, with limited outbound connectivity.
###This repo includes the following resources: Repo Information
CICD Build Configuration
Application Files
Prerequisites: The following components are required to locall run this container:
Get the container: The latest build of this project is available as a Docker image from Docker Hub:
docker pull joshand/chronic_bus:latest
Run the application:
docker run -d -p 5000:5000 --name Dockerfile joshand/chronic_hub:latest
Use the API: API Usage See below for API usage
Prerequisites: The following components are required to locally run this project:
Get the code: The latest build of this project is available on Github:
mkdir ~/chronic_bus
cd ~/chronic_bus
git clone https://github.com/joshand/CHROnIC_Bus
Set up virtual environment and PIP:
virtualenv chronic
source chronic/bin/activate
pip install -r requirements.txt
Execute the app:
python app.py
Use the API: API Usage See below for API usage
Note: This usage assumes you are executing on localhost
* 127.0.0.1:5000/api/send/<channelid> POST Used to post a new message to a channel on the bus.
{
"msgdata": "your data or message here", Mandatory: The data to include in the message.
"desc": "description of the message", Optional: Friendly description of the task or message.
"status": "0", Optional: Current status of the message. Treated as null/0 if excluded.
"webhook": "https://url_for_webhook" Optional: Specify a webhook to call when a message gets updated.
}
* 127.0.0.1:5000/api/get GET Used to get a list of all channels on the bus.
* 127.0.0.1:5000/api/get/<channelid> GET Used to retrieve messages from a channel on the bus where status is
unset or =0. Sets status=1 on those messages. Add /force to show all.
* 127.0.0.1:5000/api/get/<channelid>/<statusid> GET Used to retrieve messages from a channel on the bus where status is
specified by statusid.
* 127.0.0.1:5000/api/send/<channelid> DELETE Used to clear all messages from a channel on the bus.
* 127.0.0.1:5000/api/status/<messageid> POST Used to change the status of a particular message on the bus.
{
"status": "3" Mandatory: New status of message.
}
* 127.0.0.1:5000/api/status/<messageid> GET Used to get the status of a particular message on the bus.
* 127.0.0.1:5000/api/update/<messageid> POST Used to post a response to a given message on the bus.
{
"msgresp": "your data or message here" Required: Updated status to post for message. Sets status = 2.
}
Content type
Image
Digest
Size
176.9 MB
Last updated
almost 10 years ago
docker pull imapex/chronic_bus