Sign inSign up

thefirstspine/flame

By thefirstspine

•Updated almost 6 years ago

Flame is a collection of data computing & analysis commands on the TFS collected data.

Image
2

439

thefirstspine/flame repository overview

⁠Data computing with Flame

⁠About Flame

 (        (                      *             
 )\ )     )\ )       (         (  `            
(()/(    (()/(       )\        )\))(      (    
 /(_))    /(_))   ((((_)(     ((_)()\     )\   
(_))_|   (_))      )\ _ )\    (_()((_)   ((_)  
| |_     | |       (_)_\(_)   |  \/  |   | __| 
| __|    | |__      / _ \     | |\/| |   | _|  
|_|      |____|    /_/ \_\    |_|  |_|   |___| 
                                               

Flame is a containerized collection of data computing & analysis commands on the TFS collected data. These CLIs are served by Google Python Fire.

More on Google Python Fire: https://github.com/google/python-fire⁠

⁠Synopsis

Synopsis

⁠Usage

Flame is thinked to run along with docker: run an image on a mounted volume.

⁠Prepare the environment

The machine that will run the flame container should have docker installed. Run this to install it:

apt-get update && apt-get -y install docker-ce docker-ce-cli containerd.io

⁠Run the docker image

docker run --name <some-flame> -e FLAME_<SOME_CONFIG>=<some-value> -v </local-volume-mount-point>:/flame-volume thefirstspine/flame:<tag> <the-command>

For the latest version of flame, use the latest tag. The desired volume to compute should be mounted to the /flame-volume path.

Example : docker run --name my-flame-container -v /block-storage/arena:/flame-volume thefirstspine/flame:latest python compute-games.py count_game_type

⁠Getting output

The command will simply print on the standard output the result of the command.

⁠Docker environment variables configuration

Based on the environment variables passed to the container, some features will be activated or not. Here’s a list of all available features:

Variable keyExplainationExample
FLAME_DB_URLThe database Flame should connect to.FLAME_DB_URL=mongodb://localhost:27017/database FLAME_DB_URL=postgresql://localhost:5432/database
⁠Notes
  • Auto remove the running container using the --rm flag.
  • Output to a file: docker run --rm -a STDOUT … > myoutput.json

⁠Available commands

The computing commands are available inside collections served by Google Python Fire.

To run a command: <collection> <command> <options>

For instance: games.py get_game --game_id=123

⁠Collection games.py

All the computations related with the games.

Required database: games

CommandDescriptionOptions
count_game_typesGet the number of played games by types
  • String outputs_to
    Indicates the output format of the command. Must be python (default) or json.
⁠Collection players.py

The commands under this collection are related with the player data (e.g. wizards files)

Required database: wizards

CommandDescriptionOptions
ranksRanks the players according to their victories
  • String outputs_to
    Indicates the output format of the command. Must be python (default) or json.
⁠Collection sessions.py

All the Solid Pancake sessions.

Required database: solid-pancake>

CommandDescriptionOptions
count_active_sessions_per_product_and_versionGet the sessions in the Solid Pancake service tracking
  • String outputs_to
    Indicates the output format of the command. Must be python (default) or json.
count_sessions_per_productCount the sessions per product
  • String outputs_to
    Indicates the output format of the command. Must be python (default) or json.

Tag summary

Content type

Image

Digest

Size

411.9 MB

Last updated

almost 6 years ago

docker pull thefirstspine/flame