Smart city is the new development stage of application of information technology in city management, and is a big issue we encountered during the process of city development. Cloud computing provides technology support for the construction of smart city. In this paper, the characteristic of cloud computing is analyzed and the three different service levels is pointed out. And then, the cloud computing system about smart city which includes infrastructure cloud, platform cloud and application cloud is set up based on Infrastructure as a Service, Platform as a Service, and Software as a Service. In the end, we analyze the role of infrastructure cloud, platform cloud and application cloud in the frame of smart city.