We introduce a scheme to perform quantum information processing that is based on a hybrid spin-photon qubit encoding. The proposed qubits consist of spin ensembles coherently coupled to microwave photons in coplanar waveguide resonators. The quantum gates are performed solely by shifting the resonance frequencies of the resonators on a nanosecond time scale. An additional cavity containing a Cooper-pair box is exploited as an auxiliary degree of freedom to implement two-qubit gates. The generality of the scheme allows its potential implementation with a wide class of spin systems.