For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Script to run MobileFirst Analytics in a container group | startanalyticsgroup.sh
This script runs a MobileFirst Analytics image as a container group on IBM® Containers on Bluemix®. Before running startanalyticsgroup.sh, ensure that you have run the prepareanalytics.sh script to upload the container image to the IBM Containers registry.
Table 1. Mandatory command-line arguments Command-line argument Description [-t|--tag] ANALYTICS_IMAGE_TAG The name of the analytics container image in the Bluemix registry. [-gn|--name] ANALYTICS_CONTAINER_GROUP_NAME The name of the analytics container group. [-gh|--host] ANALYTICS_CONTAINER_GROUP_HOST The host name of the route. [-gs|--domain] ANALYTICS_CONTAINER_GROUP_DOMAIN The domain name of the route. Usage example:
startanalyticsgroup.sh --tag image_name --name container_group_name --host container_group_host_name --domain container_group_domain_name
Table 2. Optional command-line arguments Command-line argument Description [-gm|--min] ANALYTICS_CONTAINER_GROUP_MIN The minimum number of container instances. The default value is 1. [-gx|--max] ANALYTICS_CONTAINER_GROUP_MAX The maximum number of container instances. The default value is 1. [-gd|--desired] ANALYTICS_CONTAINER_GROUP_DESIRED The desired number of container instances. The default value is 2. [-a|--auto] ENABLE_AUTORECOVERY Enable the automatic recovery option for the container instances. Accepted values are Y or N (default). [-tr|--trace] TRACE_SPEC The trace specification to be applied. Default: *=info
[-ml|--maxlog] MAX_LOG_FILES The maximum number of log files to maintain before they are overwritten. The default is 5 files. [-ms|--maxlogsize] MAX_LOG_FILE_SIZE The maximum size of a log file. The default size is 20 MB. [-e|--env] MFPF_PROPERTIES Specify MobileFirst properties as comma-separated key:value pairs. Example: mfp.analytics.url:http://127.0.0.1/analytics-service/rest/v2 [-m|--memory] SERVER_MEM Assign a memory size limit to the container in megabytes (MB). Accepted values are 1024 MB (default) and 2048 MB. [-v|--volume] ENABLE_VOLUME Enable mounting volume for container logs. Accepted values are Y or N (default). [-av|--datavolumename] ANALYTICS_DATA_VOLUME_NAME Specify name of the volume to be created and mounted for analytics data. Default value is mfpf_analytics_<ANALYTICS_CONTAINER_GROUP_NAME> [-ad|--analyticsdatadirectory] ANALYTICS_DATA_DIRECTORY Specify the directory to be used for storing analytics data. Default value is /analyticsData"
Note: Container Group for MobileFirst Analytics requires the analytics data to be shared across instances. The startanalyticsgroup.sh command automatically creates volumes with the names provided in the command.
Learn more about creating scalable container groups.
Parent topic: Script overview and usage