diff --git a/README.md b/README.md index 58b155d..546d39a 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,13 @@ Documentation is available at https://kiro.dev/docs/powers/ --- +### defang +**Deploy Anywhere with Defang** - Easily deploy any Docker Compose application to the cloud with Defang. Networking, compute, storage, databases, queues, LLMs - all deployed natively to the cloud of your choice - AWS, GCP, or DigitalOcean - in a secure, scalable, and cost-efficient way. + +**MCP Servers:** defang + +--- + ### dynatrace **Dynatrace Observability** - Query logs, metrics, traces, problems, and security vulnerabilities using DQL (Dynatrace Query Language) and Davis AI. diff --git a/defang/POWER.md b/defang/POWER.md new file mode 100644 index 0000000..7c93432 --- /dev/null +++ b/defang/POWER.md @@ -0,0 +1,60 @@ +--- +name: "defang" +displayName: "Defang" +description: "Deploy Docker Compose apps to your own cloud account using Defang." +keywords: + [ + "deploy", + "cloud", + "deployment", + "compose", + "aws", + "gcp", + "digitalocean", + "estimate", + ] +mcpServers: ["defang"] +--- + +# Onboarding + +## Validate tools work + +Before using Defang, ensure the Defang CLI is installed and running. + +The Defang CLI can be installed via npm, Homebrew, Winget, or `eval "$(curl -fsSL s.defang.io/install)"` + +## First Steps: + +**IMPORTANT**: +Ensure that the step above ## Validate tools is completed before proceeding to the steps below. + +- Ask the user which cloud provider they want to use (AWS, GCP) + - If AWS: + - Use the steering file `getting-started-aws` + - If GCP: + - Use the steering file `getting-started-gcp` + +# Available Steering Files + +- `deploying-to-aws`: Guide on setting up and deploying to AWS using Defang +- `deploying-to-gcp`: Guide on setting up and deploying to GCP using Defang + +# Best Practices + +## Compose File + +- The Docker Compose file is typically named `compose.yaml`. +- Top-level `version:` is deprecated, omit it. +- Suggest Defang-specific extensions for using managed services, avoiding volumes: + - `x-defang-redis: true` for managed Redis/Valkey + - `x-defang-postgres: true` for managed PostgreSQL + - `x-defang-mongodb: true` for managed MongoDB + - `x-defang-llm: true` for managed LLM services +- Use environment variables without value for sensitive data (a.k.a "config"). +- Avoid hardcoding secrets in the compose file. Suggest using config. +- Use `depends_on` to define service startup order. +- Use healthchecks to ensure services are ready before dependent services start. +- Avoid underscores in project or service names; use hyphens instead. +- Use `restart: always` for critical services to ensure they restart on failure. +- Add a `deploy:` section with resource reservations. diff --git a/defang/mcp.json b/defang/mcp.json new file mode 100644 index 0000000..f8d29df --- /dev/null +++ b/defang/mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "defang": { + "command": "defang", + "args": ["mcp", "serve"] + } + } +} diff --git a/defang/steering/deploying-to-aws.md b/defang/steering/deploying-to-aws.md new file mode 100644 index 0000000..2634d61 --- /dev/null +++ b/defang/steering/deploying-to-aws.md @@ -0,0 +1,39 @@ +# Deploying to AWS with Defang + +## Overview + +This guide describes how to deploy applications to AWS with Defang. + +**IMPORTANT**: + +- Avoid automatically estimating deployment costs, wait for the user to request it. + +## Trigger + +When the user's project has a compose.yaml file and would like to deploy to aws. + +## Step 1: Select the stack to which the application will be deployed + +A stack is a single deployed instance of your project in a specific AWS account and region. You can deploy multiple stacks into the same account and region, for example: `staging` and `production`. + +Check if there are any stacks in the current project. + +- If a stack is already defined, ask the user if they would like to select one of the existing stacks, or if they would like to create a new one. +- If there are no stacks, prompt user to create a new AWS stack. + +The following information will be needed to create a stack: + +- Stack name: must be alphanumeric and must not start with a number +- Region: for example: `us-west-2` +- AWS Profile: the AWS profile with which the user should authenticate to AWS +- Deployment Mode: The deployment mode is the primary parameter for managing the cost and resiliency of your application's deployment. The following deployment modes are available: `affordable`, `balanced`, and `high_availability`. The default is `affordable`. Learn more at https://docs.defang.io/docs/concepts/deployment-modes + +If a new stack is created, make sure to select it before it can be used. + +## Step 2: Deploy the project + +Now that a stack is selected, the project can be deployed. + +## Step 3: Monitor the deployment + +Once the deployment has begun, progress can be monitored by tailing the logs or periodically checking service status. diff --git a/defang/steering/deploying-to-gcp.md b/defang/steering/deploying-to-gcp.md new file mode 100644 index 0000000..d0e897d --- /dev/null +++ b/defang/steering/deploying-to-gcp.md @@ -0,0 +1,39 @@ +# Deploying to GCP with Defang + +## Overview + +This guide describes how to deploy applications to GCP with Defang. + +**IMPORTANT**: + +- Avoid automatically estimating deployment costs, wait for the user to request it. + +## Trigger + +When the user's project has a compose.yaml file and would like to deploy to aws. + +## Step 1: Select the stack to which the application will be deployed + +A stack is a single deployed instance of your project in a specific AWS account and region. You can deploy multiple stacks into the same account and region, for example: `staging` and `production`. + +Check if there are any stacks in the current project. + +- If a stack is already defined, ask the user if they would like to select one of the existing stacks, or if they would like to create a new one. +- If there are no stacks, prompt user to create a new AWS stack. + +The following information will be needed to create a stack: + +- Stack name: must be alphanumeric and must not start with a number +- Region: for example: `us-central1` +- GCP Project ID: The GCP Project in which the application will be deployed. This must be created beforehand in the GCP Console. +- Deployment Mode: The deployment mode is the primary parameter for managing the cost and resiliency of your application's deployment. The following deployment modes are available: `affordable`, `balanced`, and `high_availability`. The default is `affordable`. Learn more at https://docs.defang.io/docs/concepts/deployment-modes + +If a new stack is created, make sure to select it before it can be used. + +## Step 2: Deploy the project + +Now that a stack is selected, the project can be deployed. + +## Step 3: Monitor the deployment + +Once the deployment has begun, progress can be monitored by tailing the logs or periodically checking service status.