The invention provides a method and
system for automatically and flexibly assigning resource under a cloud platform. The method includes steps of A, application disposition files, B, downloading the application disposition files,
parsing the disposition files and storing the disposition information to a
database, C, assigning required resources to the application according to the disposition information, D, downloading application
mirror image documents, starting containers, running the application and forming an application container cluster, E, determining whether the assigned resource is consistent with the disposition files, and if the assigned resource can not satisfy the disposition files, the unsatisfied portion of the disposition files waiting the re-assigning of a
server resource management platform, F, automatically monitoring and reading
monitoring data of the application container cluster, monitoring the quantity of the current live applications and calculating the average
monitoring data of the application container cluster in a first time period, G, comparing whether the quantity of the current live applications satisfies the protection rules, and repeating the step C-G if the quantity of the current live applications is within the threshold scope.