Obviously I’m a little biased, but I love Sal. But, it can be a little tedious to get everything set up the first time if you have hundreds of Business Units and Machine Groups. I’ve quietly ignored the problem for a while, but then I saw this tweet pop up in my feed:
@hunty1er Pretty sure you could automate BU/MG creation through the DB backend. What say you @grahamgilbert ?
— Pepijn Bruienne (@bruienne) December 8, 2014 What say I Mr Bruienne? Like the man from Del Monte, I say YES!
The plan We’re going to use a few of the parts that make Django and Docker awesome. We will:
Make a custom management command that will read in a CSV The command will make the Business Units and Groups if they don’t exist We’re than going to run it in a temporary Docker container when we’re ready to do the actual import. This is one of the strengths of Docker - we can spin up a linked container that will operate on the main database, but won’t interfere with your container serving the app. ...