Skip to content

Commit 4ddd8f1

Browse files
authored
Merge branch 'main' into main
2 parents ae48a27 + ca02a3e commit 4ddd8f1

19 files changed

+693
-32
lines changed

blog/2025-06-06-may-product-updates.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "May 2025 Defang Compose Update"
33
description: "Monthly product updates from the Defang team - May 2025"
4-
slug: 2025-06-06-product-update
54
tags:
65
[
76
Cloud,

blog/2025-06-16-crew-ai-sample.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Sample: Starter Kit for RAG + Agents with CrewAI"
33
description: "Going over our sample for RAG + Agents with CrewAI"
4-
slug: rag-agents-crewai-sample
54
tags: [Cloud, NoDevOps, Docker Compose, Defang, Sample]
65
author: Defang Team
76
---
@@ -89,4 +88,3 @@ DEFANG_PROVIDER=<provider> defang compose up
8988
```
9089

9190
Want more? File an [issue](https://github.com/DefangLabs/samples/issues) to request a sample—we'll do everything we can to help you deploy better and faster!
92-

blog/2025-06-16-docker-compose-defang.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Bridging Local Development and Cloud Deployment"
33
description: "Announcing our new whitepaper: Bridging Local Development and Cloud Deployment with Docker Compose and Defang"
4-
slug: defang-docker-compose
54
tags: [Cloud, NoDevOps, Docker Compose, Defang, Whitepaper]
65
author: Defang Team
76
---

blog/2025-08-22-agentic-apps.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Defang works seamlessly with leading agentic frameworks. Try them out with our r
4545
- [LangGraph](https://github.com/DefangLabs/samples/tree/main/samples/agentic-langgraph) - workflow sample that defines and controls multi-step agentic graphs with LangChain.
4646
- [Agentic Strands](https://github.com/DefangSamples/sample-agentic-strands-template/tree/main) - A Strands Agent application.
4747

48+
4849
More framework templates coming soon.
4950

5051
## Why It Matters

docs/concepts/authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To do pretty much anything with Defang, you'll need to authenticate with the sys
1212
defang login
1313
```
1414

15-
This will prompt you to open a browser and log in to your [Defang account](/docs/concepts/accounts). For now, the only way to log in is with GitHub, though we will offer other providers to authenticate in the future. Once you've logged in, you can close the browser and return to the terminal. You should see a message that you've successfully logged in.
15+
This will prompt you to open a browser and log in to your [Defang account](/docs/concepts/accounts). You can log in using [GitHub](https://github.com/) or [GitLab](https://gitlab.com/). We will offer other authentication providers in the future. Once you've logged in, you can close the browser and return to the terminal. You will see a message that you've successfully logged in.
1616

1717
:::tip
1818
Keep in mind that your Defang account is separate from your [cloud provider account](/docs/concepts/defang-byoc). You will need to authenticate with your cloud provider account separately to deploy services to your own cloud account.

docs/concepts/deployment-modes.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ Defang provides three deployment modes: `affordable`, `balanced`, and `high_avai
1616

1717
| Feature | Affordable | Balanced | High Availability |
1818
|-|-|-|-|
19-
| Build Resources | Builds will be run with 2x vCPUs | Builds will be run with 2x vCPUs | Builds will be run with 4x vCPUs |
19+
| Build Resources | Builds will be run with 2x vCPUs | (like `affordable`) | Builds will be run with 4x vCPUs |
2020
| Compute | Using spot instances | (like `affordable`) | On-demand instances |
2121
| Databases | Defang will provision resources optimized for burstable memory | (like `high_availability`) | Defang will provision resources optimized for production |
22-
| Deployment | Previous deployments will be spun down before new deployments are spun up. | (like `high_availability`) | Rolling updates will be used to deploy new versions. Defang will gradually replace services while maintaining at least [the original number of replicas](/docs/tutorials/scaling-your-services). |
23-
| Logging | Logs retained for 1 day to save costs. | | Logs retained for 30 days for compliance. |
22+
| Deployment | Previous deployments will be spun down before new deployments are spun up. Stopped tasks will not restart. | (like `high_availability`) | Rolling updates will be used to deploy new versions. Defang will gradually replace services while maintaining at least [the original number of replicas](/docs/tutorials/scaling-your-services). |
23+
| Logs | Logs retained for 1 day to save costs. | Logs retained for 7 days to balance cost and access. | Logs retained for 30 days for compliance. |
2424
| Networking | | (like `high_availability`) | Defang will provision a NAT gateway. |
2525
| Load Balancing | HTTP redirect to HTTPS using `302 Found` | | Termination Protection will be enabled; logs are retained on "down" |
2626
| DNS | Defang will provision shorter TTLs; zones will be forcefully destroyed | | Defang will provision longer TTLs; records can be overwritten for ZDT |
27-
| Managed storage | Operations that cause downtime are allowed | | Encryption at rest; Final snapshot created on "down" |
28-
| Logs | 1 day retention | 7 days retention | 30 days retention |
27+
| Managed Storage | Operations that cause downtime are allowed | | Encryption at rest; Final snapshot created on "down" |

docs/concepts/estimation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ sidebar_position: 280
99
Defang enables you to estimate the cost of deploying and running your project without needing to create an account with your cloud provider.
1010

1111
:::info
12-
Currently, AWS is the only provider supported for cost estimation. Support for GCP and Digital Ocean is coming soon.
12+
Currently, AWS and GCP are supported for cost estimation. Support for Digital Ocean is coming soon.
1313
:::
1414

1515
## Generating an Estimate
1616

1717
Navigate your shell to your application's working directory and run
1818
```
19-
defang estimate [--provider aws] [--mode affordable|balanced|high_availability]
19+
defang estimate [--provider=aws|gcp] [--mode=affordable|balanced|high_availability]
2020
```
2121

22-
Here is an example of the output you would see if you estimated the cost deploying the [django-postgres](https://github.com/DefangLabs/samples/tree/main/samples/django-postgres) sample using the `balanced` [deployment mode](/docs/concepts/deployment-modes).
22+
Here is an example of the output you would see if you estimated the cost deploying the [django-postgres](https://github.com/DefangLabs/samples/tree/main/samples/django-postgres) to AWS sample using the `balanced` [deployment mode](/docs/concepts/deployment-modes).
2323

2424
```
2525
defang estimate --provider=aws --mode=balanced

docs/concepts/managed-storage/managed-mongodb.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_position: 3000
77
# Managed MongoDB
88

99
:::info
10-
This feature was introduced in Defang v1.2.0 released on June 3, 2025. [Upgrade to the latest version](/docs/cli/defang_upgrade)
10+
This feature was introduced in Defang v1.2.0 released on June 3, 2025 for AWS. [Upgrade to the latest version](/docs/cli/defang_upgrade)
1111
:::
1212

1313
Managed MongoDB is a service that allows you to store and retrieve large amounts of data in a document-oriented format. MongoDB is ideal for storing unstructured data like JSON documents, making it a popular choice for modern applications.
@@ -19,15 +19,33 @@ Managed MongoDB is a service that allows you to store and retrieve large amounts
1919
| [Playground](/docs/providers/playground#managed-services) | ⚠️ Unmanaged |
2020
| [AWS](/docs/providers/aws#managed-storage) | ✅ DocumentDB |
2121
| [DigitalOcean](/docs/providers/digitalocean#future-improvements) | ⚠️ Unmanaged |
22-
| [GCP](/docs/providers/gcp#future-improvements) | ⚠️ Unmanaged |
22+
| [GCP](/docs/providers/gcp#future-improvements) | ✅ Firestore |
2323

2424
## How to use Managed MongoDB
2525

2626
To use managed MongoDB, in your `compose.yaml` file, use the `x-defang-mongodb` extension to define your MongoDB service. Adding the extension will tell Defang to provision a managed instance, rather than running MongoDB as a container.
2727

2828
### Required Configuration
2929

30-
When using managed MongoDB, you **must** set a username and password for the database. By default, these are read from the `MONGO_INITDB_ROOT_USERNAME` and `MONGO_INITDB_ROOT_PASSWORD` config variables, conform [the official MongoDB container image](https://hub.docker.com/_/mongo). These can be set using the `defang config set MONGO_INITDB_ROOT_USERNAME` and `defang config set MONGO_INITDB_ROOT_PASSWORD` commands. If you do not provide these values, the deployment will fail.
30+
### AWS
31+
When using managed MongoDB on AWS, you **must** set a username and password for the database. By default, these are read from the `MONGO_INITDB_ROOT_USERNAME` and `MONGO_INITDB_ROOT_PASSWORD` config variables, following [the official MongoDB container image](https://hub.docker.com/_/mongo) convention.
32+
33+
You can set these using the following commands:
34+
35+
```bash
36+
defang config set MONGO_INITDB_ROOT_USERNAME <your-username>
37+
defang config set MONGO_INITDB_ROOT_PASSWORD <your-password>
38+
```
39+
40+
If you do not provide these values, the deployment will fail.
41+
42+
### GCP
43+
44+
When using managed MongoDB on GCP, you **must** set a `MONGO_INITDB_DATABASE` environment variable with the name of the database to create.
45+
46+
Defang will automatically create a config variable named `<SERVICE_NAME>_URL` that contains the connection string for your MongoDB database. For example, if your service is named `db`, the config variable will be `DB_URL`.
47+
48+
**Important:** GCP will ignore `MONGO_INITDB_ROOT_USERNAME` and `MONGO_INITDB_ROOT_PASSWORD` credentials since they are not needed. GCP automatically handles authentication and grants your service access to the MongoDB database.
3149

3250
### Example
3351

@@ -36,15 +54,23 @@ services:
3654
app:
3755
# [...]
3856
environment:
39-
MONGO_URI: mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@db:27017/
57+
DB_URL: mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@db:27017/
4058
depends_on:
4159
- db
4260

4361
db:
4462
image: mongo:5
4563
x-defang-mongodb: true
64+
environment:
65+
MONGO_INITDB_DATABASE: mydb
4666
```
4767
68+
:::warning[Deleting a GCP Firestore MongoDB Database]
69+
Please be aware that GCP Firestore does not allow deletion of your database when you bring down your project using `defang compose down`. You must go to the [GCP Cloud Console for Firestore](https://console.cloud.google.com/firestore/databases/) to delete it manually.
70+
:::
71+
4872
:::warning[Version]
4973
AWS DocumentDB is compatible with MongoDB 3.6, 4.0, and 5.0. The `mongo:5` image is compatible with DocumentDB 5.0, so we recommend using this version for your MongoDB service. Deployment will fail for versions higher than 5.
74+
75+
GCP Firestore does not have a configurable version.
5076
:::

docs/concepts/managed-storage/managed-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ sidebar_position: 000
66

77
# Managed Storage
88

9-
Defang helps you provision the infrastructure you need to run your services. That infrastructure is designed to scale in and out without persistent storage, so you can build highly scalable services. But Defang can also help you provision managed services to store and persist your data, like [caches](./managed-redis.md), [databases](./managed-postgres.mdx), and [object storage](./managed-object-storage.md).
9+
Defang helps you provision the infrastructure you need to run your services. That infrastructure is designed to scale in and out without persistent storage, so you can build highly scalable services. Defang can also help you provision managed services to store and persist your data, like [caches](./managed-redis.md), [sql databases](./managed-postgres.mdx), [nosql databases](./managed-mongodb.md), and [object storage](./managed-object-storage.md).

docs/concepts/mcp.md

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,39 @@ This page is a guide to the Defang MCP Server detailing its installation, tools,
2020

2121
## Installation
2222

23-
Ensure that you have the [npm package manager](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed, as `npx` commands are required for setup.
23+
Ensure that you have the [Defang CLI](/docs/getting-started.mdx#install-the-defang-cli) installed.
2424

25-
:::warning
26-
At this time, the Defang MCP Server can only be installed using `npx`. Other methods are not yet supported.
27-
:::
2825
Run the setup command in your terminal for your IDE of choice from the [Supported IDEs](#supported-ides) section. This will connect the Defang MCP Server to your IDE. The general format of the command is as follows:
2926

27+
:::tip[Recommended Installation]
28+
Install the [Defang CLI](/docs/getting-started.mdx#install-the-defang-cli) using [Curl](https://curl.se/) or [Homebrew](https://brew.sh/)
29+
3030
```bash
31-
npx -y defang@latest mcp setup --client=<your-ide>
31+
defang mcp setup --client=<your-ide>
3232
```
3333

34+
:::
35+
3436
Once the command completes, you may need to restart your IDE for the changes to take effect.
3537

3638
Once the MCP Server is running, you can access the Defang MCP tools directly through the AI agent chat in your IDE.
3739

3840
That's it! Feel free to explore our [Example Prompts](#example-prompts) to get ideas on how to interact with the AI agent and make the most of the Defang MCP Server.
3941

42+
Note that `npx` installation is supported, but not recommended.
43+
44+
```bash
45+
npx -y defang@latest mcp setup --client=<your-ide>
46+
```
47+
4048
## Supported IDEs
4149

4250
### Cursor
4351

4452
Setup command:
4553

4654
```bash
47-
npx -y defang@latest mcp setup --client=cursor
55+
defang mcp setup --client=cursor
4856
```
4957

5058
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -56,7 +64,7 @@ Once setup is complete, you can interact with the AI coding agent using Defang-r
5664
Setup command:
5765

5866
```bash
59-
npx -y defang@latest mcp setup --client=windsurf
67+
defang mcp setup --client=windsurf
6068
```
6169

6270
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -68,7 +76,7 @@ Once setup is complete, you can interact with the AI coding agent using Defang-r
6876
Setup command:
6977

7078
```bash
71-
npx -y defang@latest mcp setup --client=vscode
79+
defang mcp setup --client=vscode
7280
```
7381

7482
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -80,21 +88,33 @@ Once setup is complete, you can interact with the AI coding agent using Defang-r
8088
Setup command:
8189

8290
```bash
83-
npx -y defang@latest mcp setup --client=vscode-insiders
91+
defang mcp setup --client=vscode-insiders
8492
```
8593

8694
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
8795

8896
![VS Code](/img/mcp-concept/vscode-insiders.png)
8997

98+
### Kiro
99+
100+
Setup command:
101+
102+
```bash
103+
defang mcp setup --client=kiro
104+
```
105+
106+
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
107+
108+
![Kiro](/img/mcp-concept/kiro.png)
109+
90110
### Claude Desktop
91111

92112
While this is not an IDE in the traditional sense, it can support MCP servers. For a smoother experience, consider specifying a project name or directory when making chat prompts to this platform.
93113

94114
Setup command:
95115

96116
```bash
97-
npx -y defang@latest mcp setup --client=claude
117+
defang mcp setup --client=claude
98118
```
99119

100120
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -121,6 +141,22 @@ The `services` tool displays the details of all your services that are currently
121141

122142
Given a project name or directory, the `destroy` tool identifies any services deployed with Defang and terminates them. If no services are found, it will display an appropriate message.
123143

144+
### `estimate`
145+
146+
The `estimate` tool scan your project directory and considers your [deployment mode](/docs/concepts/deployment-modes.md) (which defaults to `AFFORDABLE`) to provide a [cost estimation](/docs/concepts/estimation.md) for your project. Currently, the tool supports two providers: `AWS` or `GCP`.
147+
148+
### `list_configs`
149+
150+
The `list_configs` tool will [list](/docs/cli/defang_config) all the Defang configs set for your project.
151+
152+
### `set_config`
153+
154+
The `set_config` tool will [set](/docs/tutorials/configure-environment-variables#step-2---set-the-actual-value-in-the-defang-cli) a specific Defang config for your project.
155+
156+
### `remove_config`
157+
158+
The `remove_config` tool will [remove](/docs/tutorials/configure-environment-variables#removing-a-config-value) a specific Defang config for your project.
159+
124160
## Example Prompts
125161

126162
After connecting the Defang MCP Server to your IDE using an installation method, you can type in prompts in your chat to invoke the AI agent to use any MCP tool(s).
@@ -149,4 +185,32 @@ deploy this with defang /Users/yourname/Documents/project1
149185
do I have a service called project1
150186
```
151187

188+
You can estimate the cost of a deployment to a supported cloud provider:
189+
190+
```
191+
can you estimate balance mode on aws for this project?
192+
```
193+
194+
```
195+
can you estimate how much this project will cost on gcp?
196+
```
197+
198+
You can list, set and remove Defang configs for a project:
199+
200+
```
201+
what defang configs do I have set for this project?
202+
```
203+
204+
```
205+
list all the defang configs I have set for this project
206+
```
207+
208+
```
209+
set the defang config DATABASE_URL to example.com
210+
```
211+
212+
```
213+
remove the defang config DATABASE_URL
214+
```
215+
152216
Feel free to try any of these prompts or create your own!

0 commit comments

Comments
 (0)