+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Script to run MobileFirst Analytics in a container | startanalytics.sh

This script runs the MobileFirst Analytics image as a container on IBM® Containers on Bluemix®. Before running this script, ensure that you have run the prepareanalytics.sh script to upload the image to the IBM Containers registry.

Table 1. Mandatory command-line arguments
Command-line argument Description
[-t|--tag] ANALYTICS_IMAGE_TAG Name of the analytics container image that has been loaded into the IBM Containers registry.

Format: BluemixRegistry/PrivateNamespace/ImageName:Tag

[-n|--name] ANALYTICS_CONTAINER_NAME Name of the analytics container
[-i|--ip] ANALYTICS_IP IP address that the container should be bound to. (We can provide an available public IP or request one using the ice ip request command.)

Usage example:

Table 2. Optional command-line arguments
Command-line argument Description
[-h|--http] EXPOSE_HTTP Expose HTTP port. Accepted values are Y (default) or N.
[-s|--https] EXPOSE_HTTPS Expose HTTPS port. Accepted values are Y (default) or N.
[-m|--memory] SERVER_MEM Assign a memory size limit to the container in megabytes (MB). Accepted values are 1024 MB (default) and 2048 MB.
[-se|--ssh] SSH_ENABLE Enable SSH for the container. Accepted values are Y (default) or N.
[-sk|--sshkey] SSH_KEY The SSH Key to be injected into the container. (Provide the contents of your id_rsa.pub file.)
[-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.
[-v|--volume] ENABLE_VOLUME Enable mounting volume for container logs. Accepted values are Y or N (default).
[-ev|--enabledatavolume] ENABLE_ANALYTICS_DATA_VOLUME Enable mounting volume for analytics data. Accepted values are Y or N (default).
[-av|--datavolumename] ANALYTICS_DATA_VOLUME_NAME Specify the name of the volume to be created and mounted for the analytic data. The default name is mfpf_analytics_container_name.
[-ad|--analyticsdatadirectory] ANALYTICS_DATA_DIRECTORY Specify the location to store the data. The default folder name is /analyticsData.
[-e|--env] MFPF_PROPERTIES Provide MobileFirst Analytics properties as comma-separated key:value pairs.

Note: If you specify properties using this script, ensure that these same properties have not been set in the configuration files in the usr/config folder.

Parent topic: Script overview and usage