In this paper, joint energy procurement and demand response is studied from the perspective of the operator of a power system. The operator procures energy from both renewable energy sources (RESs) and the spot market. We observe the fact that the RESs may incur considerable infrastructure cost. This cost is taken into account and the optimal planning of renewables is examined by controlling the investment in RES infrastructures. Due to the uncertainty of renewables, the operator can also purchase energy directly from the spot market to compensate for the possible deficit incurred by the realization of the random renewable energy. By setting appropriate prices, the operator sells the collected energy to heterogeneous end users with different demand response characteristics. We model the decision making process of the operator as a two-stage optimization problem. The optimal decisions on the renewable deployment, energy purchase from the spot market, and pricing schemes are derived. Several solution structures are observed and a computationally efficient algorithm, requiring only closed-form calculation and simple bisection search, is proposed to compute the optimal decisions. Finally, numerical experiments are conducted to verify the optimality of the proposed algorithm and the solution structures observed theoretically. In particular, the impact of renewable penetration and the importance of its optimal design are highlighted.