โ๏ธ Multi-Cloud Deployment Example¶
Deploy applications across multiple cloud providers.
Overview¶
Sloth Runner supports deployment to: - โ๏ธ AWS - ๐ท Azure - ๐ฉ๏ธ GCP - ๐ DigitalOcean
Example: Deploy to Multiple Clouds¶
-- Deploy to AWS
task("deploy_aws", {
description = "Deploy to AWS",
command = function()
log.info("โ๏ธ Deploying to AWS...")
local result = aws.s3.sync({
source = "./build",
destination = "s3://my-app-bucket/static",
delete = true
})
if not result then
return false, "AWS deployment failed"
end
return true, "AWS deployment completed"
end
})
-- Deploy to Azure
task("deploy_azure", {
description = "Deploy to Azure",
command = function()
log.info("๐ท Deploying to Azure...")
local result = azure.exec({
"storage", "blob", "upload-batch",
"--destination", "mycontainer",
"--source", "./build"
})
if result.exit_code ~= 0 then
return false, "Azure deployment failed: " .. result.stderr
end
return true, "Azure deployment completed"
end
})
-- Deploy to GCP
task("deploy_gcp", {
description = "Deploy to GCP",
command = function()
log.info("๐ฉ๏ธ Deploying to GCP...")
local result = gcp.exec({
"storage", "rsync", "-r", "./build",
"gs://my-app-bucket/"
})
if result.exit_code ~= 0 then
return false, "GCP deployment failed: " .. result.stderr
end
return true, "GCP deployment completed"
end
})
Features¶
- โ Parallel deployment
- โ Provider-specific configuration
- โ Unified interface
- โ Automatic failover