Alibaba Cloud Supports Mainstream Open Source Developer Tools to Further Enhance Developers’ Experience
By OpenAPI & Tools Team
In the cloud computing and big data era, continuous enterprise data cloudification, business development, and technical architecture evolution are bringing more complex O&M and higher costs for managing resources, applications, and data. Such constant and complex business scenario changes have raised the following questions:
- As business infrastructure is becoming more complex, is it still possible to build an architecture with just a few clicks?
- Can a custom cloud image be used to create multiple instances?
- As enterprises and individuals are becoming more concerned with data security, how can sensitive data, such as AccessKeys and certificates, be automatically encrypted, accessed, and stored?
- How can we implement application development and O&M without manually logging on to the machine?
- How can we quickly migrate data from a large number of machines in a complex architecture to Alibaba Cloud?
- If an enterprise wants to migrate its data to the cloud, how can it manage cloud resources of different vendors in a unified manner?
If one or more automated tools are available to address such problems, machines can do complicated work, whereas users only need to focus on simple configurations. Such automation can greatly improve the work efficiency.
How can we make machines to do all repetitive work for users? This is where Infrastructure as Code (IaC) comes in. IaC is a process where Alibaba Cloud resources, cloud image building processes, application deployment processes, and data management processes are defined through code in templates. By managing these templates through developer tools, developers can efficiently manage Alibaba Cloud resources, applications, and data.
Currently, Alibaba Cloud supports mainstream open source management tools, such as Terraform, Ansible, Packer, Vault, and BOSH. These tools help developers release more productive forces in the automatic O&M, multi-cloud management, cloud migration, and data security domains and efficiently manage the cloud infrastructure in a unified manner.
Terraform, Simplifying Resource Management
Terraform is an open source resource orchestration tool. You can use the Terraform syntax to define resources through code in a Terraform template. Then, you can use Alibaba Cloud Terraform Provider to create and manage Alibaba Cloud resources, such as Elastic Compute Service (ECS) instances, VPCs, VSwitches, and Server Load Balancer (SLB) instances, in a unified manner.
The following uses the existing template terraform-alicloud-classic-load-balance as an example. All resources, such as VPCs, VSwitches, ECS instances, ApsaraDB for RDS instances, security groups, SLB instances, and OSS buckets, required in a classic SLB architecture are defined in the template file main.tf. To quickly build the system architecture and release resources with one click, you can run the following commands in sequence:
# Download the template and go to the template directory.
$ git clone https://github.com/terraform-alicloud-modules/terraform-alicloud-classic-load-balance.git && cd terraform-alicloud-classic-load-balance
# Initialize Terraform.
$ terraform init
# Preview the resources to be created.
$ terraform plan
# Create all resources.
$ terraform apply
# Release all resources with one click.
$ terraform destroy
Currently, Alibaba Cloud Terraform Provider supports 22 Alibaba Cloud services and over 100 resources and data sources, and provides various examples and modules. It continuously enhances developers’ experience and efficiency and allows developers to release more productive forces.
Packer, Freeing You from Image Creation
Packer is an open source tool used to automatically create cloud images. Packer frees you from focusing on the detailed cloud image creation process. You do not need to log on to a console or machine and manually create a cloud image. Instead, you only need to determine which software to install, which services to customize, and which applications to download. Then, Alibaba Cloud Packer Builder helps you create your own cloud image with one click.
The following uses the existing Jenkins example to describe how to create a Jenkins image with one click by using Alibaba Cloud Packer Builder:
# Download the Jenkins example.
$ git clone https://github.com/alibaba/packer-provider.git
# Create a Jenkins image with one click.
$ packer build examples/alicloud/jenkins/alicloud.json
Currently, Alibaba Cloud Packer Builder supports image creation for 14 operating system distributions, including commonly used Ubuntu, CentOS, and Windows.
BOSH, Simplifying Deployment and Management of the Platform Architecture
BOSH is a project used to release and deploy small or large cloud software, and manage the software throughout its lifecycle. By providing a cloud provider interface (CPI) for BOSH, Alibaba Cloud supports integration with the first open source PaaS platform Cloud Foundry, enabling more enterprises and developers to use Alibaba Cloud.
The detailed technical solution of how Alibaba Cloud supports Cloud Foundry is available for your reference.
Ansible, Automatically Managing Alibaba Cloud Resources
Ansible is a powerful engine that automates processes, such as machine logon, application package upload or download, and application deployment and management. Based on the powerful automated management capabilities of Ansible, Alibaba Cloud provides multiple cloud resource management modules, such as ali_instance, ali_vpc, and ali_slb_lb. With these modules, you can incorporate the cloud resource management process into the application deployment management process, thus creating resources and deploying applications with one click. This further improves the automation capability and O&M efficiency.
The following uses the existing alicloud_ecs_vpc example to describe how to automatically create and delete resources, such as ECS instances, VPCs, VSwitches, security groups, and ECS disks.
# Download the alicloud_ecs_vpc example and go to its directory.
$ git clone https://github.com/alibaba/ansible-provider.git && cd ansible-provider/examples/alicloud-ecs-vpc
# Create cloud resources with one click.
$ ansible-playbook alicloud.yml
# Delete cloud resources with one click.
$ ansible-playbook destroy.yml
Vault, Simplifying Key Management
Vault is a tool that manages keys and sensitive data. It manages and stores AccessTokens, AccessKeys, passwords, security certificates, keys, and other sensitive data in a unified manner. When you access Vault, Alibaba Cloud provides a secrets engine and an authentication method, so that you do not need to set complex environment variables and static key files or worry about losing your keys or AccessKeys. You can store all your sensitive data in Vault and run Vault commands to obtain the data as required in real time.
Alibaba Cloud Developer Center
You are welcome to explore our developer tools and resources on our newly launched Developer Center. You can build your first application with our APIs and SDKs, dive into our technical guides and how-to tutorials, or share your projects and ideas with the community worldwide on the Developer Center.
- Developer Center: https://developer.alibabacloud.com
- API and SDK: https://developer.alibabacloud.com/resource
- Open source projects: https://developer.alibabacloud.com/project
- Developer services: https://developer.alibabacloud.com/service
- OpenAPI Explorer: https://api.aliyun.com/new#/
- Cloud Shell: https://www.alibabacloud.com/products/cloud-shell
- API Error center: https://error-center.alibabacloud.com