This directory contains the helper scripts needed for the different commands and subcommands available through the tour-guide CLI script. Each of these scripts defines the following functions:
- For commands:
- module_help
- module_options
- module_cmd
- For subcommands
- submodule_help
- submodule_options
- submodule_cmd
The main tour-guide script sources the command script requested and executes the module_cmd function. For subcommands, the corresponding command script sources the subcommand script and executes the submodule_cmd function.
Each command has its own parameters and help message. Use tour-guide <command> --help to get help about a specific <command>. If a command has subcommands, use tour-guide <command> <subcommand> --help to get help about that specific <subcommand>.
The following commands are available:
Check if some required commands (both for running the containers and the scripts) are available. The required commands are:
- docker
- docker-compose
- curl
- bc
- nc
Allows the user to apply some configuration changes to some services. This command has the following subcommands:
Allows the user to configure the MySQL username and password for Cygnus.
Modify the hosts file to add entries for the running docker containers.
Provision the TourGuide-App users, roles and permissions on Keyrock, then sync with Authzforce.
Get the OAuth credentials for TourGuide, as defined on Keyrock, and configure them on TourGuide-App container.
Load sample data for TourGuide-App (restaurants, reservations and reviews).
Load sample restaurants for TourGuide-App.
Create sample reservations for the restaurants available on TourGuide-App.
Create sample reviews for the restaurants available on TourGuide-App.
Get the OAuth token for a specific user. This may be needed to make requests via curl.
Sensors related commands.
Create and initialize sensors for all the restaurants available in the application.
Update all the restaurant sensors measurements. This will simulate all the available sensors sending new measurements.
Send a single measurement for a specific sensor using a Ultralight 2.0 string.
Simulate a sensor periodically sending data.
Simple wrapper for docker-compose up. Allows the user to start the TourGuide-App container and related services.
Simple wrapper for docker-compose stop/rm. Allows the user to stop the TourGuide-App container and related services.