ERPNext was Cover’s (current) ERP solution.
To move production code so that the organization could use it, a consultant’s time had to be booked. This was not always timely.
In addition, we had only 1 test site and that was frequently doing long term tests, so that code would frequently have to “Go Live” without testing.
Using GitHub Actions, I developed an automated CI/CD pipeline that would do the following:
- Whenever code was pushed to the “QA” or “Stage” branches:
- A Database backup of the production instance was made on a DevOps server (to ensure Production didn’t have any bottlenecks)
- That database backup was restored on the QA or Stage instance.
- The code would be migrated to the running ERPNext instance, and the “bench” commands run to rebuild the appropriate back end data structures.
- Any ‘one time’ initialization of new database structures was made before the database was released
- Basic Cypress tests would run to ensure the instance was functional
This allowed us, on-demand to move testing code whenever we wanted.
In addition to that, I further built a series of CI/CD pipelines that could:
- With new code, create a new VM and RDS instance at AWS
- Copy the base ERPNext code into the VM
- Setup a new database instance
- Either a production backup or a past backup would be restored to the new server
- All code migrated, new database structures, etc. as in the above example.
The net result, what used to take at least 2-3 days and several hundred dollars of consulting work could be done automatically in about fifteen minutes of machine time.