Web Service for a Simple SuperHero Voting Application.
4.7K
This is the Web Service for a basic microservice demo application. This provides a web front end into a voting system where users can vote for their favorite movie superhero.
Details on deploying the entire demo to a Mantl cluster can be found at
The application was designed to provide a simple demo for Cisco Mantl. It is written as a simple Python Flask application and deployed as a docker container.
Other services are:
The docker containers are available at
Required
pip install -r requirements.txt
In order to run, the service needs 2 pieces of information to be provided:
These details can be provided in one of three ways.
python myhero_web/myhero_web.py --app "http://myhero-web.server.com" --appkey "APP AUTH KEY" export myhero_app_server="http://myhero-app.server.com"export myhero_app_key="APP AUTH KEY"python myhero_web/myhero_web.pypython myhero_web/myhero_web.pyWhat is the app server address? http://myhero-app.server.comApp Server Key: APP AUTH KEYA command line argument overrides an environment variable, and raw input is only used if neither of the other two options provide needed details.
http://localhost:5000/
I've included the configuration files needed to do local development with Vagrant in the repo. Vagrant will still use Docker for local development and is configured to spin up a CentOS7 host VM for running the container.
To start local development run:
vagrant up
Each of the services in the application (i.e. myhero_web, myhero_app, and myhero_data) include Vagrant support to allow working locally on all three simultaneously.
Content type
Unrecognized
Digest
Size
29.2 MB
Last updated
about 10 years ago
docker pull hpreston/myhero_web