The comments in CA.cfg file serve as a good tutorial for setting up a simple PKI for a system test. There is a typo in one of the presented commands, which results in openssl not exiting with an error message instead of generating a certificate. Fix the typo.
Please take a look at the contents of the CA.cfg file for further instructions and configurations options.