On Macs with two DVD drives, both can be opened and closed from the keyboard.
The primary drive can be opened and closed normally, with the eject key (⏏).
The secondary drive can be opened and closed holding down the Option key, i.e. Option+⏏.
If your computer cannot display the eject key button symbol correctly (e.g. ), it looks like this: