Promote an Application Slave

The promote an app slave feature allows you to manually initiate an application master takeover. A few reasons why you might want to initiate a takeover:

  • Change the size of your application master by creating a new application slave and promoting it.
  • To test your recovery processes. Use the Engine Yard UI to promote an app slave.

Important: Do not initiate an application master takeover if you have initiated a database replica takeover. Initiating two major environment configurations simultaneously may leave your environment in an erroneous state. For example, the dashboard may show that an app slave has been successfully promoted when it has not. Wait until one takeover process has thoroughly completed before initiating a new one.

Prerequisites

  • This article assumes you already have an Engine Yard account. If not, see Sign up for an Engine Yard Account.
  • You must have a non-solo environment and at least one healthy app server that you have designated for promotion.

Update your Application Cluster and Application Master

This section provides an example of using the promote application slave feature to update your application cluster and app master. For example, if you currently have 1 application master and 3 application slaves (all sized at M3 Medium) and you want to change them to M3 Large, then you will need to update your application cluster with 4 new application slaves (sized at M3 Large) and manually promote one to an application master.

Note: The number of new application slaves (sized at M3 Large) you have after the promotion is determined by the Takeover Preference environment configuration.

To update your application cluster and application master:

  1. Log in to Engine Yard.
  2. Add a new application instance, let it provision, configure and deploy the application.
  3. Verify proper functioning (through haproxy stats, application deploys, etc).
  4. Terminate one app slave instance from the original configuration.
  5. Click Apply after the instance terminates.
  6. Repeat the above steps until all application servers are in the required configuration.

    You now have the updated application servers in your cluster.

  7. To promote one of the updated application servers to an application master, do one of the of the following:
  • Click the Takeover link associated with the relevant application slave.

    app_servers_screenshot.png

  • Terminate the Application Master instance to promote a random slave.
  • If you have cron jobs or custom chef recipes on your old app master, you must apply them to your new app master. Click Apply on your environment to apply/re-apply configuration, including cron jobs and custom Chef recipes as appropriate, to all instances in the environment.
  • (Optional) If you have the Failed App Master Behaviour set to "detach" please ensure you terminate the old master once you are finished with it, as it remains running and chargeable.
  • Note: Any data on instances that is not stored on the /data volume will be lost.

    More information

    For more information about... See...
    How the automatic (Engine Yard initiated) application master takeover works Application Master Takeover      
    Assigning an elastic IP address to an app slave instance Use Application Slave IP Addresses

    If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.

    Comments

    Article is closed for comments.