Starting

Configuration of the ClearBlade platform is divided into three pieces

  • The platform process itself
  • The operating system box(es) the platform runs on
  • Database dependencies you might have

Starting the Platform Process

The Platform by default installs into the path /opt/clearblade

In there you will find three elements

  • binary for clearblade - all clearblade process happens inside of this binary
  • console directory - this contains the html to host the developer console
  • javaharness.jar - this allows connectivtiy from ClearBlade code services to java based integrations

The process for administering the platform is fairly simple. The platform has several command line options:

Option Type Description Has default
addr string The address on which the platform will run. Usually this is just a port, specified as “: ✓ (:9000)
bus-config string The name of the bus config file
cert string If you wish to use TLS to serve the platform, this argument should be the location of the SSL certificate
codecache int The maximum number of code services to hold in cache ✓ (1000)
cluster-nodes string Overrides the value of the Nodes attribute in the bus config file
db string The RDBMS implementation to use. Valid options are postgres or sqlite ✓ (postgres)
db-host string The host location of the postgresql installed by ClearBlade ✓ (127.0.0.1)
db-pass string The password for the postgresql install
db-port string The port of the db ✓ (5432)
db-user string The user used by the db
disable-pprof bool Disables pprof output file creation and pprof web-server creation ✓ (false)
dump-routes bool For diagnostic purposes. Will dump the endpoints being listened to by the platform. ✓ (false)
expire int The lifetime of key/value store nodes ✓ (10)
expire-tokens bool Invalidates user tokens issued more than the system’s tokenTTL (defaults to 5 days) if set to true. Dev tokens will not be removed ✓ (true)
host-addr string The ip address for other clustered nodes to contact this platform
key string When using TLS, use this to specify the location of the SSL key file
lean-mode bool For the edge – should we store all the server side stuff (analytics, etc?) ✓ (false)
local bool Mainly for development. Will run the platform without data persistence. ✓ (false)
log-level string Specifies the minimum log-level. Valid values are debug, info, warn, error, and fatal. ✓ (info)
logfile string The destination file for the CB structured logs. Accepts a file location, stderr, or stdout
maximum-publish-size int Sets the maximum allowed MQTT publish size in bytes. Accepts INT{mb,kb}. If no modifier is present, will assume bytes. ✓ (5MB)
maxprocs int The number of system threads to use. Note that this does not apply to duktape. ✓ (-1)
messaging-addr string The address the mqtt broker will listen to. ✓ 1883
message-auth-addr string The address the messaging auth server will listen on. ✓ (:8905)
message-auth-websocket string The port to listen on for webosocket mqtt authorization. ✓ (:8907)
message-auth-use-tls bool Should SSL be used for messaging authorization? ✓ (false)
messaging-url string Configures the external messaging url for the platform
pprof-cpu-interval int The length of time, in minutes, to wait between creating successive pprof cpu profiles ✓ (20)
pprof-cpu-time int The length of time, in minutes, to gather pprof cpu profiling data ✓ (20)
pprof-mem-interval int the length of time, in minutes, to wait between creating successive pprof heap profiles ✓ (5)
pprof-max-files int The maximum number of cpu, heap, and debug profiles to retain. 0 indicates keep all of them. ✓ (30)
pprof-max-file-age int The maximum amount of time (specified in minutes) in which to retain cpu, heap, and debug profile data files. ✓ (1440)
rpc-port bool Sets the rpc listening port ✓ (8950)
rpc-timeout int Sets the timeout for all rpc calls either within platform or platform to edge ✓ (15)
score string The name of the scoring function to use
sqlite-path string The path to the sqlite3 db for platform data ✓ (./clearblade.db)
sqlite-path-users string The name of the scoring function to use ✓ (./clearblade_users.db)
store string The key value store to use. Valid options are dummy and etcd ✓ (dummy)
store-addr string A comma seperated list of etcd addresses. Only needed if etcd is specified as the value of the store argument.
store-analytics bool Should we store analytics, or just drop them? ✓ (true)
store-logs bool Should we store code service logs, or just drop them? ✓ (true)
store-message-history bool Should we store mqtt message history? ✓ (true)
sync-transport string Sets the type of transport to utilize between edge and platform when syncing. Default is mqtt. Other options are amqp, tcp, and stub. ✓ (mqtt)
tls bool Enables TLS ✗ (false)
url string Configures the external url of the platform. used by Code Services when supplying redirects and urls to call for more information
websocket-messaging-addr string the port to use for messaging websockets ✓ (:8903)
e2p-insert-on-deploy bool Disables or enables e2p insert behaviour when only deploy is set in a deployment ✓ (true)

The rest of the administration has been covered elsewhere, in terms of manipulating users, resources.

Configuring the Operating System

We usually recommend using supervisor with the platform. But you can run it however you like, as long as the appropriate ports are open. We recommend running on RHEL/Centos or Ubuntu.

Configuring your integrated data stores.

The platform should accommodate itself to any changes you make in your data stores, as long as the information on where to find the stores (ip, database name, login info) has not changed.