Moving an application to a new cluster


A customer may find it necessary to move an already deployed EYK application to a new cluster, as would be the case when moving an application that was undergoing acceptance testing to the production cluster.

The following error will be encountered if connecting to an application that is deployed on a different EYK cluster:

$ eyk ps:console singlestaging-web-84c8467d4f-7cd7k web singlestaging /bin/bash
Starting console session with command /bin/bash for pod singlestaging-web-84c8467d4f-7cd7k for application singlestaging
Error: <h1>Not Found</h1><p>The requested resource was not found on this server.</p>


The above error will be encountered when you are connected to a cluster that is different from the one where the application was deployed and depending on your scenario, it may be necessary to move the application to the new cluster by following the steps outlined below:

  1. Working on the old cluster

    1. Get the environment variables on a .env file:
      eyk config:pull
      This will create a .env file which will include all the environment variables currently in place.
    2. Get a listing of the domains currently in place:
      eyk domains
    3. Get a listing of the certificates in place:
      eyk certs
    4. Prepare to communicate with the new cluster
      Update the version of your eyk cli
      curl -ssl | bash
      Make sure you replace the current eyk by identifying where exactly the eyk binary is currently located:
      which eyk
      Assuming that you are in the same directory you just downloaded it:
      mv eyk  /usr/local/bin
  2. Working on the new production cluster

    Use the EYK ssologin command to log in by executing:
    eyk ssologin

    As documented in Getting Started with Engine Yard Kontainers and assuming that you are at the root of your application, follow these steps:

      1. Add your ssh keys on the new cluster:
        eyk keys:add ~/.ssh/
        Note: edit to match your path and .pub file name
      2. Get a listing of current remotes:
        git remote -v
      3. Remove the already present eyk remote:
        git remote rm eyk
      4. Create the application:
        eyk apps:create appname
      5. Create the domains:
        eyk domains:add
      6. Create the certificates:
        eyk certs:add certname cert.crt private.key
      7. Attach the certificate on the domains added earlier:
        eyk certs:attach certname domainame
      8. Update the environment variables:
        eyk config:push
        Which would automatically push the .env variables to your application.
      9. Push the application code:
        git push eyk


Please sign in to leave a comment.

Powered by Zendesk