We develop a framework for determining the optimal resource capacity of each station composing a stochastic network, motivated by applications arising in computer capacity planning and business process management. The problem is mathematically intractable in general and therefore one typically resorts to either simplistic analytical approximations or time-consuming simulation-based optimization methods. Our solution framework includes an iterative methodology that relies only on the capability of observing the queue lengths at all network stations for a given resource capacity allocation. We theoretically investigate this proposed methodology for single-class Brownian tree networks and illustrate the use of our framework and the quality of its results through computational experiments.