This deployment is for non-developers who simply wish to use StarThinker to execute a recipe.
To run StarThinker you will need the folowing:
- A unix / linux command line.
- A version of Python 3.7 or greater.
From the command line on any unix/linux machine install StarThinker. All following examples begin with this step. Choose only one of the following, the first one is recommended for most users:
python3 -m pip install starthinker
python3 -m pip install git+https://github.com/google/starthinker
- If you get a permission error add:
--userto the above command. - If you get a PATH WARNING:
- Copy the new command PATH from the warning.
- Activate the new command path now, run:
export PATH="[PASTE THE PATH HERE]":$PATH;In Google Cloud Shell This will beexport PATH="~/.local/bin":$PATH; - Activate for all future logins, run:
echo 'export PATH="[PASTE THE PATH HERE]":$PATH;' >> ~/.bash_profile;
To run some recipes, functions, or helpers, user credentials are required. To acquire user credentials run the following utility and follow instructions on screen:
st_auth -h
There are several Command Line Helpers packaged in StarThinker, simply PIP install it and use the commands.
A script is a template for a recipe, usually downloaded from the recipe gallery. A script can be identified by the presence of { 'field': ... }* entries in the source JOSN.
Before running a script, convert it to a recipe... this will create a new json file which is the recipe.
python st_script [SCRIPT JOSN FILE]
Often you will receive a recipe, via email for example, that is ready to be executed. If your recipe requires User Credentials or Service Credentials please generate both first. All parameters are optional:
python st_recipe -h
python st_recipe [RECIPE JSON FILE] -u [SERVICE JSON PATH] -s [SERVICE JSON PATH] -p [GCP PROJECT ID]
You should see each step of your your recipe executing on the command line.
Try this in a few seconds using Google Cloud Shell...
Next, review list of available recipes in the Recipe Gallery or Scripts Folder.
© 2019 Google LLC - Apache License, Version 2.0