With respect to everyone who posted a solution before this (esp FearlessDonut, since that sounds difficult in and of itself!), can actually get this one really easily on the first level, building only two defenses.
I did it with one gas thrower at the opening of the base, which takes care of all of the waves save the last two. Placing it here, I got every infantry troop before they made it to the wall into the base, and even if any do manage to get over the wall, easy enough to turn and take them out still in the first causeway. In the large emplacement area right behind it, place a machine gun and upgrade it to level 2. The machine gun almost too easily takes care of the cavalry that compose the next to last wave, and the lone tank that shows up as the final wave.