In the chapter on elasticity in part A, you find the procedure to calculate elastic constants via a total energy procedure, interwoven with the videos and the task of that week.
As an optional addition to this, you find here a step by step procedure to calculate elastic constants via the stress tensor procedure. This is particulary efficient for crystals that are not highly symmetric. It requires a DFT code that can calculate a stress tensor.