This UI is a Webex Bot that needs to be added to a Webex space/room via its email address (listed below).
All commands should be prefixed with an '@' mention to "Lab Maestro" - which will get substituted to Lab in the client to show it is actually a mention. This is normal.
-
@Lab project list [name]: produces a list of available projects in the lab. If [name] is optionally provided, the command will give details about the specified project.
-
@Lab scenario list [name]: produces a list of available scenarios in the lab. If [name] is optionally provided, the command will give details about the specified scenario.
- Name: Lab Maestro
- Email: [email protected]
- Description: "Webex Bot to provide frontend into the Lab Maestro microservices application responsible for lab setup and orchestration."
- Token: defined in WEBEX_TEAMS_ACCESS_TOKEN environment variable
This bot repository is based around operations within the Heroku platform, leveraging the Redis backend for storing any required persistent information. The Free/Dev offering is sufficient for deploying and operating (within the limits of that tier).
As a Webex bot, you'll need to create a Webex platform account to create the rooms, create a bot token, etc.
The service does not currently require any further knowledge of the consumers of the messaging that it receives from the Webex webhook event notifications.
-
Webex account setup and bot token creation must be completed first.
- Store the token in the file named ${SECRETS_DIR}/token.txt
-
Heroku account creation (and billing information, since redis is used) required.
-
scripts/heroku-setup.sh:
- Performs a heroku login
- Creates a heroku application
- Adds "runtime-dyno-metadata" lab to application
- Adds heroku-redis service to the application
Note: this will automatically set up a git remote entry for the checked out repository. You'll use this to deploy with git momentarily.
- scripts/heroku-env.sh:
- Creates some environment variables in local shell
- Applies those env vars to the heroku application environment
Note: this process is for sensitive variables to apply them safely to the application. Don't confuse safety with security though as anyone with web access to the Heroku application portal can reveal those variables.
- git push heroku main:
- Pushes the local checked out version into the remote Heroku git repository
- Commit to remote triggers a pre-commit build script and will fail if it can't package the application
Note: heroku info will give you the Web URL that the application is running on.
- heroku logs --tail: logs generated by the application/dynos
- heroku ps: dyno status information
-
Python 3.9.10+
-
Heroku Platform (Free/Dev is sufficient)
-
(future) Websockets
- SECRETS_DIR: Location of the access token text file to populated the env var
- WEBEX_TEAMS_ACCESS_TOKEN: API Access Token specific to Bot for Webex Messaging
- WEBEX_TEAMS_ROOM_TITLE: Title of the Webex Messaging room for the lab management
- HEROKU_APP_NAME: Application name override for production use cases (must be unique across Heroku platform)
This bot is currently being written for a focused, single purpose back end service. Only a single instance dedicated to a single space is being supported at this time.
- Black formatter
- Precommit hooks for flake8 and black