Upgrade a Bitnami LAMP Production-Ready Stack deployment
The easiest way to upgrade the Bitnami LAMP Production-Ready Stack solution is to upgrade the CloudFormation stack.
Bitnami publishes a new version of the CloudFormation template, updating the AMIs used in it, whenever there’s a new version of the application or any subcomponent (such as PHP, Apache or OpenSSL) included on it. By replacing the template used on your Bitnami LAMP Production-Ready Stack stack, you will upgrade it.
All the data, application files and database, are stored outside the application instances on Amazon EFS and Amazon Aurora (RDS) respectively. Therefore, replacing the AMIs will not result in any data loss.
Update the CloudFormation template
NOTE: It’s highly recommended to create a backup of your database and application files before upgrading your stack.
You can replace the template used on your CloudFormation stack as follows,
- Obtain the new template URL from the application page.
- Log in to the AWS CloudFormation console and select your stack.
Select the “Actions -> Upgrade Stack” menu item.
On the “Select Template” page, chose the option to “Specify an Amazon S3 template URL” and enter the new template URL you obtained earlier. Click “Next” to proceed.
On the “Specify Details” page, review the configuration parameters (there should be no need to make changes). Click “Next” to proceed.
On the “Options” page, review the tags (if any) and click “Next” to proceed.
Review the details of the template and accept the required terms.
A summary of the change is detailed in the “Preview your changes” section. Review it and click “Update” to proceed.
Amazon Web Services will now begin the upgrade process. It can take some time to complete the upgrade. Use the CloudFormation dashboard to periodically check the status of the upgrade.
Once the stack update is complete, follow these steps:
- Log in to the AWS EC2 console.
- Choose “Instances” from the navigation panel and ensure that all the application instances use the latest AMI version. You can filter the list using the tags you set when deploying the template.
- Terminate any instances using the old AMI. The AutoScaling Group will create new instances automatically using the new AMI.
Log in via SSH to your application instance and confirm that they are using the new stack. For example, you could check the PHP version by running the command below:
$ php --version