I am having my OpenDJ LDAP setup running on ubuntu 16.04 base AMI. I now want to replace the base AMI with new patched AMI without impacting my working OpenDJ setup. I need to do this everytime a new AMI is released. One way I can think of is to spin a new EC2 instance with new AMI, export the data from existing LDAP and import it into new EC2 instance. But I am wondering if there is better and smarter way to do this automatically. How do I switch an application from one AMI/EC2 instance to another AMI/EC2 instance without redoing the configuration or breaking its functioning?
Asked
Active
Viewed 46 times
0

Rodrigo Murillo
- 13,080
- 2
- 29
- 50

Deepak Prasad
- 291
- 2
- 5
- 14
-
Is all configuration data stored in a single folder? – Rodrigo Murillo Dec 21 '17 at 16:46
1 Answers
1
- Create an EFS file system to be designated for back-end database files (eg
/opt/ds
) - Install DS/OpenDJ so that the instance files are separate to the install files. (See quote from this link below)
- For each new instance launch the AMI with the updated software as needed.
- In the user data script for the instance, you attach the instance data folder from Step 1.
The purpose of this article is to provide information on installing DS/OpenDJ so that the instance files (user data) are separate to the install files (binaries). This setup allows you to separate all your backend database files and configuration in a separate file system to your binaries
The approach will isolate application data from software binaries, and allow you to easily switch AMIs

Rodrigo Murillo
- 13,080
- 2
- 29
- 50