In the cloud, there are mainly two ways to integrate cloud services and achieve repeatable infrastructure.
Integration of Cloud Services through OpenAPIs and Native Tools
Cloud computing clients are usually divided into two categories in terms of accessing cloud resources: the general group that operates through a visual console interface, and the developer group that integrates with OpenAPI and its native tools. The former is more suitable for customers who need simple cloud access and resource management, while the latter is more suitable for developers who need automated management and integration of complex business processes. The console provides a graphical interface that allows users to control cloud resources through simple operations. For example, operations personnel can create, configure, and monitor cloud servers, databases, storage, etc., view and process system warnings and logs, and business personnel can access applications and view business data through the console. In short, these users generally do not need to write code and can interact with cloud resources through relatively simple operations. However, APIs are readable by humans, read by machines, and ultimately executed by machines. APIs are abstract, but they also need to be expressed in a concrete way for humans to use them more efficiently.
OpenAPI users need to pay attention to principles and recommendations in different phases, including OpenAPI specifications, API quality and stability, API usage efficiency, API performance and efficiency, API versions and changes, API security and reliability, error information and logging, etc., in order to better evaluate, use, and maintain APIs and improve efficiency.
Exploration and Evaluation of OpenAPIs
Explore OpenAPIs that match business requirements:
Cloud service providers should ideally provide OpenAPI atomic capabilities that are completely equivalent to console capabilities, and each OpenAPI has detailed documentation, including functional description, business parameters, error codes, etc. Developers can select the OpenAPI that meets their requirements through API exploration tools provided by the platform or by consulting the documentation.
Evaluate the match between business scenarios and capability support:
Which part of the business needs automation? How much development resources need to be invested? Does the business architecture comply with the standards? Developers need to balance their choices based on actual business scenarios, find the optimal solution between cloud business automation, efficiency, input cost, and output.
Debugging and Integration of OpenAPIs
Debug OpenAPIs:
Test the requests of OpenAPIs to verify if they meet the business requirements, ensure that API functionality meets expectations, response stability, and design specifications, and prepare for further integration and stable deployment. In the process of OpenAPI debugging, it is usually necessary to learn about parameter structures, parameter combinations, endpoint specifications, error diagnosis, etc. The debugging tools provided by the cloud provider can maximize the out-of-the-box experience.
Choose appropriate native development tools:
Cloud providers offer various tools for developers with different stages, scenarios, and capabilities. Choosing the right development tools can greatly improve the efficiency of API usage. For example, an SDK reduces the cost for developers to call APIs by eliminating the need to write complex code and understand the underlying implementation details; a command-line interface (CLI) is used to manage and operate cloud resources through a command-line interface; Terraform is used to manage complex infrastructure environments across multiple cloud service providers, regions, and accounts.
Follow the requirements of OpenAPI suppliers:
Reasonably control the number of API calls according to server-side restrictions such as flow control quotas to avoid additional costs or service interruptions caused by excessive calls, or pre-plan quota improvements or flow control disaster recovery plans based on business traffic estimates.
Operations and Governance of OpenAPIs
Pay attention to API changes and version iterations:
Continuously follow the changes and new releases of APIs to make timely business responses based on API changes. At the same time, when necessary, quickly adjust the code to improve service availability and reduce the negative impact on business stability caused by changes.
Track call logs and error information:
All OpenAPI requests are auditable, and the API Gateway can record, store, and query API request and response information. This information includes request and response parameters, request time, status codes, response time, etc., which can be used to monitor the performance and security of APIs. Through API call records, developers can understand how APIs are used, provide references for optimizing and improving APIs. In addition, this part of the audit information can also be used to track API access records, help enterprises manage compliance, ensure API security, and assist enterprises in emergency response and security investigations. Paying attention to API request logs is one of the important ways to ensure API security and optimize API usage.
Cloud Service Integration through Resource-Oriented Approach
Integrating cloud services through OpenAPIs often encounters the following challenges:
High number of APIs: With the continuous updates and expansions of Alibaba Cloud services, the number of APIs is increasing. This is a good thing, as it shows that the service capabilities of Alibaba Cloud are constantly improving. However, for developers, it requires more time and effort to learn and understand various API usages and functions, and more testing and debugging are needed to ensure integration accuracy and stability.
Complexity of integration: The continuous increase and update of Alibaba Cloud services also means that the complexity of integration is increasing. Developers need to consider how to integrate multiple APIs, how to handle data format and protocol conversions, and how to handle exceptional situations. All of these require more time and effort.
Difficult to maintain: With the increase in APIs and the complexity of integration, maintenance becomes more difficult. Developers need to keep up to date with Alibaba Cloud services, understand and grasp the integrated systems, and monitor and maintain them. At the same time, if Alibaba Cloud services change, developers also need to update and adjust the integrated systems in a timely manner to ensure system stability and availability. All of these require high technical skills and efforts.
It is recommended to use a resource-oriented approach to integrate cloud services in the cloud to reduce integration costs. There are two main implementation methods: Cloud Control API: Cloud Control API provides an all-in-one enterprise-level integration solution for Alibaba Cloud resources, reducing integration costs and maintenance costs for enterprises and ecosystem partners. Advanced developers need a standardized API to avoid understanding the differentiation of multiple cloud service OpenAPIs and to maintain continuous integration during subsequent operations and maintenance processes. Cloud Control API is a free OpenAPI developer tool suite. It allows developers to manage and integrate hundreds of Alibaba Cloud services using a consistent set of five standardized APIs: CreateResource, UpdateResource, ListResources, DeleteResource, and an SDK. With Cloud Control API, developers can integrate hundreds of Alibaba Cloud services through standardized create, update, delete, list, and read (CRUDL) APIs and a single SDK. This means that when new products or features are added, they can be quickly and continuously integrated into the cloud business with almost zero learning and development costs. Terraform Terraform is a popular Infrastructure as Code (IaC) tool, which can write reusable code modules to simplify repetitive work. It supports multiple cloud platforms and can deploy infrastructure on multiple cloud service providers' platforms. The code written in Terraform language is highly readable and easy to maintain. It also supports environment simulation during the coding process, which can test infrastructure code on local environments or in CI/CD environments. In addition, the Terraform community is active and has many third-party modules and plugins.
However, organizations should also pay attention to some limitations brought about by these methods, such as complex configuration, high learning costs, and slow deployment speed for large-scale deployments. When choosing a technical path, it is necessary to balance factors such as learning costs and deployment speed. When promoting these methods within the organization, there is often resistance. Based on a large number of customer practices, it is recommended to start from the following aspects: Change in mindset If team members are accustomed to manually managing infrastructure, they are more inclined to implement all changes directly. For example, they may SSH into servers and execute commands. However, migrating to infrastructure as code requires a change in mindset, as changes are now made in an indirect way: first, edit the code and submit it, and then let certain automated processes deploy the changes. This additional "indirect way" may encounter resistance from team members. For simple tasks, this approach may be slower than direct deployment, especially when team members are still learning new automation tools, the gap becomes more apparent. Upgrade development mode Upgrade from procedural to object-oriented development modes; different from the fine-grained integration experience of numerous OpenAPIs, the resource-oriented design concept aims to reduce the cost for developers to understand the business differentiation between various OpenAPIs and enable them to maintain a continuous integration state during subsequent operations and maintenance. Improve development efficiency Abstract business into infrastructure code, which means that the operations team needs to spend most of their time writing a large amount of code, such as business modules, test modules, etc. Although some operations engineers enjoy coding and are willing to accept changes, other engineers may find it a daunting task. Many operations engineers and system administrators are accustomed to manual changes and occasionally write short scripts. However, doing software development work full-time may require learning new skills or directly hiring new personnel. Reduce learning costs If the organization improves integration efficiency/reduces learning costs based on the OpenAPIs provided by cloud service providers, it is a time-consuming and laborious approach with little benefit. You can use the resource-oriented integration capabilities provided directly by cloud service providers (such as Cloud Control API, CADT, ROS, etc.); or you can use popular open-source products in the community (such as Terraform, Ansible, etc.) to reduce this barrier. Meanwhile, through various forms such as knowledge documentation, sharing, and training, common integration issues and problems can be effectively addressed, thereby improving learning efficiency and effectiveness.