Overview
This article addresses a problem where a customer wants to maintain the functionality of their application in the event of an Engine Yard (EY) backend failure. The customer wants to manually update and apply recipes to their instances and deploy their application code from a command line, without relying on the EY backend. This is a part of Disaster Recovery Planning (DRP) to ensure that the application remains operational even if the backend service they typically rely on becomes unavailable.
It is important to note that this is a temporary solution and covers only configuring *existing* instances and deploying code that was already deployed on the environment. It does not cover adding new instances, creating new environments, or creating new applications.
Solution
To keep your application running if the Engine Yard (EY) backend fails, you can manually update and apply recipes to your instances and deploy your application code using the command line. Follow these steps:
- Apply the recipes from the command line without EY backend.
- Manually update the recipes on your instances.
- Run the following command on any instance. This will execute the recipes stored on the filesystem under
/etc/chef/recipes/cookbooks
without downloading a new copy of the recipes or the dna.json configuration file. It does not rely on the EY backend. A log will be written to/var/log/chef.log
. - Command:
/opt/chef/embedded/bin/ey-enzyme --cached --chef-bin /opt/chef/embedded/bin/chef-solo
- Deploy your code from the command line without EY backend.
- Run the following command on the app master. This deploys the application with the specified parameters.
- Command:
-
bash -lc '/usr/local/ey_resin/ruby/bin/engineyard-serverside _3.0.4_ deploy \
--account-name <account> --app <appname> --config '\''{"input_ref":"testing","deployed_by":"<username>"}'\'' \
--environment-name <envname> --framework-env <rails_env> \
--instance-names ec2-255-255-255-255.compute-1.amazonaws.com:util \
--instance-roles ec2-255-255-255-255.compute-1.amazonaws.com:util localhost:solo \
--instances ec2-255-255-255-255.compute-1.amazonaws.com localhost \
--no-migrate --ref <git_ref_id> --repo <git_repo_url> --stack <env_stack_as_per_EY_UI> --verbose'
- Replace the placeholders in the command with your actual values. Adjust the parameters as needed based on your environment. More details available here particularly the part about running the deploy using
ey-core deploy -v
to get the proper format of the above command tailored to the desired environment.
These commands require testing on your end. Let us know the results and any questions you may have, and we will assist you further.
Summary
This article provides a solution for maintaining application functionality during an Engine Yard backend failure. It provides command line solutions for applying recipes and deploying code without relying on the EY backend.
FAQ
- What is the purpose of these commands?
These commands allow you to manually update and apply recipes to your instances and deploy your application code from a command line, without relying on the EY backend. - Do I need to replace the placeholders in the command?
Yes, you need to replace the placeholders in the command with your actual values and adjust the parameters as needed based on your environment. - Do these commands require testing?
Yes, these commands require testing on your end. You should let us know the results and any questions you may have, and we will assist you further.
Priyanka Bhotika
Comments