Heat the oil in a large pot or casserole over medium heat. Add the onions, leeks, carrots, garlic, salt, thyme, pepper flakes, and tarragon. Reduce the heat to low; cover and cook slowly or sweat, stirring occasionally, until the vegetables begin to soften and release some of their moisture, about 10 minutes.