Integrating renewable energy and ensuring high availability are two major requirements for geo-distributed data centers. Availability is ensured by provisioning spare capacity across the data centers to mask data center failures (either partial or complete). We propose a mixed integer linear programming formulation for capacity planning while minimizing the total cost of ownership (TCO) for highly available, green, distributed data centers. We minimize the cost due to power consumption and server deployment while targeting a minimum usage of green energy. Solving our model shows that capacity provisioning considering green energy integration not only lowers carbon footprint but also reduces the TCO. Results show that up to 40% green energy usage is feasible with a marginal increase in the TCO compared with the other cost-aware models.