Setting up a Multi-Cloud CI/CD Chain using Alibaba Tools

简介: These days, having a continuous integration and delivery (CI/CD) pipeline in place is pretty much essential for any kind of software development.

NW_005

These days, having a continuous integration and delivery (CI/CD) pipeline in place is pretty much essential for any kind of software development. Therefore, the question isn’t so much if you should set up a CI/CD pipeline, but how.

And when it comes to the how of CI/CD, you have a lot of options. There are countless CI/CD solutions on the market, including commercial as well as open source platforms, both of which have their own distinct advantages and disadvantages over the other.

In this article, I outline the reasons why you may wish to use a commercial CI/CD platform, then walk through the steps of taking advantage of tools on Alibaba Cloud that allow you to set up a production-ready CI/CD pipeline.

Commercial vs Open Source

A commercial CI/CD platform is typically a hosted service that deals with the build and deployment steps in a standard pipeline. While there are privacy concerns that can be raised with commercial platforms, and the cost is generally higher than self-hosted solutions, they are a great way to establish a CI/CD pipeline with minimal resources. In addition to hosted services, on-premises commercial CI/CD solutions are available as well, which can help get around the privacy and security concerns that exist with hosted services.

Many commercial CI/CD platforms give back to the developer community by open-sourcing their CI/CD engines. While not every commercial platform open-sources their engine, and not every open source engine is backed by a commercial platform, these solutions provide a lot more control at the expense of ease-of-use. Spinning up an open source CI/CD platform is significantly more involved, and requires some sort of server to run on. Open source platforms are an excellent option for organizations that require more resources for their build processes, or even organizations that simply prefer to keep their code in-house whenever possible.

Alibaba + CI/CD

When it comes to hosting an application on Alibaba Cloud, both CI/CD solutions are viable—depending on the needs and use-cases of the application. To demonstrate, let's take a look at how to accomplish running remote commands and deploying a simple application using either a commercial or open source CI/CD platform. While the configuration of open source and commercial solutions differ, the process of actually implementing a CI/CD pipeline is pretty similar across the board, and interacting with servers—both in a private and public cloud—comes down to two commands: rsync and ssh.

Deployments in a Nutshell

Before we get started, let's assume that our CI/CD pipeline consists of only three parts: test -> build -> deploy. While the test and build processes can happen directly within the platform, deploying a build means that we will have to get creative with our deployment method. Some cloud providers offer APIs that make this solution feel more streamlined, but at a high level, the following method will work with any VPS. Thankfully, we can deploy any built code to a running ECS instance using standard shell commands:

rsync -r --delete-after --quiet /path/to/build <ssh-user>@<ecs-host>:path/to/files

rsync is a command line utility that is used to synchronize files across servers. It has been around for a while—The rsync algorithm is well-known as having been used by Dropbox to deal with file synchronization. The beauty of this deployment method is that it can be used regardless of the hosting provider you use, which means that you can deploy to multiple cloud providers simultaneously, both internally at Alibaba Cloud, and externally.

It is important to note that, in order to successfully authenticate to our ECS instance, you will have to generate an SSH key and give your CI/CD platform access to it. While out of the scope of this article, Digital Ocean has an excellent guide for generating SSH keys. (Take note: If you follow the Digital Ocean guide, you should not set up an SSH passphrase—otherwise your automated deploy process won't be able to use your key.)

Executing Commands

Now, imagine that we need to execute a new command on our CI/CD pipeline. Let's say, for example, that after deployment we need to run database migrations on ApsaraDB, updating our pipeline to test -> build -> deploy -> migrate. As with the above deployment command, this can be accomplished through a simple SSH command:

ssh <ssh-user>@<ecs-host> -C "<migration-command>"

The -C option of the SSH command will execute any command within the login shell you have created. Using this principle, we can accomplish significantly more than running simple database migrations. This allows us to interact with various Alibaba Cloud services, such as clearing a cache that is stored in ApsaraDB for Redis, which can only be accessed from within the Alibaba Cloud Intranet.

Next Steps

While the above commands are enough to deploy and interact with any VPS at a basic level, building out a more robust pipeline using the Alibaba Cloud API will give you far more control. It will give you the ability to more programmatically interact with resources, manage your load balancers, automatically provision staging servers, and more. This solution is far more involved, but will provide you with the same level of control you can find with other fully integrated CI/CD hosting platforms. When it comes down to it, building a proper CI/CD pipeline is about planning and automation, not the specific tool you use. Given the right commands, anything is possible, no matter what platform you use.

Bio

01

Zachary Flower (@zachflower) is a Fixate IO Contributor and lead developer at Emerson Stone, a Boulder-based design and branding agency. He has an eye for simplicity and usability, and strives to build products with both the end user and business goals in mind. From building projects for the NSA to creating features for companies like Name.com and Buffer, Zach has always taken a strong stand against needlessly reinventing the wheel, often advocating for the use of well established third-party and open source services and solutions to improve the efficiency and reliability of a development project.

目录
相关文章
|
Android开发 Shell
Android模拟点击的四种方式
导论 在Android中模拟一个点击事件有三种方式是通过模拟MotionEvent来实现;一种是通过ADB来实现;一种是通过Instrumentation测试框架来实现 第一种:模拟MotionEvent 通用方法如下: private void setSimulateClick(View ...
9017 0
|
14天前
|
数据采集 Web App开发 人工智能
Rust无头浏览器Obscura实战:30MB内存,爬虫与AI Agent轻量替代
本文介绍 Rust 编写的轻量无头浏览器 Obscura(36k star),内存仅约 30MB、启动瞬时,支持 Puppeteer/Playwright 无缝接管及 MCP 协议,专为网页爬虫与 AI Agent 场景优化,Windows 解压即用,实测截图、并发抓取、代理配置全部跑通。
237 1
|
2月前
|
人工智能 JavaScript 安全
钉钉宜搭二次开发服务商怎么选:2026年服务商横向对比与选型清单
本文详解如何甄选靠谱的钉钉宜搭二次开发服务商,强调需重点核查官方开发资质、同行业可验证案例、系统集成能力及合同售后条款,警惕纯渠道分销商,助企业规避项目烂尾、数据孤岛等风险。
293 27
|
3月前
|
算法 自动驾驶 安全
AgentLoop 数据飞轮实践(一):总览 —— 让 Agent 持续调优的闭环
Agent 上线的那一刻,真正的考试才开始:上线只是起点,持续调优才是关键。本文用一小时实操带你看 AgentLoop 如何把接入、评估、实验、经验库串成数据飞轮,以专家驱动与全自动经验挖掘,让 Agent 越转越聪明。
788 24
|
3月前
|
SQL 自然语言处理 安全
Agent 如何正确接入数据库
Agent 如何接入数据库,关键是要解决 安全管控、语义增强 和 正确性兜底。DatI 给出如何在 Agent 中进行 text2sql 智能问数或构建轻应用的新方法
310 2
|
2月前
|
存储 弹性计算 人工智能
阿里云服务器多少钱一个月?云服务器ECS最新月付收费标准与活动价格
阿里云ECS提供按量付费、包月、包年、3年付、5年付等多种计费方式,付费周期越长月均成本越低。以通用算力型u1实例2核4G为例,包月目录价168.48元/月,年付月均降至85.92元,5年付仅38.75元;经济型e实例2核2G年付月均低至15.35元。实例规格族间存在性能与价格梯度,AMD平台通常较Intel同规格便宜5%-15%。活动方面,轻量2核2G低至38元/年、经济型e 99元/年、u1 2核4G 199元/年,AMD c9a/g9a/r9a月付享8折。采购可善用优惠券、上云与迁云补贴进一步降本。
|
存储 人工智能 自然语言处理
钉钉新商业版:四个版本为Agent划定“工作半径”,FDE服务商让AI真正“入职”
2026年9月23日,钉钉发布Agent时代全新商业版,设AI基础/高级/尊享/旗舰四档,全员接入千问办公并赠积分。标准版免费延续,资源全面升级,API不限量。以FDE陪跑模式深入业务现场,4步交付智能体,助力Agent真正“入职、干对、守界”。
472 0
|
3月前
|
存储 缓存 调度
DeepSeek弹性计算(DSec):一种用于大规模高效智能体训练的沙箱基础设施
DeepSeek弹性计算(DSec)是面向大模型智能体训练的生产级沙箱平台,支持FnCall、容器、microVM及虚拟机等多后端,实现高密度、低延迟、状态可恢复的弹性执行。论文于2026年9月19日发布(arXiv:2609.22978)。
544 0
|
3月前
|
人工智能 自然语言处理 安全
AI大模型时代,新一代好用的智能客服系统有哪些颠覆性变化?
本文聚焦大模型驱动的智能客服变革,以阿里云瓴羊Quick Service为样本,揭示其从“能答”到“能干”的范式跃迁——通过感知—理解—决策—执行闭环,实现改地址、催发货等任务自动办理,并支撑企业服务升级与增长提效。(239字)
|
5月前
|
Web App开发 运维 前端开发
数字孪生项目开发技术对比
数字孪生选型核心在于平衡:Web原生(Three.js/Cesium)以低并发成本、高兼容性支撑日常运维;UE5云流化依托Nanite/Lumen实现影视级画质与物理仿真,适合展厅与推演。二者正走向混合架构。(239字)