Before you run the sample applications, you must set the IP address of your TBSP node. If you want to execute smart contracts, you must also generate keypairs.
In addition to standard commands, TBSP on Google Cloud comes with a number of aliases that you can use to execute specific functions.
Aliases are shortcuts that represent a standard command. Use them to save time (some standard commands are very long, containing multiple functions) and to avoid mistakes (some standard commands are complex).
Note that the TBSP Docker container already contains these required aliases.
If you're not using the TBSP Docker container or the vagrant SDK, add these aliases to your local development machine.
Get the IP address
The external IP address of a node is required to execute all functions on TBSP on Google Cloud. You can get the IP addresses from your system administrator, or if you are a system administrator, you can get obtain them using the steps mentioned here.
Set the IP address
After obtaining the IP address, you can set the IP address.
In a terminal session, set the default environment to cloud:
tymlez-dev config setContext --defaultContext="cloud"
(alias: setContext cloud)
Next, set the external endpoints of your default environment:
Substitute EXTERNAL_ENDPOINTS:PORT with the IP address without the protocol (http or https)
tymlez-dev config setServerUrl --serverUrl=<EXTERNAL_ENDPOINTS:PORT> --protocol=<http OR https>
(alias: setUrl <EXTERNAL_ENDPOINTS:PORT>)
If you want to execute smart contracts, generate your public and private key:
tymlez-dev config generateKeyPair
Your config is now set, and the sample application will be executed against your default environment.
Check your config
After setting the default context and IP address, and generating the keypairs, check if the config file contains the required configuration:
tymlez-dev config getContext
You are now able to communicate with your TBSP instance on Google Cloud.
You can now execute a number of sample applications.