A Mexican farm called a “nopairy”..

.. would use traditional methods to raise cochineal bugs for dye.  Large commercial scale efforts by Spain and other European countries failed because the bug is subtropical.  Some Australian “nopairies” still exist.

The traditional method was to take healthy female bugs to already existing cacti that had the male bugs on them.  The breeding cycle would take 3 months, after which the females could be harvested while a new crop of young took another 90 days to mature.

(Modern small scale harvesting of cochineal females as they mature on cactus plants in a controlled environment)