LATEST VERSION: 1.9 - CHANGELOG
Push Notification Services v1.8

DevOps

Uninstalling

IMPORTANT

Push is a stateful service!

It is advised that you do NOT UNINSTALL the Push tile in order to solve problems with binding or communicating with other services. The Push team will provide instructions on how to manually restore these connections.

Deleting the tile will cause all of the Push user data stored in the MySQL, Redis, and RabbitMQ services to be DELETED as well.

If you need to delete the Push tile or delete any of its connections to the above services then you will need to BACKUP and RESTORE all of the Push user data in these services.

Instructions for backing up and restore the user data is provided below.

Troubleshooting Common Problems

For solutions to common problems, please see our troubleshooting guide.

Configurable Environment Variables

Push Api

push_security_trustAllCerts (Boolean, default: inherited from cf runtime)

When the push_security_trustAllCerts environment variable is set to true the Push API will skip SSL validation on calls to RabbitMQ and the Push Scheduler. This variable is necessary in environments that use self-signed certificates. The default value is false unless the CF Runtime is configured to trust self-signed certificates.

Certificates generated in Elastic Runtime are signed by the Operations Manager Certificate Authority. They are not technically self-signed, but they are referred to as ‘Self-Signed Certificates’ in the Ops Manager GUI and throughout this documentation.

push_scheduler_sendImmediatelyWithin (Integer, default: 60)

The push_scheduler_sendImmediatelyWithin environment variable pertains to scheduled push notifications. It is a threshold (in seconds) within which the push server will skip scheduling a push and simply send it right away. The default value is 60 seconds. If a push is scheduled within 60 seconds of the current time it will not be scheduled but simply be sent right away. You can modify that threshold by modifying this environment variable.

push_apns_sendReceipt (Boolean, default: true)

The push_apns_sendReceipt environment variable is a flag that enables passing a receipt to the device as part of the push payload. The receipt is a unique id for each message that can be used for analytics. This flag enables sending receipts for iOS/APNS.

push_apns_logDeviceTokens (Boolean, default: true)

The push_apns_logDeviceTokens environment variable controls the log verbosity of the APNS push handler. When set to true the device token for every recipient of a push will be logged as the push is sent. Note that this extra logging will reduce push throughput.

push_gcm_sendReceipt (Boolean, default: true)

The push_gcm_sendReceipt environment variable is a flag that enables passing a receipt to the device as part of the push payload. The receipt is a unique id for each message that can be used for analytics. This enables sending receipts for Android/GCM.

push_gcm_logDeviceTokens (Boolean, default: true)

The push_gcm_logDeviceTokens environment variable controls the log verbosity of the Android push handler. When set to true the device token for every recipient of a push will be logged as the push is sent. Note that this extra logging will reduce push throughput.

Installing the push server behind a proxy (available in v1.3.2+)

Starting in Push version 1.3.2 you can route communication with push providers (APNS, Google Cloud Messaging) through a proxy server. GCM pushes can use either a HTTP or socks proxy. APNS pushes can only use a socks proxy. Use the following environment variables to specify proxies.

push_gcm_httpProxyHost (String, default: [empty])
push_gcm_httpProxyPort (Integer, default: [empty])

The push_gcm_httpProxyHost and push_gcm_httpProxyPort environment variables allow you to specify an HTTP proxy server through which to route Google API requests (for Android pushes).

push_gcm_socksProxyHost (String, default: [empty])
push_gcm_socksProxyPort (String, default: [empty])

The push_gcm_socksProxyHost and push_gcm_socksProxyPort environment variables allow you to specify a SOCKS proxy through which to route Google API requests.

Note: If both HTTP and SOCKS proxies are defined for GCM, SOCKS will be used.

push_apns_socksProxyHost (String, default: [empty])
push_apns_socksProxyPort (String, default: [empty])

The push_apns_socksProxyHost and push_apns_socksProxyPort environment variables allow you to specify a SOCKS proxy through which to route APNS push requests.

Backup And Restore

Backup MySQL data

It is highly recommended that you enable automatic backups with your MySQL Tile (Requires an Amazon s3 Bucket). Additionally, you should always backup your MySQL tile if you are planning on removing Push Notification Service or MySQL. You can perform a manual backup by following the directions found here: MySQL Manual Backup

Follow these instructions to backup solely the Push Notification database.

  • In the Apps Manager console in the “system” org go to the “push-notifications” space and the “push-analytics” app.
  • Go to the “Services” tab.
  • Click “▸ Show credentials” for the MySQL service.
  • Get “username”, “password” and “database name”.
  • SSH into the proxy for your Pivotal CF environment.
  • From the proxy run (using the credentials above):

    mysqldump -h hostname -p -u username database_name > push_db.sql
    

Backup encryption key

  • In the Apps Manager console go to the “push-api” app and go to the “Env Variables” tab.
  • Get and record the value for crypto_applicationKey. You will need this key during the installation.
    • The crypto_applicationKey environment variable contains the key which will be used to encrypt sensitive information used by the push server (i.e.: iOS push certificates, Google API keys). This value is set at install time and should not be modified. You will however need to record this value in order save and restore the push notification service database.

Restore MySQL data

  • From the Apps Manager console in the “push notifications” space through the “system” org, stop the “push” and “push-api” applications.
  • Go to “Services”.
  • Click “▸ Show credentials” for MySQL.
  • Get “username”, “password” and “database name”.
  • SSH into the proxy for your Pivotal CF environment.
  • Delete data from Push installation (this should just be empty data) by running the following command from the proxy (using the above credentials):

    mysql -h hostname -p -u username name -e "drop database database_name; create database database_name;"
    
  • Import data from old install by running the following command from the proxy (using the above credentials):

    mysql -h hostname -p -u username database_name < push_db.sql
    
  • Enable migrations:

    • In the Apps Manager console, find the “push-api” application and go to the “Env Variables” tab.
    • Edit liquibase_runMitgations and set it to true.
  • Start the “push-api” and “push” applications.

  • Disable migrations:

    • In the Apps Manager console, find the “push-api” application and go to the “Env Variables” tab.
    • Edit liquibase_runMigrations and set it to 'false’.
  • Restart the “push-api” and “push” applications.

Backup Redis Data

Create a pull request or raise an issue on the source for this page in GitHub