diff --git a/blog/2023-06-29-Announcing-the-Private-Beta-for-the-DOP.md b/blog/2023-06-29-Announcing-the-Private-Beta-for-the-DOP.md index 0f5d2ce53..09d1737eb 100644 --- a/blog/2023-06-29-Announcing-the-Private-Beta-for-the-DOP.md +++ b/blog/2023-06-29-Announcing-the-Private-Beta-for-the-DOP.md @@ -11,7 +11,7 @@ We realize that improving on this state of affairs is a long journey. Today, we **Try the Private Beta!** -To try the Private Beta, please go to [portal.defang.dev](https://portal.defang.dev) and register. We would love to have you kick the tires and give us your feedback! You can also check out our [documentation](https://docs.defang.io/docs/intro), [samples](https://docs.defang.io/docs/intro), and our [GitHub repository](https://github.com/DefangLabs). +To try the Private Beta, please go to [portal.defang.dev](https://portal.defang.dev) and register. We would love to have you kick the tires and give us your feedback! You can also check out our [documentation](/docs/intro), [samples](/docs/intro), and our [GitHub repository](https://github.com/DefangLabs). **Stay Tuned for More** diff --git a/blog/2024-02-12-announcing-defang-public-beta.md b/blog/2024-02-12-announcing-defang-public-beta.md index a6b0ac248..ced3a0c10 100644 --- a/blog/2024-02-12-announcing-defang-public-beta.md +++ b/blog/2024-02-12-announcing-defang-public-beta.md @@ -9,13 +9,13 @@ tags: [Cloud, GenerativeAI, NoDevOps, BYOC, AWS] Ever since we shipped our Private Beta in the summer of 2023, we have been working with early adopters and listening to their feedback. While these early customers loved the ease with which they could create, deploy, and manage a cloud application, they had one big request - to deploy their applications to their own cloud (e.g. AWS) account. This was important to them for a number of reasons - to leverage their cloud credits, to enforce their IAM roles and security settings, to integrate new application components with their existing deployments, and more. -And so, today with our Public Beta, we are addressing this request. With today’s release of [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) (Bring-your-own-Cloud), you can now enjoy all the benefits of Defang **and** deploy applications to your own AWS account! Our Private Beta experience is still available as [Defang Playground](https://docs.defang.io/docs/concepts/defang-playground) for you to quickly and easily prototype applications and deploy them to our hosted environment. +And so, today with our Public Beta, we are addressing this request. With today’s release of [Defang BYOC](/docs/concepts/defang-byoc) (Bring-your-own-Cloud), you can now enjoy all the benefits of Defang **and** deploy applications to your own AWS account! Our Private Beta experience is still available as [Defang Playground](/docs/concepts/defang-playground) for you to quickly and easily prototype applications and deploy them to our hosted environment. -You can learn more about Defang [here](https://docs.defang.io/docs/intro). Also check out our [tutorials](https://docs.defang.io/docs/category/tutorials), [samples](https://defang.io/samples), and [FAQ](https://docs.defang.io/docs/category/faq) to know more. +You can learn more about Defang [here](/docs/intro). Also check out our [tutorials](/docs/category/tutorials), [samples](https://defang.io/samples), and [FAQ](/docs/category/faq) to know more. **Try the Public Beta!** -To try the Public Beta, please go to [defang.io](http://defang.io) and click on [Download](https://github.com/DefangLabs/defang/releases/latest) to download the CLI and [get started](https://docs.defang.io/docs/getting-started). We would love to have you kick the tires and give us your feedback! Once you sign up you’ll receive an invitation to our Slack support channel in email. You are also welcome to file [GitHub issues here](https://github.com/DefangLabs/defang/issues). +To try the Public Beta, please go to [defang.io](http://defang.io) and click on [Download](https://github.com/DefangLabs/defang/releases/latest) to download the CLI and [get started](/docs/getting-started). We would love to have you kick the tires and give us your feedback! Once you sign up you’ll receive an invitation to our Slack support channel in email. You are also welcome to file [GitHub issues here](https://github.com/DefangLabs/defang/issues). **Stay Tuned for More** diff --git a/blog/2024-03-04-about-my-journey-deploying-my-first-web-application.mdx b/blog/2024-03-04-about-my-journey-deploying-my-first-web-application.mdx index af0c0fdb6..8f08a876e 100644 --- a/blog/2024-03-04-about-my-journey-deploying-my-first-web-application.mdx +++ b/blog/2024-03-04-about-my-journey-deploying-my-first-web-application.mdx @@ -62,4 +62,4 @@ Try it yourself! Sample Code: [Restaurant Homepage](https://github.com/HongchenY/Sample-Restaurant-Homepage) -Defang Docs: [Docs](https://docs.defang.io/docs/intro) +Defang Docs: [Docs](/docs/intro) diff --git a/blog/2024-03-20-dev-environments.mdx b/blog/2024-03-20-dev-environments.mdx index 653f1e4c8..7bd3cc767 100644 --- a/blog/2024-03-20-dev-environments.mdx +++ b/blog/2024-03-20-dev-environments.mdx @@ -3,7 +3,7 @@ title: Add Defang to your developer environments instantly tags: [Cloud, NoDevOps, BYOC, AWS ECS, defang compose up, developer environments, Cloud IDEs, CDE] --- -Defang is aiming to reduce the barriers to entry to cloud application development. With our tooling, we make it really easy to deploy multi-service containerized applications [to your own cloud](https://docs.defang.io/docs/concepts/defang-byoc) with a single command. +Defang is aiming to reduce the barriers to entry to cloud application development. With our tooling, we make it really easy to deploy multi-service containerized applications [to your own cloud](/docs/concepts/defang-byoc) with a single command. We want it to be easy for you to try Defang with as little friction as possible, though, so we have done the work so you can easily get started in a GitHub Codespaces environment, a GitPod Workspace, or even a local Dev Container. @@ -22,4 +22,4 @@ If you want to get started with Codespaces, you can just fork [this repo](https: ## Gitpod -Gitpod is another Cloud IDE, a bit like GitHub Codespaces. If prefer Gitpod, you can try Defang in a Gitpod environment by using [this repo](https://github.com/DefangLabs/gitpod-workspace/tree/main). \ No newline at end of file +Gitpod is another Cloud IDE, a bit like GitHub Codespaces. If prefer Gitpod, you can try Defang in a Gitpod environment by using [this repo](https://github.com/DefangLabs/gitpod-workspace/tree/main). diff --git a/blog/2024-03-28-slackbot-sample.md b/blog/2024-03-28-slackbot-sample.md index 91d86bd51..2918ac55c 100644 --- a/blog/2024-03-28-slackbot-sample.md +++ b/blog/2024-03-28-slackbot-sample.md @@ -10,7 +10,7 @@ Hey folks! Today, I'm going to share one of our code samples that will show you Before we dive into the details, let's make sure you have everything you need to get started: -1. **Install Defang CLI:** Simplify your deployment process by installing the Defang CLI tool. Follow the instructions [here](https://docs.defang.io/docs/getting-started#install-the-defang-cli) to get it up and running quickly. +1. **Install Defang CLI:** Simplify your deployment process by installing the Defang CLI tool. Follow the instructions [here](/docs/getting-started#install-the-defang-cli) to get it up and running quickly. 2. **Slack API Token:** Create a Slack App at https://api.slack.com/apps, granting it the necessary permissions, including the bot `chat:write` scope. ![screenshot of the slack admin UI showing the bot scopes](/img/slackbot-sample/scopes.png) diff --git a/blog/2024-07-31-july-product-updates-2.md b/blog/2024-07-31-july-product-updates-2.md index f74f31a8f..ff5525da5 100644 --- a/blog/2024-07-31-july-product-updates-2.md +++ b/blog/2024-07-31-july-product-updates-2.md @@ -8,7 +8,7 @@ author: Defang Team Hey folks! We can’t believe a month has gone by already, time flies when you’re having fun! We continued to make progress on our vision of providing a radically simpler way to Develop, Deploy, and Debug cloud applications. In July, we spent time on a couple of key areas: -1. As our user-base grows, we wanted to make sure we’re able to scale our [Playground](https://docs.defang.io/docs/concepts/defang-playground) environment to be able to handle the load. This involved being able to shard the workload across multiple ALBs and being able to dynamically move some workloads across shards where possible. With these changes, we are now able handle a large number of concurrent users comfortably. The only noticeable change in behavior you would see is that Defang will now ask you to “`compose down`” your previous project before you are able to deploy a new project on Playground. +1. As our user-base grows, we wanted to make sure we’re able to scale our [Playground](/docs/concepts/defang-playground) environment to be able to handle the load. This involved being able to shard the workload across multiple ALBs and being able to dynamically move some workloads across shards where possible. With these changes, we are now able handle a large number of concurrent users comfortably. The only noticeable change in behavior you would see is that Defang will now ask you to “`compose down`” your previous project before you are able to deploy a new project on Playground. 2. The major news this month was the introduction of our “`debug`” functionality. The motivation for this feature was that while the Defang experience is amazing when everything goes smoothly, we saw users (including our own interns who are helping write all those [samples](https://defang.io/samples)) struggle when they hit an error. The underlying reason for the error could come from a variety of sources: an error in the developer’s application (including in their Dockerfile or Compose file), an issue in the way Defang is processing the application, or an issue in the underlying cloud platform (currently, AWS). To the developer, it is often not obvious what the issue is or how to fix it. That got us thinking how we could make this debugging experience “radically simpler” and thus the idea for `defang debug` was born. diff --git a/blog/2024-09-30-september-product-updates.md b/blog/2024-09-30-september-product-updates.md index 10d64bf8d..171cfecf9 100644 --- a/blog/2024-09-30-september-product-updates.md +++ b/blog/2024-09-30-september-product-updates.md @@ -21,12 +21,12 @@ import { Button } from '@mui/material'; Hi everyone - you can feel the weather getting cooler, but things are heating up at Defang! Sep was another amazing month, with new features, new users, and new partners. Here is a quick summary: -1. **Bring-Your-Own-Cloud (BYOC) DigitalOcean in Preview!** From the very beginning, it has been part of Defang’s vision to not only provide a simpler way to develop, deploy, and debug your cloud applications, but to be able to do so in a portable way. As developers, we all value the flexibility of knowing our application can be deployed to our chosen cloud, even if that choice changes over time. Today, we take a big step in providing that choice with the Preview of BYOC with DigitalOcean! This literally means the same application can be deployed to the Defang Playground, AWS, or DigitalOcean with no changes! Take a look at the [docs](https://docs.defang.io/docs/providers/digitalocean), give it a try and share your feedback on our [Discord](http://s.defang.io/discord). -2. **Managed Postgres**: Postgres is one of the fundamental building blocks of many applications, and users wanted us to provide a way to add that to their application in a declarative way. So that’s exactly what we have done. You can now specify the Postgres image in your `compose.yaml` file and indicate that you want it managed by your cloud provider using `x-defang-postgres: true` in your service definition. Defang will automatically provision the appropriate managed Postgres in the target cloud (e.g. RDS on AWS) and do all the heavy lifting to configure and hook things up correctly. Check out the docs [here](https://docs.defang.io/docs/concepts/managed-storage/managed-postgres), give it a try and let us know what you think. +1. **Bring-Your-Own-Cloud (BYOC) DigitalOcean in Preview!** From the very beginning, it has been part of Defang’s vision to not only provide a simpler way to develop, deploy, and debug your cloud applications, but to be able to do so in a portable way. As developers, we all value the flexibility of knowing our application can be deployed to our chosen cloud, even if that choice changes over time. Today, we take a big step in providing that choice with the Preview of BYOC with DigitalOcean! This literally means the same application can be deployed to the Defang Playground, AWS, or DigitalOcean with no changes! Take a look at the [docs](/docs/providers/digitalocean), give it a try and share your feedback on our [Discord](http://s.defang.io/discord). +2. **Managed Postgres**: Postgres is one of the fundamental building blocks of many applications, and users wanted us to provide a way to add that to their application in a declarative way. So that’s exactly what we have done. You can now specify the Postgres image in your `compose.yaml` file and indicate that you want it managed by your cloud provider using `x-defang-postgres: true` in your service definition. Defang will automatically provision the appropriate managed Postgres in the target cloud (e.g. RDS on AWS) and do all the heavy lifting to configure and hook things up correctly. Check out the docs [here](/docs/concepts/managed-storage/managed-postgres), give it a try and let us know what you think. 3. We continue to improve the **quality and performance** of existing features: - 1. We’ve made several improvements to our AI-assistant to increase the robustness of our Develop and Debug modules. For example, we updated generation to comply with latest Compose spec. We also addressed the top issues we saw people facing when deploying, such as out-of-memory errors when building containers. + 1. We’ve made several improvements to our AI-assistant to increase the robustness of our Develop and Debug modules. For example, we updated generation to comply with latest Compose spec. We also addressed the top issues we saw people facing when deploying, such as out-of-memory errors when building containers. 2. To cope with our growing user-base, we have made several scaling improvements to our Playground and Portal environments. - 3. We also made several updates to our documentation and samples to keep up with the changes and enhancements in the Defang product. + 3. We also made several updates to our documentation and samples to keep up with the changes and enhancements in the Defang product. --- diff --git a/blog/2024-11-13-october-product-updates.md b/blog/2024-11-13-october-product-updates.md index 1eed0db15..cc4c737f9 100644 --- a/blog/2024-11-13-october-product-updates.md +++ b/blog/2024-11-13-october-product-updates.md @@ -19,11 +19,11 @@ import { Button } from '@mui/material'; ![Defang Compose Update](/img/defang-compose-update.webp) -Hi everyone, +Hi everyone, We are a little late getting our monthly update out this time, but we did ship a number of important updates in October that we would like to inform you about. And more is coming… stay tuned for that! -1. **New CLI version 0.6.5**: this was a big release with a number of improvements and bug fixes. You can find details in the release notes [here](https://github.com/DefangLabs/defang/releases/tag/v0.6.5), but to highlight a few: +1. **New CLI version 0.6.5**: this was a big release with a number of improvements and bug fixes. You can find details in the release notes [here](https://github.com/DefangLabs/defang/releases/tag/v0.6.5), but to highlight a few: - `defang --provider aws` shows improved error message if unauthenticated - Added `--wait` and `--wait-timeout` flags - Improved `generate` menu: all samples shown (previously these were restricted by language), and we moved the "Generate with AI" option to now be shown in the search filter. @@ -33,10 +33,10 @@ We are a little late getting our monthly update out this time, but we did ship a 3. A range of other **improvements**, including - Network `aliases` support - GDPR Delete Me: You can now delete your Defang account from the Defang Portal - - 30min time-out for the [deployments](https://docs.defang.io/docs/concepts/deployments) to avoid runaway tasks in your account + - 30min time-out for the [deployments](/docs/concepts/deployments) to avoid runaway tasks in your account - Allow Postgres major version upgrade, e.g. changing the image from`postgres:14` to `postgres:16` in your Compose file (Currently, we only support this in `--mode development`, we will explore ways to support in other modes in the future.) - More feedback logs when containers exit, e.g. failing health-checks - - Fixes for multiple BYOD [domains](https://docs.defang.io/docs/concepts/domains) in a single account + - Fixes for multiple BYOD [domains](/docs/concepts/domains) in a single account ## Events and Adoption diff --git a/blog/2024-12-04-launch-week.md b/blog/2024-12-04-launch-week.md index 298b9da46..1e99bd496 100644 --- a/blog/2024-12-04-launch-week.md +++ b/blog/2024-12-04-launch-week.md @@ -16,7 +16,7 @@ tags: Defang Compose Update, ] author: Defang Team -image: https://docs.defang.io/img/november-update/launch-week.png +image: /img/november-update/launch-week.png --- import { Button } from '@mui/material'; @@ -32,15 +32,15 @@ At **Defang**, we’re enabling developers go from **idea to code to deployment - **Production-Ready Support for AWS** -Seamlessly deploy and scale with confidence on [AWS](https://docs.defang.io/docs/providers/aws). Defang is now [WAFR](https://aws.amazon.com/premiumsupport/business-support-well-architected/)-compliant, assuring that your deployments conform to all the best-practices for AWS deployments. Defang is now officially part of the [AWS Partner Network](https://aws.amazon.com/partners/). +Seamlessly deploy and scale with confidence on [AWS](/docs/providers/aws). Defang is now [WAFR](https://aws.amazon.com/premiumsupport/business-support-well-architected/)-compliant, assuring that your deployments conform to all the best-practices for AWS deployments. Defang is now officially part of the [AWS Partner Network](https://aws.amazon.com/partners/). -- **New - Google Cloud Platform ([GCP](https://docs.defang.io/docs/providers/gcp)) in Preview** +- **New - Google Cloud Platform ([GCP](/docs/providers/gcp)) in Preview** This week, we are excited to unveil support for deployments to GCP, in Preview. Start building and exploring and give us feedback as we work to enhance the experience further and move towards production support. Defang is also now officially part of the [Google Cloud Partner Advantage](https://cloud.google.com/partners?hl=en) program. - **Support for DigitalOcean in Preview** -Developers using [DigitalOcean](https://docs.defang.io/docs/providers/digitalocean) can explore our Preview features, with further enhancements and production support coming soon. +Developers using [DigitalOcean](/docs/providers/digitalocean) can explore our Preview features, with further enhancements and production support coming soon. **Defang Product Tiers and Introductory Pricing 🛠️** @@ -52,7 +52,7 @@ We’ve lined up an exciting week of activities to showcase the power of **Defan - **December 4: Vancouver CDW x AWS re:Invent Watch Party** -Join us at the Vancouver [CDW x AWS re:Invent Watch Party](https://lu.ma/1r0zsw76), where we will have a booth showcasing Defang’s capabilities and AWS integration. Stop by to learn more about Defang and see a live demo from the Defang dev team. +Join us at the Vancouver [CDW x AWS re:Invent Watch Party](https://lu.ma/1r0zsw76), where we will have a booth showcasing Defang’s capabilities and AWS integration. Stop by to learn more about Defang and see a live demo from the Defang dev team. - **December 5–6: GFSA DemoDay and Git Push to 2025: Devs Social Party** diff --git a/blog/2024-12-11-product-hunt.md b/blog/2024-12-11-product-hunt.md index 66bdf634e..aaccee1a5 100644 --- a/blog/2024-12-11-product-hunt.md +++ b/blog/2024-12-11-product-hunt.md @@ -10,7 +10,7 @@ tags: Product Hunt, ] author: Defang Team -image: https://docs.defang.io/img/product-hunt/product-hunt.png +image: /img/product-hunt/product-hunt.png --- import { Button } from '@mui/material'; diff --git a/blog/2025-02-07-january-product-updates.md b/blog/2025-02-07-january-product-updates.md index 516f33256..619648893 100644 --- a/blog/2025-02-07-january-product-updates.md +++ b/blog/2025-02-07-january-product-updates.md @@ -19,14 +19,14 @@ author: Defang Team ![Defang Compose Update](/img/defang-compose-update.webp) -Welcome to 2025! As we had shared in our early [Dec update](https://docs.defang.io/blog/2024-12-04-launch-week), we reached our V1 milestone with support for GCP and DigitalOcean in Preview and production support for AWS. We were very gratified to see the excitement around our launch, with Defang ending 2024 with twice the number of users as our original goal! +Welcome to 2025! As we had shared in our early [Dec update](/blog/2024-12-04-launch-week), we reached our V1 milestone with support for GCP and DigitalOcean in Preview and production support for AWS. We were very gratified to see the excitement around our launch, with Defang ending 2024 with twice the number of users as our original goal! We are excited to build on that momentum going into 2025. And we are off to a great start in Jan, with some key advancements: -1. **GCP parity with AWS:** We are really excited to announce that our GCP provider is now feature-complete, with support for key features such as [Managed Postgres](https://docs.defang.io/docs/concepts/managed-storage/managed-postgres), [Managed Redis](https://docs.defang.io/docs/concepts/managed-storage/managed-redis), [BYOD](https://docs.defang.io/docs/concepts/domains#bring-your-own-domain) (Bring-Your-Own-Domain), [GPUs](https://docs.defang.io/docs/tutorials/deploy-with-gpu), AI-assisted [Debugging](https://docs.defang.io/docs/concepts/debug), and more. Install the [latest version of our CLI](https://defang.io/#install) and give it a try! Please let us know your feedback. +1. **GCP parity with AWS:** We are really excited to announce that our GCP provider is now feature-complete, with support for key features such as [Managed Postgres](/docs/concepts/managed-storage/managed-postgres), [Managed Redis](/docs/concepts/managed-storage/managed-redis), [BYOD](/docs/concepts/domains#bring-your-own-domain) (Bring-Your-Own-Domain), [GPUs](/docs/tutorials/deploy-with-gpu), AI-assisted [Debugging](/docs/concepts/debug), and more. Install the [latest version of our CLI](https://defang.io/#install) and give it a try! Please let us know your feedback. 2. **Defang Deployed with Defang:** In 2025, we are doubling our focus on production use-cases where developers are using Defang every day to deploy their production apps. And where better to start than with Defang itself? We had already been using Defang to deploy portions of our infrastructure (such as our web site), but we are super happy to report that now we are using Defang to deploy **all** our services - including our Portal, Playground, the Defang back-end (aka Fabric) and more. We’ll be sharing more about how we did this, and publishing some of the related artifacts, in a blog post soon - stay tuned. 3. **Campus Advocate Program:** One of our key goals for 2025 is to bring Defang to more students and hobbyists. To do this, we are very excited to launch our [Campus Advocate Program](https://defang.io/cap/), a community of student leaders passionate about cloud technology. Our advocates will build communities, host events, and help peers adopt cloud development with Defang. If you’re a student eager to drive cloud innovation on your campus, we’d love to hear from you - you can [apply here](https://s.defang.io/cap?_gl=1*1rx948d*_ga*ODk3NDgzNjU4LjE3MTgxNDc2MjQ.*_ga_QVJVWN44CW*MTczODM2NjYyOC4xMDMuMS4xNzM4MzY4MjI2LjAuMC4w). -4. **1-click Deploy instructions:** One of our most popular features is the ability to deploy any of our 50+ samples with [a single click](https://docs.defang.io/docs/tutorials/using-one-click-deploy). We have now published [instructions](https://docs.defang.io/docs/tutorials/adding-custom-one-click-deploy) showing how you can provide a similar experience for your project or sample. We are curious to see what you deploy with this! +4. **1-click Deploy instructions:** One of our most popular features is the ability to deploy any of our 50+ samples with [a single click](/docs/tutorials/using-one-click-deploy). We have now published [instructions](/docs/tutorials/adding-custom-one-click-deploy) showing how you can provide a similar experience for your project or sample. We are curious to see what you deploy with this! 5. **Model Context Protocol** sample: AI agents are of course the rage nowadays. Recently, Docker published a [blog](https://www.docker.com/blog/the-model-context-protocol-simplifying-building-ai-apps-with-anthropic-claude-desktop-and-docker/) showing how you can use Docker to containerize “servers” following Anthropic’s [Model Context Protocol](https://modelcontextprotocol.io/introduction). We have now published a sample that shows you how to easily deploy such containerized servers to the cloud using Defang - [check it out here](https://github.com/DefangLabs/samples/tree/main/samples/mcp). So, you can see we have been busy! But that is not all - we have a lot more in the pipeline in the coming months. Stay tuned - it’s going to be an exciting 2025! diff --git a/blog/2025-02-18-model-context-protocol.md b/blog/2025-02-18-model-context-protocol.md index 97f19cc98..043e0ea00 100644 --- a/blog/2025-02-18-model-context-protocol.md +++ b/blog/2025-02-18-model-context-protocol.md @@ -1,5 +1,5 @@ --- -title: Simplifying Deployment of AI Apps to the Cloud using Docker and Model Context Protocol +title: Simplifying Deployment of AI Apps to the Cloud using Docker and Model Context Protocol tags: [ Cloud, @@ -69,14 +69,14 @@ The MCP Client connects to the [Anthropic API](https://docs.anthropic.com/en/api **Service 1: Web Server - [Dockerfile](https://github.com/DefangLabs/samples/blob/main/samples/mcp/service-1/Dockerfile)** -The base image for Service 1 is the `node:bookworm-slim` image. We construct the image by copying the server code and setting an entry point command to start the web server. +The base image for Service 1 is the `node:bookworm-slim` image. We construct the image by copying the server code and setting an entry point command to start the web server. **Service 2: MCP Service Configuration - [Dockerfile](https://github.com/DefangLabs/samples/blob/main/samples/mcp/service-2/Dockerfile)** The base image for Service 2 is the Docker `mcp/time` image. Since both the MCP Client and Server run in a virtual environment, we activate a `venv` command in the Dockerfile for Service 2 and create a `run.sh` shell script that runs the file containing the MCP Client and Server connection code. We then add the shell script as an entry point command for the container. ### Compose File -To define Services 1 and 2 as Docker containers, we’ve written a `compose.yaml` file in the root directory, as shown below. +To define Services 1 and 2 as Docker containers, we’ve written a `compose.yaml` file in the root directory, as shown below. ```yaml services: @@ -117,7 +117,7 @@ Now that we’ve defined our application in Docker containers using a `compose.y docker compose up --build ``` -Once the application is started up, it can be easily tested in a local environment. However, to make it easily accessible to others online, we should deploy it to the cloud. Fortunately, deploying the application is a straightforward process using Defang, particularly since the application is [Compose-compatible](https://docs.defang.io/docs/concepts/compose). +Once the application is started up, it can be easily tested in a local environment. However, to make it easily accessible to others online, we should deploy it to the cloud. Fortunately, deploying the application is a straightforward process using Defang, particularly since the application is [Compose-compatible](/docs/concepts/compose). ### Deploying to the Cloud @@ -125,12 +125,12 @@ Let’s go over the structure of the application after cloud deployment. ![mcp_after](/img/mcp/mcp_after.png) -Here we can see what changes if we deploy to the cloud: +Here we can see what changes if we deploy to the cloud: -1. Service 1 and Service 2 are now deployed to the cloud, not on the local machine anymore. -2. The only part on the local machine is the browser. +1. Service 1 and Service 2 are now deployed to the cloud, not on the local machine anymore. +2. The only part on the local machine is the browser. -Using the same `compose.yaml` file as shown earlier, we can deploy the containers to the cloud with the [Defang CLI](https://docs.defang.io/docs/getting-started). Once we’ve authenticated and logged in, we can [choose a cloud provider (i.e. AWS, GCP, or DigitalOcean)](https://docs.defang.io/docs/tutorials/deploy-to-your-cloud) and use our own cloud account for deployment. Then, we can set a configuration variable for the Anthropic API key: +Using the same `compose.yaml` file as shown earlier, we can deploy the containers to the cloud with the [Defang CLI](/docs/getting-started). Once we’ve authenticated and logged in, we can [choose a cloud provider (i.e. AWS, GCP, or DigitalOcean)](/docs/tutorials/deploy-to-your-cloud) and use our own cloud account for deployment. Then, we can set a configuration variable for the Anthropic API key: ```bash defang config set ANTHROPIC_API= @@ -148,6 +148,6 @@ For our case, anyone can use the chatbot to ask for the exact time or convert ti ![mcp_time_chatbot](/img/mcp/mcp_time_chatbot.png) -Most importantly, this chatbot application can be adapted to use any of the other Docker reference [MCP Server images](https://hub.docker.com/u/mcp), not just the `mcp/time` server. +Most importantly, this chatbot application can be adapted to use any of the other Docker reference [MCP Server images](https://hub.docker.com/u/mcp), not just the `mcp/time` server. Have fun building and deploying MCP-based containerized applications to the cloud with Defang! diff --git a/blog/2025-03-14-deploying-defang-with-defang-part-1.md b/blog/2025-03-14-deploying-defang-with-defang-part-1.md index 3e2a27b67..ef24a1bdd 100644 --- a/blog/2025-03-14-deploying-defang-with-defang-part-1.md +++ b/blog/2025-03-14-deploying-defang-with-defang-part-1.md @@ -55,17 +55,17 @@ This wasn’t just about reducing complexity—it was also a validation exercise ### **Config & Secrets Management** -- **Sensitive configuration values** (database credentials, API keys) are stored **securely in AWS SSM** using Defang’s [configuration management tooling](https://docs.defang.io/docs/concepts/configuration). -- [**Environment variable interpolation**](https://docs.defang.io/docs/concepts/configuration#interpolation) allows these **SSM-stored config values** to be referenced directly in the Compose file, ensuring the same configuration works in local and cloud environments. +- **Sensitive configuration values** (database credentials, API keys) are stored **securely in AWS SSM** using Defang’s [configuration management tooling](/docs/concepts/configuration). +- [**Environment variable interpolation**](/docs/concepts/configuration#interpolation) allows these **SSM-stored config values** to be referenced directly in the Compose file, ensuring the same configuration works in local and cloud environments. - **Defang provisions managed Postgres and Redis instances automatically** when using the `x-defang-postgres` and `x-defang-redis` extensions, securely injecting credentials where needed with variable interpolation. ### Deployment Modes -- [**Deployment modes**](https://docs.defang.io/docs/concepts/deployment-modes) (`development`, `staging`, `production`) adjust infrastructure settings across our dev/staging/prod deployments making sure dev is low cost, and production is secure and resilient. +- [**Deployment modes**](/docs/concepts/deployment-modes) (`affordable`, `balanced`, `high_availability`) adjust infrastructure settings across our dev/staging/prod deployments making sure dev is low cost, and production is secure and resilient. ### **DNS & Certs** -- When we first set up the portal (before we even released the private beta) DNS and certs had to be managed outside the Defang context. Now, **[we can provision certs using ACM or Let’s Encrypt](https://docs.defang.io/docs/concepts/domains)**. +- When we first set up the portal (before we even released the private beta) DNS and certs had to be managed outside the Defang context. Now, **[we can provision certs using ACM or Let’s Encrypt](/docs/concepts/domains)**. ### **CI/CD Integration** @@ -82,6 +82,6 @@ By transitioning to **fully Compose-based deployments**, we: * ✅ **Eliminated hundreds of lines of Infra-as-Code** * ✅ **Simplified configuration management** with secure, environment-aware secrets handling * ✅ **Streamlined CI/CD** with a lightweight GitHub Actions workflow -* ✅ **Simplified DNS and cert management** +* ✅ **Simplified DNS and cert management** -Every sample project we built, every conversation we had with developers, and every challenge we encountered with the Portal helped us get to this point where we could focus on closing the gaps last few gaps to deploying everything from a Compose file. \ No newline at end of file +Every sample project we built, every conversation we had with developers, and every challenge we encountered with the Portal helped us get to this point where we could focus on closing the gaps last few gaps to deploying everything from a Compose file. diff --git a/blog/2025-03-15-feb-product-updates.md b/blog/2025-03-15-feb-product-updates.md index 85922c76d..44a6b8850 100644 --- a/blog/2025-03-15-feb-product-updates.md +++ b/blog/2025-03-15-feb-product-updates.md @@ -18,11 +18,11 @@ author: Defang Team Well, that went by quick! Seems like it was just a couple of weeks ago that we published the Jan update, and it’s already time for the next one. Still, we do have some exciting progress to report in this short month! 1. **Pulumi Provider:** We are excited to announce a Preview of the [Defang Pulumi Provider](https://github.com/DefangLabs/pulumi-defang/). With the Defang Pulumi Provider, you can leverage all the power of Defang with all of the extensibility of Pulumi. Defang will provision infrastructure to deploy your application straight from your Compose file, while allowing you to connect that deployment with other resources you deploy to your cloud account. The new provider makes it easy to leverage Defang if you’re already using Pulumi, and it also provides an upgrade-path for users who need more configurability than the Compose specification can provide. -2. **Portal Update:** We are now fully deploying our portal with Defang alone using the `defang compose up` command. Our original portal architecture was designed before we supported managed storage so we used to use Pulumi to provision and connect external storage. But since we added support in Compose to specify managed storage, we can fully describe our Portal using Compose alone. This has allowed us to rip out hundreds of lines of code and heavily simplify our deployments. To learn more about how we do this, check out our Defang-Deployed-with-Defang (Part 1) [blog](https://docs.defang.io/blog/deploying-defang-with-defang-part-1). -3. **Open-Auth Contribution:** In the past couple months we have been communicating with the OpenAuth maintainers and contributors via PRs ([#120](https://github.com/toolbeam/openauth/pull/120), [#156](https://github.com/toolbeam/openauth/pull/156)) and Issues ([#127](https://github.com/toolbeam/openauth/issues/127)) to enable features like local testing with DynamoDB, enabling support for scopes, improving standards alignment, supporting Redis, and more. We are rebuilding our authentication systems around OpenAuth and are excited about the future of the project. +2. **Portal Update:** We are now fully deploying our portal with Defang alone using the `defang compose up` command. Our original portal architecture was designed before we supported managed storage so we used to use Pulumi to provision and connect external storage. But since we added support in Compose to specify managed storage, we can fully describe our Portal using Compose alone. This has allowed us to rip out hundreds of lines of code and heavily simplify our deployments. To learn more about how we do this, check out our Defang-Deployed-with-Defang (Part 1) [blog](/blog/deploying-defang-with-defang-part-1). +3. **Open-Auth Contribution:** In the past couple months we have been communicating with the OpenAuth maintainers and contributors via PRs ([#120](https://github.com/toolbeam/openauth/pull/120), [#156](https://github.com/toolbeam/openauth/pull/156)) and Issues ([#127](https://github.com/toolbeam/openauth/issues/127)) to enable features like local testing with DynamoDB, enabling support for scopes, improving standards alignment, supporting Redis, and more. We are rebuilding our authentication systems around OpenAuth and are excited about the future of the project. **Events and Social Media** February was an exciting month for the Defang team as we continued to engage with the developer community and showcase what’s possible with Defang. We sponsored and demo’ed at the [DevTools Vancouver meetup](https://lu.ma/devtools3), as well as sponsored the [Vancouver.dev IRL: Building AI Startups](https://lu.ma/vandevirl2) event. Also, at the AWS Startup Innovation Showcase in Vancouver, our CTO [Lio](https://www.linkedin.com/in/lionello/) [demonstrated](https://www.linkedin.com/feed/update/urn:li:activity:7299861024780808193) how Defang makes it effortless to deploy secure, scalable, and cost-efficient serverless apps on AWS! And finally, we had a great response to our [LinkedIn post](https://www.linkedin.com/posts/defanglabs_mcp-docker-anthropic-activity-7298043665883508736-i4dd?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAAQqiEBLsVLYYAzEmBFB9oIl31nQ7kDII0) on the Model Context Protocol, catching the attention of many observers, including some of our key partners. -We are eager to see what you deploy with Defang. Join our [Discord](http://s.defang.io/discord) to ask any questions, see what others are building, and share your own experience with Defang. And stay tuned for more to come in March! \ No newline at end of file +We are eager to see what you deploy with Defang. Join our [Discord](http://s.defang.io/discord) to ask any questions, see what others are building, and share your own experience with Defang. And stay tuned for more to come in March! diff --git a/blog/2025-03-26-deploying-defang-with-defang-part-2.md b/blog/2025-03-26-deploying-defang-with-defang-part-2.md index b087ea2f6..37f7de5ba 100644 --- a/blog/2025-03-26-deploying-defang-with-defang-part-2.md +++ b/blog/2025-03-26-deploying-defang-with-defang-part-2.md @@ -32,7 +32,7 @@ We already deploy our other services with Defang using Compose files. In fact, t Some things we had to change: -**Adding [ports](https://docs.defang.io/docs/concepts/compose#ports) to the Compose file**: +**Adding [ports](/docs/concepts/compose#ports) to the Compose file**: ```yaml ports: - mode: ingress @@ -40,7 +40,7 @@ Some things we had to change: published: 3000 ``` -**Adding [domain](https://docs.defang.io/docs/concepts/domains) info the Composer file**: +**Adding [domain](/docs/concepts/domains) info the Composer file**: ```yaml domainname: defang.io networks: diff --git a/blog/2025-04-10-easiest-way-to-deploy-django.md b/blog/2025-04-10-easiest-way-to-deploy-django.md index fc5cb5c86..c7d113182 100644 --- a/blog/2025-04-10-easiest-way-to-deploy-django.md +++ b/blog/2025-04-10-easiest-way-to-deploy-django.md @@ -39,7 +39,7 @@ You can quickly spin up the application locally with: docker compose --env-file .env.dev -f compose.dev.yaml up --build ``` -This runs things with autoreloading so you can iterate on the Django app, all while passing environment variables in the same way as we will with Defang's [secure configuration system](https://docs.defang.io/docs/concepts/configuration) and being ready to deploy to production. +This runs things with autoreloading so you can iterate on the Django app, all while passing environment variables in the same way as we will with Defang's [secure configuration system](/docs/concepts/configuration) and being ready to deploy to production. ## Application Features @@ -52,7 +52,7 @@ The worker service runs independently, handling moderation tasks asynchronously. - Perform sentiment analysis. - Automatically flag negative or inappropriate messages. -This decouples resource-intensive tasks from the main API server, ensuring optimal application responsiveness. The demo isn't doing anything very complicated, but you could easily run machine learning models [with access to GPUs](https://docs.defang.io/docs/tutorials/deploy-with-gpu) with Defang if you needed to. +This decouples resource-intensive tasks from the main API server, ensuring optimal application responsiveness. The demo isn't doing anything very complicated, but you could easily run machine learning models [with access to GPUs](/docs/tutorials/deploy-with-gpu) with Defang if you needed to. ### Django Admin @@ -91,7 +91,7 @@ Once deployed, your app is accessible via a public URL provided by Defang, which ### Deploying to Your Own Cloud -To deploy directly into your AWS account (or other [supported providers](https://docs.defang.io/docs/category/providers)): +To deploy directly into your AWS account (or other [supported providers](/docs/category/providers)): 1. Set your cloud provider: > In my case, I use an AWS Profile, but you should be able to use [any methods supported by the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) diff --git a/blog/2025-04-11-mar-product-updates.md b/blog/2025-04-11-mar-product-updates.md index 6bc3828ef..038ca87bd 100644 --- a/blog/2025-04-11-mar-product-updates.md +++ b/blog/2025-04-11-mar-product-updates.md @@ -25,13 +25,13 @@ Wow - another month has gone by, time flies when you're having fun! Let us share some important updates regarding what we achieved at Defang in March: -**Managed LLMs:** One of the coolest features we have released in a bit is [support for Managed LLMs (such as AWS Bedrock) through the `x-defang-llm` compose service extension](https://docs.defang.io/docs/concepts/managed-llms/managed-language-models). When coupled with the `defang/openai-access-gateway` service image, Defang offers the easiest way to [migrate your OpenAI-compatible application to cloud-native managed LLMs](https://docs.defang.io/docs/tutorials/deploy-openai-apps) without making any changes to your code. Support for GCP and DigitalOcean coming soon. +**Managed LLMs:** One of the coolest features we have released in a bit is [support for Managed LLMs (such as AWS Bedrock) through the `x-defang-llm` compose service extension](/docs/concepts/managed-llms/managed-language-models). When coupled with the `defang/openai-access-gateway` service image, Defang offers the easiest way to [migrate your OpenAI-compatible application to cloud-native managed LLMs](/docs/tutorials/deploy-openai-apps) without making any changes to your code. Support for GCP and DigitalOcean coming soon. -**Defang Pulumi Provider:** Last month, we announced a preview of the [Defang Pulumi Provider](https://github.com/DefangLabs/pulumi-defang), and this month we are excited to announce that V1 is now available in the [Pulumi Registry](https://www.pulumi.com/registry/packages/defang/). As much as we love Docker, we realize there are many real-world apps that have components that (currently) cannot be described completely in a Compose file. With the Defang Pulumi Provider, you can now leverage [the declarative simplicity of Defang with the imperative power of Pulumi](https://docs.defang.io/docs/concepts/pulumi#when-to-use-the-defang-pulumi-provider). +**Defang Pulumi Provider:** Last month, we announced a preview of the [Defang Pulumi Provider](https://github.com/DefangLabs/pulumi-defang), and this month we are excited to announce that V1 is now available in the [Pulumi Registry](https://www.pulumi.com/registry/packages/defang/). As much as we love Docker, we realize there are many real-world apps that have components that (currently) cannot be described completely in a Compose file. With the Defang Pulumi Provider, you can now leverage [the declarative simplicity of Defang with the imperative power of Pulumi](/docs/concepts/pulumi#when-to-use-the-defang-pulumi-provider). **Production-readiness:** As we onboard more customers, we are fixing many fit-n-finish items: -1. **Autoscaling:** Production apps need the ability to easily scale up and down with load, and so we've added support for autoscaling. By adding the `x-defang-autoscaling: true` extension to your service definition in Compose.yaml file, you can benefit from automatic scale out to handle large loads and scale in when load is low. Learn more [here](https://docs.defang.io/docs/tutorials/scaling-your-services). +1. **Autoscaling:** Production apps need the ability to easily scale up and down with load, and so we've added support for autoscaling. By adding the `x-defang-autoscaling: true` extension to your service definition in Compose.yaml file, you can benefit from automatic scale out to handle large loads and scale in when load is low. Learn more [here](/docs/tutorials/scaling-your-services). 2. **New** [CLI](https://github.com/DefangLabs/defang/releases)**:** We've been busy making the CLI more powerful, secure, and intelligent. • Smarter Config Handling: The new --random flag simplifies setup by generating secure, random config values, removing the need for manual secret creation. Separately, automatic detection of sensitive data in Compose files helps prevent accidental leaks by warning you before they are deployed. Together, these features improve security and streamline your workflow. diff --git a/blog/2025-04-23-vibe-deploy.md b/blog/2025-04-23-vibe-deploy.md index 4718c0707..2a466297b 100644 --- a/blog/2025-04-23-vibe-deploy.md +++ b/blog/2025-04-23-vibe-deploy.md @@ -50,9 +50,9 @@ Defang takes your app, as specified in your docker-compose.yml, and deploys it t ![Defang Vibe Deploy](/img/vibe-deploy/defang-vibe-deploy.png) -And now with the [Defang MCP Server](https://docs.defang.io/docs/concepts/mcp), you can "vibe deploy" your project right from your favorite IDE! Once you have the Defang MCP Server installed (see instructions [here](https://docs.defang.io/docs/concepts/mcp)), just type in "deploy" (or any variation thereof) in the chat, it's that simple! It is built for hobbyists, vibe coders, fast-moving teams, and AI-powered workflows. +And now with the [Defang MCP Server](/docs/concepts/mcp), you can "vibe deploy" your project right from your favorite IDE! Once you have the Defang MCP Server installed (see instructions [here](/docs/concepts/mcp)), just type in "deploy" (or any variation thereof) in the chat, it's that simple! It is built for hobbyists, vibe coders, fast-moving teams, and AI-powered workflows. -Currently, we support deployment to the Defang [Playground](https://docs.defang.io/docs/concepts/defang-playground) only, but we'll be adding deployment to public cloud soon. +Currently, we support deployment to the Defang [Playground](/docs/concepts/defang-playground) only, but we'll be adding deployment to public cloud soon. **How it works:** diff --git a/blog/2025-05-09-april-product-updates.md b/blog/2025-05-09-april-product-updates.md index ede57f79f..9bc187d9c 100644 --- a/blog/2025-05-09-april-product-updates.md +++ b/blog/2025-05-09-april-product-updates.md @@ -23,13 +23,13 @@ April flew by with big momentum at Defang. From deeper investments in the **Mode ## MCP + Vibe Deploying -This month we focused on making cloud deployments as easy as writing a prompt. Our latest Vibe Deploying [blog](https://docs.defang.io/blog?_gl=1*1wbnk1m*_ga*MTM4MTE5ODI4NC4xNzQ0MDU0NDMz*_ga_QVJVWN44CW*czE3NDY3NDQwNDckbzQ3JGcxJHQxNzQ2NzQ0NzUzJGowJGwwJGgw) shows how you can launch full-stack apps right from your IDE just by chatting. +This month we focused on making cloud deployments as easy as writing a prompt. Our latest Vibe Deploying [blog](/blog?_gl=1*1wbnk1m*_ga*MTM4MTE5ODI4NC4xNzQ0MDU0NDMz*_ga_QVJVWN44CW*czE3NDY3NDQwNDckbzQ3JGcxJHQxNzQ2NzQ0NzUzJGowJGwwJGgw) shows how you can launch full-stack apps right from your IDE just by chatting. -Whether you're working in **Cursor**, **Windsurf**, **VS Code**, or **Claude**, Defang's **MCP** integration lets you deploy to the cloud just as easily as conversing with the AI to generate your app. For more details, check out the docs for the [Defang Model Context Protocol Server](https://docs.defang.io/docs/concepts/mcp) – it explains how it works, how to use it, and why it's a game changer for deploying to the cloud. You can also watch our tutorials for [Cursor](https://youtu.be/Aicqp9QQdwk?si=h891XNIN_f_U2-fX), [Windsurf](https://youtu.be/QU4q1eULs1I?si=nmSrXLqHtHRRlCVb), and [VS Code](https://youtu.be/k8NbeKKzqiI?si=BxDNJOw_zHnL433w). +Whether you're working in **Cursor**, **Windsurf**, **VS Code**, or **Claude**, Defang's **MCP** integration lets you deploy to the cloud just as easily as conversing with the AI to generate your app. For more details, check out the docs for the [Defang Model Context Protocol Server](/docs/concepts/mcp) – it explains how it works, how to use it, and why it's a game changer for deploying to the cloud. You can also watch our tutorials for [Cursor](https://youtu.be/Aicqp9QQdwk?si=h891XNIN_f_U2-fX), [Windsurf](https://youtu.be/QU4q1eULs1I?si=nmSrXLqHtHRRlCVb), and [VS Code](https://youtu.be/k8NbeKKzqiI?si=BxDNJOw_zHnL433w). ## Managed LLMs -Last month we shipped the [`x-defang-llm` compose service extension](https://docs.defang.io/docs/concepts/managed-llms/managed-language-models) to easily deploy inferencing apps that use managed LLM services such as AWS Bedrock. This month, we're excited to announce the same support for GCP Vertex AI – give it a try and let us know your feedback! +Last month we shipped the [`x-defang-llm` compose service extension](/docs/concepts/managed-llms/managed-language-models) to easily deploy inferencing apps that use managed LLM services such as AWS Bedrock. This month, we're excited to announce the same support for GCP Vertex AI – give it a try and let us know your feedback! ## Events and Programs diff --git a/blog/2025-06-06-may-product-updates.md b/blog/2025-06-06-may-product-updates.md index 255f39d6e..99e3398fe 100644 --- a/blog/2025-06-06-may-product-updates.md +++ b/blog/2025-06-06-may-product-updates.md @@ -37,7 +37,7 @@ Already built on the OpenAI API? No need to rewrite anything. With Defang's OpenAI Access Gateway, you can run your existing apps on Claude, DeepSeek, Mistral, and more — using the same OpenAI format. -[Learn more here.](https://docs.defang.io/docs/concepts/managed-llms/managed-language-models) +[Learn more here.](/docs/concepts/managed-llms/managed-language-models) [Try it out here.](https://github.com/DefangLabs/samples/tree/main/samples/managed-llm) diff --git a/docs/concepts/deployment-modes.md b/docs/concepts/deployment-modes.md index 87b003770..dfa2cac71 100644 --- a/docs/concepts/deployment-modes.md +++ b/docs/concepts/deployment-modes.md @@ -6,22 +6,22 @@ sidebar_position: 501 # Deployment Modes -Defang provides three deployment modes: development, staging, and production. These modes allow you to balance cost and resiliency according to your needs. +Defang provides three deployment modes: `affordable`, `balanced`, and `high_availability`. These modes allow you to balance cost and resiliency according to your needs. -* **Development**: This mode is used for development and testing purposes. It typically involves less stringent resource allocations and may include debugging tools and verbose logging to aid in development. -* **Staging**: This mode serves as a pre-production environment where applications are tested in conditions that closely mimic production. It helps in identifying issues that might not be apparent in the development environment. -* **Production**: This mode is used for live deployments. It involves optimized configurations for performance, security, and reliability. Resource allocations are typically higher, and debugging tools are minimized to ensure stability. +* **Affordable**: This mode is used for development and testing purposes. It typically involves less stringent resource allocations and may include debugging tools and verbose logging to aid in development. +* **Balanced**: This mode serves as a pre-production environment where applications are tested in conditions that closely mimic production. It helps in identifying issues that might not be apparent in the development environment. +* **High Availability**: This mode is used for live deployments. It involves optimized configurations for performance, security, and reliability. Resource allocations are typically higher, and debugging tools are minimized to ensure stability. ## Deployment Mode Comparison -| Feature | Development | Staging | Production | +| Feature | Affordable | Balanced | High Availability | |-|-|-|-| | Build Resources | Builds will be run with 2x vCPUs | Builds will be run with 2x vCPUs | Builds will be run with 4x vCPUs | -| Compute | Using spot instances | (like development) | On-demand instances | -| Databases | Defang will provision resources optimized for burstable memory | (like production) | Defang will provision resources optimized for production | -| Deployment | Previous deployments will be spun down before new deployments are spun up. | (like production) | 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). | +| Compute | Using spot instances | (like `affordable`) | On-demand instances | +| Databases | Defang will provision resources optimized for burstable memory | (like `high_availability`) | Defang will provision resources optimized for production | +| 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). | | Logging | Logs retained for 1 day to save costs. | | Logs retained for 30 days for compliance. | -| Networking | | (like production) | Defang will provision a NAT gateway. | +| Networking | | (like `high_availability`) | Defang will provision a NAT gateway. | | Load Balancing | HTTP redirect to HTTPS using `302 Found` | | Termination Protection will be enabled; logs are retained on "down" | | DNS | Defang will provision shorter TTLs; zones will be forcefully destroyed | | Defang will provision longer TTLs; records can be overwritten for ZDT | | Managed storage | Operations that cause downtime are allowed | | Encryption at rest; Final snapshot created on "down" | diff --git a/docs/concepts/deployments.md b/docs/concepts/deployments.md index bc07c59f5..1844b2683 100644 --- a/docs/concepts/deployments.md +++ b/docs/concepts/deployments.md @@ -6,7 +6,7 @@ sidebar_position: 500 # Deployment -When you deploy using Defang, whether it's with `defang compose up` with a [Compose file](./compose.md) or using a [Pulumi program](./pulumi.md), Defang will build your services in the cloud and manage the deployment process for you. If you provide a Dockerfile and build context, Defang will upload the files found within the build context to the cloud (either yours in [Defang BYOC](./defang-byoc.md) or ours in [Defang Playground](./defang-playground.md)), build the image, and store it in the cloud provider's container registry. +When you deploy using Defang, whether it's with `defang compose up` with a [Compose file](./compose.md) or using a [Pulumi program](./pulumi.md), Defang will build your services in the cloud and manage the deployment process for you. If you provide a Dockerfile and build context, Defang will upload the files found within the build context to the cloud (either yours in [Defang BYOC](./defang-byoc.md) or ours in [Defang Playground](./defang-playground.md)), build the image, and store it in the cloud provider's container registry. ## Deploying Updates @@ -14,9 +14,9 @@ When you run a deployment to update one or more [services](/docs/concepts/servic ### Zero Downtime Deployments -Defang can deploy your services using different [modes](/docs/concepts/deployment-modes). When using the `production` mode, Defang will make sure the new replacement services are healthy before deprovisioning your existing services. +Defang can deploy your services using different [modes](/docs/concepts/deployment-modes). When using the `high_availability` mode, Defang will make sure the new replacement services are healthy before deprovisioning your existing services. -By default, using the `development` mode, Defang will deprovision your existing services before provisioning replacements. This helps reduce costs. +By default, using the `affordable` mode, Defang will deprovision your existing services before provisioning replacements. This helps reduce costs. :::info In [Defang BYOC](./defang-byoc.md), Defang uses your cloud provider account to build and store your images. In [Defang Playground](./defang-playground.md), we build and store your images for you. @@ -25,14 +25,15 @@ In [Defang BYOC](./defang-byoc.md), Defang uses your cloud provider account to b ### Deployment Modes -As mentioned above, Defang offers different [deployment modes](/docs/concepts/deployment-modes): `development`, `staging`, and `production`. You can switch the modes using the `--mode` CLI flag. +As mentioned above, Defang offers different [deployment modes](/docs/concepts/deployment-modes): `affordable`, `balanced`, and `high_availability`. You can switch the modes using the `--mode` CLI flag. + :::warning Workloads with GPUs do not support zero downtime deployments. If you have a workload with a GPU, you will experience downtime during updates. ::: ## Instance Types -Defang defaults to "spot" instances. This is a cost-effective way to run your workloads, but it does mean that your workloads can be interrupted at any time. This is consistent with the [12 Factor](https://12factor.net/) principle of [disposability](https://12factor.net/disposability). +Defang defaults to "spot" instances. This is a cost-effective way to run your workloads, but it does mean that your workloads can be interrupted at any time. This is consistent with the [12 Factor](https://12factor.net/) principle of [disposability](https://12factor.net/disposability). :::info In the future, we may provide a way to use "on-demand" instances for workloads that require more stability. diff --git a/docs/concepts/estimation.md b/docs/concepts/estimation.md new file mode 100644 index 000000000..595585776 --- /dev/null +++ b/docs/concepts/estimation.md @@ -0,0 +1,66 @@ +--- +title: Cost Estimation +description: Defang enables you to estimate the cost of deploying and running your project before you even create a cloud account. +sidebar_position: 280 +--- + +# Cost Estimation + +Defang enables you to estimate the cost of deploying and running your project without needing to create an account with your cloud provider. + +:::info +Currently, AWS is the only provider supported for cost estimation. Support for GCP and Digital Ocean is coming soon. +::: + +## Generating an Estimate + +Navigate your shell to your application's working directory and run +``` +defang estimate [--provider aws] [--mode affordable|balanced|high_availability] +``` + +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). + +``` +defang estimate --provider=aws --mode=balanced + * Packaging the project files for django at /Users/defang/samples/samples/django-postgres/app + * Generating deployment preview + * Preparing estimate + +Estimate for Deployment Mode: BALANCED + +This mode strikes a balance between cost and availability. Your application +will be deployed with spot instances. Databases will be provisioned using +resources optimized for production. Services in the "internal" network will +be deployed to a private subnet with a NAT gateway for outbound internet access. + +Cost Quantity Service Description +$16.43 730 Hours (shared) AWSELB USW2-LoadBalancerUsage +$32.85 730 Hours (shared) AmazonEC2 USW2-NatGateway-Hours +$25.00 100 %Utilized/mo db AmazonRDS USW2-InstanceUsage:db.r5.large +$1.62 14600 GB-Hours django AmazonECS USW2-Fargate-EphemeralStorage-GB-Hours (20 GB * 730 hours) +$1.62 365 GB-Hours django AmazonECS USW2-Fargate-GB-Hours (0.50 GB * 730 hours) +-$1.14 365 GB-Hours django AmazonECS USW2-Fargate-GB-Hours-SpotDiscount (Estimated @ 70%) +$7.39 182.50 vCPU-Hours django AmazonECS USW2-Fargate-vCPU-Hours:perCPU (0.25 vCPU * 730 hours) +-$5.17 182.50 vCPU-Hours django AmazonECS USW2-Fargate-vCPU-Hours:perCPU-SpotDiscount (Estimated @ 70%) +Estimated Monthly Cost: $78.60 (+ usage) + +Estimate does not include taxes or Discount Programs. +To estimate other modes, use defang estimate --mode=affordable|balanced|high_availability +For help with warnings, check our FAQ at https://s.defang.io/warnings +``` + +This estimate will include a line item for the most significant monthly costs associated with the services described in your project's compose file. If you modify the [`deploy.resources.reservations`](/docs/concepts/compose#deploy) section of your compose file, to increase or decrease replicas, CPU or memory allocations, those changes will be reflected in this estimate. + +:::info +Some charges will not be included in this estimate, including charges related to usage like data transfer and storage costs. +::: + +## Deploying your project + +Now that you have estimated the costs associated with your project. You are ready to deploy to your target cloud. + +``` +defang compose up [--provider aws|gcp|digitalocean] [--mode affordable|balanced|high_availability] +``` + diff --git a/docs/concepts/managed-storage/managed-mongodb.md b/docs/concepts/managed-storage/managed-mongodb.md index 2d1ad04fc..c30d2f892 100644 --- a/docs/concepts/managed-storage/managed-mongodb.md +++ b/docs/concepts/managed-storage/managed-mongodb.md @@ -7,7 +7,7 @@ sidebar_position: 3000 # Managed MongoDB :::info -This feature was introduced in Defang v1.2.0 released on June 3, 2025. [Upgrade to the latest version](https://docs.defang.io/docs/cli/defang_upgrade) +This feature was introduced in Defang v1.2.0 released on June 3, 2025. [Upgrade to the latest version](/docs/cli/defang_upgrade) ::: 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. diff --git a/docs/tutorials/deploy-with-gpu.mdx b/docs/tutorials/deploy-with-gpu.mdx index 243812a64..d175b96ee 100644 --- a/docs/tutorials/deploy-with-gpu.mdx +++ b/docs/tutorials/deploy-with-gpu.mdx @@ -10,7 +10,7 @@ This tutorial will show you how to create and deploy a GPU-powered application o We will walk you through the whole deployment process based on the [Mistral & vLLM](https://github.com/DefangLabs/samples/tree/main/samples/vllm) sample. :::info -Note that GPU deployments are not permitted on the Defang Playground. You must [upgrade to a paid account](https://defang.io/pricing/) and [deploy to your own cloud account](https://docs.defang.io/docs/tutorials/deploy-to-your-cloud). +Note that GPU deployments are not permitted on the Defang Playground. You must [upgrade to a paid account](https://defang.io/pricing/) and [deploy to your own cloud account](/docs/tutorials/deploy-to-your-cloud). :::