How do I deploy an app that requires periodic updates on cloudify?
-
I am working to create a php app- the app will have 2 types of updates-- (a) The app itself will require periodic updates-- the user who is administrating the app will be notified of updates and he can initialise the update. (b) The end user can upload his own files (like custom css/js files for themes) so that his custom design is used to render the php app. The user can also add his own text content to the app Now, I want to deploy this app to a cloud provider- preferably using a PaaS like Amazon Elastic beanstalk, or PHP Fog, or Red Hat Open Shift-- what I am confused about is the following-- (1) From what I understand, to deploy the initial version of the php app, I first have to create a local installation of the app, configure it correctly, and then deploy this configured version to the cloud provider. But with ref to point 1 above, do I have to initialise every update on my local installation, and then upload the new version to the PaaS platform? (2) Now, with ref to the changes being made by the user to the version of the app that is already running on cloud, how do I ensure that his changes made to the app (whether any changes he made which are stored in the database or those files he has uploaded) remain intact? If I simply upload the version that I had locally (which I upgraded with the periodic updates)-- then I will lose the files/database changes made by the worker on the cloud version of the previous version? How do I keep those files+database changes intact? One thing that I can think of, is to use the database that I want to use for the cloud version, even for the local version of the app-- so that even when the user makes changes (I am referring to changes made to the database)-- then even when I upload my new version to the cloud-- the changes made to the database remain intact...And now I only have to think about the files uploaded by the user - even if I am correct in this, how do I preserve these files? And if I am not correct, how do I preserve the changes made by the end user in both database and files? And at the same time upgrade the app itself (which means updating both files, and database) without losing end user's data? How do I do this and make upgrades to my php app?
-
Answer:
With Cloudify, you do not need to install the app locally. Your Cloudify recipe should install the required components (apache, php, DB, etc...) To answer your questions: 1. Here you have two options. You can create a new recipe, including all of your modified files, and install the new recipe on Cloudify. Connect the new version to the same DB and once the application is running, uninstall the previous version. Alternatively, you can implement a Cloudify Custom Command (More details here: http://www.cloudifysource.org/guide/2.1/developing/custom_commands.html) for your update procedure. For instance, you can upload your modified files to a cloud storage site, like S3 or dropbox, and your custom command will download the files and copy them to each of the machines. Using a custom command, you can update your instances one at a time or all at once, using the Cloudify Command Line. 2. In this case, a custom command would probably be the best option. Note that when you are using a custom command, the changes you make are not saved as part of the recipe, so if a machine fails for some reason, Cloudify will start a new machine using the original files from the recipe. Your recipe should take this into account and download any application/user updates during the service installation phase.
Barak Merimovich at Quora Visit the source
Related Q & A:
- How do I deploy WAR file to Tomcat 6.0?Best solution by Stack Overflow
- How can I stop a person seeing status updates on Facebook?Best solution by Yahoo! Answers
- How can I be sure that the microsoft updates are real and safe?Best solution by howtogeek.com
- How do i get the app store on my itouch?Best solution by Yahoo! Answers
- How do I stop sharing updates?Best solution by facebook.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.