From fabc10fad448d9d1ad9a5bdf90779fb9864e396c Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 10:03:15 -0800 Subject: [PATCH 01/15] small fixes --- docs/concepts/observability.md | 2 +- docs/concepts/resources.md | 2 +- docs/providers/playground.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/concepts/observability.md b/docs/concepts/observability.md index d902657f6..af3a07775 100644 --- a/docs/concepts/observability.md +++ b/docs/concepts/observability.md @@ -8,7 +8,7 @@ sidebar_position: 600 You can easily monitor and debug your Defang services at build and runtime using the Defang CLI and portal. -When you deploy a service using the `defang compose up` the CLI will automatically start tailing the build and runtime logs for your service. You can also view the logs for your service in the portal, or by using the `defang tail` command. +When you deploy a service using the `defang compose up`, the CLI will automatically start tailing the build and runtime logs for your service. You can also view the logs for your service in the portal, or by using the `defang tail` command. :::warning Keep in mind that the Defang Portal only displays services deployed to Defang Playground. diff --git a/docs/concepts/resources.md b/docs/concepts/resources.md index 60ff22c33..3bfd2a5d0 100644 --- a/docs/concepts/resources.md +++ b/docs/concepts/resources.md @@ -43,6 +43,6 @@ const service = new defang.DefangService("gpu-service", { ``` :::info GPUs -If you require access to GPUs, you can specify this in the `deploy.resources.reservations.devices[0].capabilities` section of your service as in the examples above. You can learn more about this in the [docker-compose documentation](https://docs.docker.com/compose/gpu-support/). This is the only supported value in the `deploy.resources.reservations.devices` section. +If you require access to GPUs, you can specify this in the `deploy.resources.reservations.devices[0].capabilities` section of your service as in the examples above. You can learn more about this in the [Docker-Compose documentation](https://docs.docker.com/compose/gpu-support/). This is the only supported value in the `deploy.resources.reservations.devices` section. ::: diff --git a/docs/providers/playground.md b/docs/providers/playground.md index 56b13bbfe..488cf9fe0 100644 --- a/docs/providers/playground.md +++ b/docs/providers/playground.md @@ -9,7 +9,7 @@ The Defang Playground is a free tier that allows you to experiment with Defang. This page highlights architectural considerations when deploying to the Playground and any differences you might encounter when deploying to the Playground versus deploying to your own cloud account. :::info -The Playground allows only 1 deployed project at a time. Use the CLI `defang down` to tear down a project before deploying a new one. +The Playground allows only 1 deployed project at a time. Use the CLI `defang down` command to tear down a project before deploying a new one. ::: ## Overview @@ -18,4 +18,4 @@ Overall, the Defang Playground is very similar to deploying to your own cloud ac ### Managed services -In essence, the Playground does not support any [managed storage](../concepts/managed-storage) services, ie. `x-defang-postgres` and `x-defang-redis` are ignored when deploying to the Playground. You can however run both postgres and redis as regular container services for testing purposes. +In essence, the Playground does not support any [managed storage](../concepts/managed-storage) services, ie. `x-defang-postgres` and `x-defang-redis` are ignored when deploying to the Playground. You can however run both Postgres and Redis as regular container services for testing purposes. From 2a3dab917a01b352cca9e48e5bfc43896be49670 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 10:44:31 -0800 Subject: [PATCH 02/15] enhance configuration page --- docs/concepts/configuration.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/concepts/configuration.md b/docs/concepts/configuration.md index dde61da0e..6efdd64bf 100644 --- a/docs/concepts/configuration.md +++ b/docs/concepts/configuration.md @@ -6,13 +6,9 @@ sidebar_position: 225 # Configuration -Defang allows you to configure your application using environment variables. You can set environment variables in your [`compose.yaml` file](./compose.md), or in your [Pulumi program](./pulumi.md). Using Pulumi gives you the advantage of being able to manage your environment variables across different environments using Pulumi stacks. +Defang allows you to configure your application using environment variables. You can set environment variables in your [`compose.yaml` file](./compose.md), or in your [Pulumi program](#using-config-with-pulumi). -:::tip Sample -You can find a sample of how to set environment variables with Pulumi [here](https://github.com/DefangLabs/defang/tree/main/samples/nodejs/remix-aiven-postgres). -::: - -# Sensitive Config aka Secrets +# Sensitive Config (aka Secrets) The Defang CLI allows you to securely store sensitive information such as API keys, passwords, and other credentials. To do so, run: @@ -44,6 +40,10 @@ services: Use the `defang config` command of the Defang CLI to manage the values. +:::tip +You can find a sample of how to set sensitive config values [here](https://github.com/DefangLabs/samples/tree/main/samples/nodejs-openai). +::: + ## Interpolation Environment variables are set within the *environment* section of a service in a `compose.yaml` file. Any variables declared here will become available within the service container. @@ -62,18 +62,24 @@ In the example above, if we assume the value of the configuration variable ***US During `defang compose up` all variable references will be replaced with the actual value and made available in the container. If any referenced variable is not found the `defang compose up` command will be canceled. +## Using Config with Pulumi +In Defang, using config with [Pulumi](./pulumi.md) gives you the advantage of being able to manage your environment variables across different environments using Pulumi stacks. + +:::tip +You can find a sample of how to set environment variables with Pulumi [here](https://github.com/DefangLabs/samples/tree/main/samples/pulumi-remix-postgres). +::: + ## Connecting Services If you have created a service before a secret you can connect it by running the `defang compose start` command if using the [`defang compose` workflow](./compose.md). If you are using the [Pulumi-based workflow](./pulumi.md) you will need to redeploy using Pulumi. -:::tip Sample -You can find a sample of how to set sensitive config values [here](https://github.com/DefangLabs/defang/tree/main/samples/nodejs/ChatGPT%20API). -::: - ## Providers Here are the different ways sensitive config values are stored depending on the provider you are using: * [AWS](../providers/aws/aws.md#secrets) + * [DigitalOcean](../providers/digitalocean#secrets) + * [GCP](../providers/gcp#secrets) + From 9995f08f9da41f8e45ab363b034c9c8a14afb474 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 10:52:05 -0800 Subject: [PATCH 03/15] capitalize gcp provider --- docs/providers/gcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/providers/gcp.md b/docs/providers/gcp.md index 9977d6276..f6a3aa6d6 100644 --- a/docs/providers/gcp.md +++ b/docs/providers/gcp.md @@ -7,7 +7,7 @@ sidebar_position: 3000 # Google Cloud Platform (GCP) :::info -The Defang GCP provider is available for Public Preview as of December 2024. +The Defang GCP Provider is available for Public Preview as of December 2024. ::: Defang enables you to effortlessly develop and deploy full, scalable applications with GCP. It is designed to simplify deploying your services to the cloud. As one of the leading cloud providers globally, GCP offers powerful tools and resources, and with Defang, you can bypass the complexities of the GCP platform. Let Defang handle the heavy lifting so you can focus on what matters most to you! From 90ac8cd991715abf24291322905db2b2e1991608 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 10:55:40 -0800 Subject: [PATCH 04/15] change setup to set up when used as a verb --- blog/2024-03-20-dev-environments.mdx | 2 +- docs/concepts/defang-byoc.md | 2 +- docs/concepts/generate.md | 2 +- docs/providers/gcp.md | 2 +- docs/tutorials/use-your-own-domain-name.mdx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blog/2024-03-20-dev-environments.mdx b/blog/2024-03-20-dev-environments.mdx index 1c79174a3..39cb46e0d 100644 --- a/blog/2024-03-20-dev-environments.mdx +++ b/blog/2024-03-20-dev-environments.mdx @@ -15,7 +15,7 @@ We want it to be easy for you to try Defang with as little friction as possible, ## Codespaces -If you want to get started with Codespaces, you can just fork [this repo](https://github.com/DefangLabs/github-codespace). It comes with the Defang CLI pre-installed so you can start playing with it immediately. It's setup using the Defang CLI [Dev Container Feature](https://github.com/DefangLabs/devcontainer-feature/pkgs/container/devcontainer-feature%2Fdefang-cli). +If you want to get started with Codespaces, you can just fork [this repo](https://github.com/DefangLabs/github-codespace). It comes with the Defang CLI pre-installed so you can start playing with it immediately. It's set up using the Defang CLI [Dev Container Feature](https://github.com/DefangLabs/devcontainer-feature/pkgs/container/devcontainer-feature%2Fdefang-cli). ## Dev Containers diff --git a/docs/concepts/defang-byoc.md b/docs/concepts/defang-byoc.md index 7cfe3aefc..537a1854f 100644 --- a/docs/concepts/defang-byoc.md +++ b/docs/concepts/defang-byoc.md @@ -8,7 +8,7 @@ sidebar_position: 50 Defang aims to make it easier to deploy your services to the cloud. Specifically, Defang's goal is to make it easier to deploy your workloads to your *own* cloud accounts. We refer to this as bring-your-own-cloud (BYOC). We also provide Defang Playground, but it is only intended for non-production workloads so you can get a feel for how Defang works. -Defang provisions and configures the necessary native managed services from your cloud provider to get your services up and running. For example, on AWS, Defang will configure an [ALB](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/), setup [ECR](https://aws.amazon.com/ecr/), configure [CloudWatch](https://aws.amazon.com/cloudwatch/?nc2=type_a), and run your service on [ECS](https://aws.amazon.com/ecs/?nc2=type_a) and more. The following lists the existing and planned support for cloud providers. +Defang provisions and configures the necessary native managed services from your cloud provider to get your services up and running. For example, on AWS, Defang will configure an [ALB](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/), set up [ECR](https://aws.amazon.com/ecr/), configure [CloudWatch](https://aws.amazon.com/cloudwatch/?nc2=type_a), and run your service on [ECS](https://aws.amazon.com/ecs/?nc2=type_a) and more. The following lists the existing and planned support for cloud providers. :::info Defang does not install or run any Defang or third party services at runtime. diff --git a/docs/concepts/generate.md b/docs/concepts/generate.md index 7649c77f8..5c8318581 100644 --- a/docs/concepts/generate.md +++ b/docs/concepts/generate.md @@ -45,5 +45,5 @@ An HTTP GET endpoint that returns an HTML with a random meme from the imgflip AP **An example of a more complex prompt** ``` -A service that uses bullmq and redis. The compose file should also include a redis service. The code should setup a queue. It should also expose three endpoints with express: one to add a job to the queue, another to check how many tasks are in the queue, and a last one that runs on / which is just a healthcheck. The code should also include a worker that processes the queue by logging what's in each task. Use environment variables to configure the redis connection. No password. +A service that uses bullmq and redis. The compose file should also include a redis service. The code should set up a queue. It should also expose three endpoints with express: one to add a job to the queue, another to check how many tasks are in the queue, and a last one that runs on / which is just a healthcheck. The code should also include a worker that processes the queue by logging what's in each task. Use environment variables to configure the redis connection. No password. ``` diff --git a/docs/providers/gcp.md b/docs/providers/gcp.md index f6a3aa6d6..9f9fe4089 100644 --- a/docs/providers/gcp.md +++ b/docs/providers/gcp.md @@ -20,7 +20,7 @@ After signing in to your GCP account, select an existing project or [create a ne export GCP_PROJECT_ID= ``` -Next step is to [authenticate your local environment with GCP](https://cloud.google.com/docs/authentication). Our preferred method is to setup [Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc) with the Google Cloud CLI. Once the [Google Cloud CLI is installed](https://cloud.google.com/sdk/docs/install), run the following command to authenticate: +Next step is to [authenticate your local environment with GCP](https://cloud.google.com/docs/authentication). Our preferred method is to set up [Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc) with the Google Cloud CLI. Once the [Google Cloud CLI is installed](https://cloud.google.com/sdk/docs/install), run the following command to authenticate: ```bash gcloud init diff --git a/docs/tutorials/use-your-own-domain-name.mdx b/docs/tutorials/use-your-own-domain-name.mdx index 9ea0078fb..6a3397385 100644 --- a/docs/tutorials/use-your-own-domain-name.mdx +++ b/docs/tutorials/use-your-own-domain-name.mdx @@ -15,7 +15,7 @@ This tutorial will show you how to set up and use your own domain when deploying * [The Defang CLI](/docs/getting-started#install-the-defang-cli) * [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) -## Step 1 - Setup a Hosted Zone in AWS Route 53 +## Step 1 - Set up a Hosted Zone in AWS Route 53 :::info **If you purchased your domain with AWS, you can skip this step.** From c6f7a6fdf614007de7d4cd923a85eb70fd7bcae4 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 10:55:53 -0800 Subject: [PATCH 05/15] improve digitalocean page --- docs/providers/digitalocean/digitalocean.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/providers/digitalocean/digitalocean.md b/docs/providers/digitalocean/digitalocean.md index b57ee7d34..dd0cfffd4 100644 --- a/docs/providers/digitalocean/digitalocean.md +++ b/docs/providers/digitalocean/digitalocean.md @@ -7,10 +7,10 @@ sidebar_position: 010 # DigitalOcean :::info -This feature is available for Public Preview as of October 2024. This page will be updated when it is GA. +The Defang DigitalOcean Provider is available for Public Preview as of October 2024. ::: -Why should you use Defang with DigitalOcean? Defang allows you to easily create and manage full, scalable applications with DigitalOcean. Defang aims to make it easier to deploy your services to the cloud. DigitalOcean is one of the most popular cloud providers in the world and with Defang, you dont have to waste your time understanding the complexities and challenges of the DigitalOcean platform. Let Defang do it for you and spend more time working on whats important to you! +Why should you use Defang with DigitalOcean? Defang allows you to easily create and manage full, scalable applications with DigitalOcean. Defang aims to make it easier to deploy your services to the cloud. DigitalOcean is one of the most popular cloud providers in the world and with Defang, you don't have to waste your time understanding the complexities and challenges of the DigitalOcean platform. Let Defang do it for you and spend more time working on what's important to you! ## Getting Started @@ -19,10 +19,10 @@ Why should you use Defang with DigitalOcean? Defang allows you to easily create To get started with the Defang BYOC DigitalOcean Provider, first [install the latest version of the Defang CLI](../getting-started#authenticate-with-defang). ### Sign up for DigitalOcean -Next make sure you have signed up for a [DigitalOcean account](https://try.digitalocean.com/freetrialoffer/). +Next, make sure you have signed up for a [DigitalOcean account](https://try.digitalocean.com/freetrialoffer/). ### Authenticate with DigitalOcean -After signing up for your account, be sure to setup your [personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/). Defang will need to find this value in your shell as the `DIGITALOCEAN_TOKEN` environment variable. +After signing up for your account, be sure to set up your [personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/). Defang will need to find this value in your shell as the `DIGITALOCEAN_TOKEN` environment variable. ### Authenticate with DigitalOcean Spaces You will also need a [DigitalOcean Spaces access key](https://docs.digitalocean.com/products/spaces/how-to/manage-access/). Defang will need to find this value in your shell as the `SPACES_ACCESS_KEY_ID`, and `SPACES_SECRET_ACCESS_KEY` environment variables. @@ -64,7 +64,7 @@ The Provider runs your workloads using the [DigitalOcean App Platform](https://d ### Secrets -Defang allows you to configure your services with sensitive config values. Sensitive values are added and stored with [encryption](https://docs.digitalocean.com/products/app-platform/how-to/use-environment-variables/) in your app once it has been deployed. +Defang allows you to configure your services with [sensitive config values](https://docs.digitalocean.com/products/app-platform/how-to/use-environment-variables/) in DigitalOcean. Sensitive values are added and stored with encryption in your app once it has been deployed. ### Future Improvements From d7f92c1017c3c4852b5c8340731e67b58ce76230 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 11:20:28 -0800 Subject: [PATCH 06/15] capitalize portal --- blog/2024-11-12-hard-lessons-from-hardware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/2024-11-12-hard-lessons-from-hardware.md b/blog/2024-11-12-hard-lessons-from-hardware.md index bce61c8ca..e500b44a7 100644 --- a/blog/2024-11-12-hard-lessons-from-hardware.md +++ b/blog/2024-11-12-hard-lessons-from-hardware.md @@ -41,7 +41,7 @@ This is what the Flask server looked like on my computer as it got pinged: Hooray! Once everything was working, It was time to deploy my Flask code as a cloud service so I could access it from any computer, not just my own. Deployment usually takes several hours due to configuring a ton of cloud provider settings. But I ain’t got time for that. Instead, I used Defang to deploy it within minutes, which took care of all that for me. Saved me a lot of time and tears. -Here’s the Flask deployment on Defang’s portal view: +Here’s the Flask deployment on Defang’s Portal view: ![portal_view](/img/hardware-story/portal_view.png) From 5c587e80815af1b0d6c93cb3b208d23c7fdb6a8d Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 11:21:12 -0800 Subject: [PATCH 07/15] update debug message --- docs/concepts/debug.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/concepts/debug.md b/docs/concepts/debug.md index 9382d7218..4288ff6d5 100644 --- a/docs/concepts/debug.md +++ b/docs/concepts/debug.md @@ -8,8 +8,8 @@ sidebar_position: 650 Defang includes an AI-driven tool to help you debug your cloud applications. The AI agent will use your service logs as well as the files in your project to help you identify and resolve issues. -:::warning -The AI debugging agent is currently in preview and is currently limited in its capabilities. We plan to expand the capabilities of the AI agent in the future. +:::info +We plan to expand the capabilities of the AI agent in the future. ::: ## How it works From 7d8b8ea88e706d0858b94081d932cfecb3773a3b Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 11:23:00 -0800 Subject: [PATCH 08/15] update portal page --- docs/concepts/portal.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/concepts/portal.md b/docs/concepts/portal.md index 8b9a79240..a230a4a17 100644 --- a/docs/concepts/portal.md +++ b/docs/concepts/portal.md @@ -1,15 +1,21 @@ --- title: Portal -description: You can log into the Defang portal to view the state of your Defang services. +description: You can log into the Defang Portal to view the state of your Defang services. sidebar_position: 700 --- # Portal -You can log into the Defang portal at [portal.defang.dev](https://portal.defang.dev) using your [Defang account](./accounts.md) to view the state of your Defang services running in the Defang Playground for non-production applications. +You can log into the Defang Portal at [portal.defang.dev](https://portal.defang.dev) using your [Defang account](./accounts.md) to view the state of your Defang services running in the Defang Playground for non-production applications. + +You can use the Portal to get an overview of your services, view the logs for each service, quickly access exposed ports, view environment variables, and more. -You can use the portal to get an overview of your services, view the logs for each service, quickly access exposed ports, view environment variables, and more. :::info -We will make sure you have access to the tools required to debug your services in production. At the moment we're not entirely sure what that will look like, beyond `defang tail` to view logs, but we're working on it! +The Defang Portal displays services deployed to Playground. +To view services deployed to Defang BYOC, please check out [Monitoring Your Services](/docs/tutorials/monitoring-your-services). +::: + +:::tip +We have a tool in place to help [debug](/docs/concepts/debug) your application in production. ::: \ No newline at end of file From d59a85b664aa3ac1e0ddc2f3e0a7c6d759f051eb Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 12:08:22 -0800 Subject: [PATCH 09/15] improve debug page --- docs/concepts/debug.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/concepts/debug.md b/docs/concepts/debug.md index 4288ff6d5..3d960a8eb 100644 --- a/docs/concepts/debug.md +++ b/docs/concepts/debug.md @@ -6,16 +6,31 @@ sidebar_position: 650 # Debug -Defang includes an AI-driven tool to help you debug your cloud applications. The AI agent will use your service logs as well as the files in your project to help you identify and resolve issues. +Defang includes an AI-driven tool in the CLI (command-line interface) to help you debug your cloud applications. The AI agent will use your service logs as well as the files in your project to help you identify and resolve issues. :::info We plan to expand the capabilities of the AI agent in the future. ::: -## How it works +## How It Works -When you deploy a project with Defang, the CLI will wait for all services' statuses to switch to healthy. If any service fails to deploy, the AI debugger will kick in. It will analyze the logs and files in your project to identify the issue and provide you with a suggested fix. **The AI debugger will not change your files.** +Here is a typical workflow in the [Defang CLI](/docs/getting-started) that will automatically run the AI debugger tool: + +1. When you deploy a project with Defang (i.e. `defang compose up`), the CLI will wait for all services' statuses to switch to healthy. + +2. If any service fails to deploy, the AI debugger will kick in and ask for permission. + +3. The AI agent will analyze the logs and files in your project to identify the issue(s). + +4. Then, it will provide you with the suggested fix(es) in the terminal. + +:::tip +The AI debugger will not change your files. Instead, it will show you a suggestion, and it is up to you if you want to use it in your code. +::: + + +The AI debugger only kicks in when any service in a project fails to deploy. This could be because of a build failure, healthchecks failing, or a variety of other issues. :::info -The AI debugger only kicks in when any service in a project fails to deploy. This could be because of a build failure, healthchecks failing, or a variety of other issues. At the moment, we do not offer any way to trigger the AI debugger manually. +The AI debugger only kicks in when any service in a project fails to deploy. At the moment, we do not offer any way to trigger the AI debugger manually. ::: From 453b3a44c72daf241bdf0a1514ea9a9a8bc3c525 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 13:40:35 -0800 Subject: [PATCH 10/15] Improve some tutorial intros --- docs/tutorials/deploy-container-using-the-cli.mdx | 5 ++--- docs/tutorials/deploy-with-gpu.mdx | 4 +++- docs/tutorials/updating-your-services.md | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/tutorials/deploy-container-using-the-cli.mdx b/docs/tutorials/deploy-container-using-the-cli.mdx index 88642db8c..c09fbd7a0 100644 --- a/docs/tutorials/deploy-container-using-the-cli.mdx +++ b/docs/tutorials/deploy-container-using-the-cli.mdx @@ -5,10 +5,9 @@ sidebar_position: 200 # Deploy Existing Containers -This tutorial will show you how to deploy an existing container/multi-container application. +This tutorial will show you how to deploy an existing container/multi-container application using Defang. -This example is rather useful if you already have a Docker container built manually, or through a CI/CD system where the resulting image is available in a public or private repository accessible by Defang. -But it is not required in order to follow along to this tutorial. +This is rather useful if you already have a Docker container built manually, or through a CI/CD system (where the resulting image is available in a public or private repository accessible by Defang), but it is not required in order to follow along. # Step 1 - Make a Docker Compose file :::tip diff --git a/docs/tutorials/deploy-with-gpu.mdx b/docs/tutorials/deploy-with-gpu.mdx index 5b5210188..6f0333f02 100644 --- a/docs/tutorials/deploy-with-gpu.mdx +++ b/docs/tutorials/deploy-with-gpu.mdx @@ -5,7 +5,9 @@ sidebar_position: 500 # Deploy a GPU-Powered Application to AWS -This tutorial guides you to create and deploy a GPU-powered application on AWS using Defang and Mistral. We will walk you through the whole deployment process based on the [Mistral & vLLM](https://github.com/DefangLabs/samples/tree/main/samples/vllm) sample. +This tutorial will show you how to create and deploy a GPU-powered application on AWS using Defang. + +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). diff --git a/docs/tutorials/updating-your-services.md b/docs/tutorials/updating-your-services.md index 259867994..2391c74ac 100644 --- a/docs/tutorials/updating-your-services.md +++ b/docs/tutorials/updating-your-services.md @@ -6,6 +6,10 @@ description: How to update services deployed with Defang # Updating Your Services +This page will show you how to update your services in Defang. + +## Updating a Service + To update your app (for example, updating the base image of your container, or making changes to your code) all you have to do is run the `defang compose up` command and it will build and deploy a new version. ## Deploying New Services or Removing Existing Services From 88f28cf60d30c57b9790bded07c679d9e2f7a7b3 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 13:47:38 -0800 Subject: [PATCH 11/15] minor fixes to faq --- docs/faq/questions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/faq/questions.md b/docs/faq/questions.md index f0f6d1f71..4125be600 100644 --- a/docs/faq/questions.md +++ b/docs/faq/questions.md @@ -11,7 +11,7 @@ import {Button, ButtonGroup, FormGroup, FormLabel} from "@mui/material" ### Which cloud/region is the app being deployed to? -- In the [Defang Playground](/docs/concepts/defang-playground), the app is deployed to AWS `us-west-2`. In the [Defang BYOC](/docs/concepts/defang-byoc) model, the region is determined by your [Defang BYOC Provider](/docs/category/providers) settings. +- In the [Defang Playground](/docs/concepts/defang-playground), the app is deployed to AWS `us-west-2`. In the [Defang BYOC](/docs/concepts/defang-byoc) model, the region is determined by your Defang BYOC [Provider](/docs/category/providers) settings. ### Can I bring my own AWS or other cloud account? @@ -33,11 +33,11 @@ import {Button, ButtonGroup, FormGroup, FormLabel} from "@mui/material" ### Can I run production apps with Defang? -- Yes! Defang makes it easy to deploy your app on production-ready infrastructure in your own cloud account. For example, you can deploy your app to AWS with `defang compose up --provider=aws --mode=production`. Check out your preferred cloud provider on [Defang BYOC](/docs/concepts/defang-byoc) and see our [Deployment Modes](/docs/concepts/deployment-modes) documentation for more information on that. +- Yes! Defang makes it easy to deploy your app on production-ready infrastructure in your own cloud account. For example, you can deploy your app to AWS with `defang compose up --provider=aws --mode=production`. Check out your preferred cloud provider on [Defang BYOC](/docs/concepts/defang-byoc) and see our [Deployment Modes](/docs/concepts/deployment-modes) documentation for more information. ### Does Defang support blue/green deployments? -- Defang does not currently support Blue/Green deploys, but it does support rolling updates with the `--mode=production` flag. See the [Deployment Modes](/docs/concepts/deployment-modes) documentation for more information. +- Defang does not currently support blue/green deployments, but it does support rolling updates with the `--mode=production` flag. See the [Deployment Modes](/docs/concepts/deployment-modes) documentation for more information. ### Does Defang support rolling deployments? From bd2f9728a1803776cf7c949a0ec5ee9b4e63e115 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 14:04:09 -0800 Subject: [PATCH 12/15] adding improvements to ai page docs --- docs/concepts/debug.md | 5 ++--- docs/concepts/generate.md | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/concepts/debug.md b/docs/concepts/debug.md index 3d960a8eb..d91ecf018 100644 --- a/docs/concepts/debug.md +++ b/docs/concepts/debug.md @@ -8,8 +8,8 @@ sidebar_position: 650 Defang includes an AI-driven tool in the CLI (command-line interface) to help you debug your cloud applications. The AI agent will use your service logs as well as the files in your project to help you identify and resolve issues. -:::info -We plan to expand the capabilities of the AI agent in the future. +:::tip +Defang has another AI-driven tool called [`generate`](/docs/concepts/generate). ::: ## How It Works @@ -28,7 +28,6 @@ Here is a typical workflow in the [Defang CLI](/docs/getting-started) that will The AI debugger will not change your files. Instead, it will show you a suggestion, and it is up to you if you want to use it in your code. ::: - The AI debugger only kicks in when any service in a project fails to deploy. This could be because of a build failure, healthchecks failing, or a variety of other issues. :::info diff --git a/docs/concepts/generate.md b/docs/concepts/generate.md index 5c8318581..0c1f07ab1 100644 --- a/docs/concepts/generate.md +++ b/docs/concepts/generate.md @@ -8,12 +8,12 @@ sidebar_position: 100 Defang includes an AI-driven agent that translates natural language prompts to an outline for your project that you can then refine. The AI agent is available through the [Defang CLI](../getting-started#install-the-defang-cli.md). -:::info -The AI agent is currently in preview and only supports a limited set of prompts, varying in complexity. We plan to expand the capabilities of the AI agent in the future. -::: - We are working on expanding the range of supported prompts and improving the accuracy of the AI agent. If you have any feedback or suggestions, please let us know by [opening an issue](https://github.com/DefangLabs/defang/issues/new). +:::tip +This page is about Defang's AI-driven `generate` tool. We also have another AI tool for [debugging](/docs/concepts/debug). Don't get confused between the two! +::: + ## Example Prompts Here are some example prompts that the AI agent can help you with: @@ -46,4 +46,4 @@ An HTTP GET endpoint that returns an HTML with a random meme from the imgflip AP ``` A service that uses bullmq and redis. The compose file should also include a redis service. The code should set up a queue. It should also expose three endpoints with express: one to add a job to the queue, another to check how many tasks are in the queue, and a last one that runs on / which is just a healthcheck. The code should also include a worker that processes the queue by logging what's in each task. Use environment variables to configure the redis connection. No password. -``` +``` \ No newline at end of file From 5f406c3aa294358ea339a8f48d30bce81fba7db2 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 14:05:57 -0800 Subject: [PATCH 13/15] make prev change from tip to info --- docs/concepts/debug.md | 2 +- docs/concepts/generate.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/concepts/debug.md b/docs/concepts/debug.md index d91ecf018..ed19040ba 100644 --- a/docs/concepts/debug.md +++ b/docs/concepts/debug.md @@ -8,7 +8,7 @@ sidebar_position: 650 Defang includes an AI-driven tool in the CLI (command-line interface) to help you debug your cloud applications. The AI agent will use your service logs as well as the files in your project to help you identify and resolve issues. -:::tip +:::info Defang has another AI-driven tool called [`generate`](/docs/concepts/generate). ::: diff --git a/docs/concepts/generate.md b/docs/concepts/generate.md index 0c1f07ab1..1ad59be12 100644 --- a/docs/concepts/generate.md +++ b/docs/concepts/generate.md @@ -10,7 +10,7 @@ Defang includes an AI-driven agent that translates natural language prompts to a We are working on expanding the range of supported prompts and improving the accuracy of the AI agent. If you have any feedback or suggestions, please let us know by [opening an issue](https://github.com/DefangLabs/defang/issues/new). -:::tip +:::info This page is about Defang's AI-driven `generate` tool. We also have another AI tool for [debugging](/docs/concepts/debug). Don't get confused between the two! ::: From ee55ff606f418c2f750150c34c9181bb6b0d1ce1 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 14:17:09 -0800 Subject: [PATCH 14/15] revision to wording --- docs/concepts/generate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/generate.md b/docs/concepts/generate.md index 1ad59be12..a8d407063 100644 --- a/docs/concepts/generate.md +++ b/docs/concepts/generate.md @@ -11,7 +11,7 @@ Defang includes an AI-driven agent that translates natural language prompts to a We are working on expanding the range of supported prompts and improving the accuracy of the AI agent. If you have any feedback or suggestions, please let us know by [opening an issue](https://github.com/DefangLabs/defang/issues/new). :::info -This page is about Defang's AI-driven `generate` tool. We also have another AI tool for [debugging](/docs/concepts/debug). Don't get confused between the two! +This page is about Defang's AI tool for project outline generation. We also have an AI tool for [debugging](/docs/concepts/debug). ::: ## Example Prompts From c2bc4bfe9f269285dc61faf6dac3e02a08090271 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 10 Dec 2024 15:36:23 -0800 Subject: [PATCH 15/15] update tables to have GCP --- docs/concepts/managed-storage/managed-object-storage.md | 7 ++++--- docs/concepts/managed-storage/managed-postgres.md | 7 ++++--- docs/concepts/managed-storage/managed-redis.md | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/concepts/managed-storage/managed-object-storage.md b/docs/concepts/managed-storage/managed-object-storage.md index a08060f02..f6c6c3a44 100644 --- a/docs/concepts/managed-storage/managed-object-storage.md +++ b/docs/concepts/managed-storage/managed-object-storage.md @@ -16,6 +16,7 @@ Managed Object Storage, like AWS S3, is a service that allows you to store and r | Provider | Managed Object Storage | | --- | --- | -| [Playground](/docs/providers/playground.md) | ❌ | -| [AWS](/docs/providers/aws/aws.md) | ❌ | -| [DigitalOcean](/docs/providers/digitalocean/digitalocean.md) | ❌ | +| [Playground](/docs/providers/playground#managed-services) | ❌ | +| [AWS](/docs/providers/aws#managed-storage) | ❌ | +| [DigitalOcean](/docs/providers/digitalocean#future-improvements) | ❌ | +| [GCP](/docs/providers/gcp#future-improvements) | ❌ | diff --git a/docs/concepts/managed-storage/managed-postgres.md b/docs/concepts/managed-storage/managed-postgres.md index 5d7152c7e..e995a0e1d 100644 --- a/docs/concepts/managed-storage/managed-postgres.md +++ b/docs/concepts/managed-storage/managed-postgres.md @@ -12,9 +12,10 @@ Postgres, or PostgreSQL, is an advanced open-source relational database system k | Provider | Managed Postgres | | --- | --- | -| [Playground](/docs/providers/playground) | ❌ | -| [AWS](/docs/providers/aws/aws.md#managed-postgres) | ✅ | -| [DigitalOcean](/docs/providers/digitalocean/digitalocean.md) | ❌ | +| [Playground](/docs/providers/playground#managed-services) | ❌ | +| [AWS](/docs/providers/aws#managed-storage) | ✅ | +| [DigitalOcean](/docs/providers/digitalocean#future-improvements) | ❌ | +| [GCP](/docs/providers/gcp#future-improvements) | ❌ | ## How to use Managed Postgres diff --git a/docs/concepts/managed-storage/managed-redis.md b/docs/concepts/managed-storage/managed-redis.md index 83e62ec94..5e9ca41ec 100644 --- a/docs/concepts/managed-storage/managed-redis.md +++ b/docs/concepts/managed-storage/managed-redis.md @@ -12,9 +12,10 @@ Redis is an in-memory data structure store widely used for caching, real-time an | Provider | Managed Redis | | --- | --- | -| [Playground](/docs/providers/playground.md#managed-redis) | ❌ | -| [AWS](/docs/providers/aws/aws.md#managed-redis) | ✅ | -| [DigitalOcean](/docs/providers/digitalocean/digitalocean.md) | ❌ | +| [Playground](/docs/providers/playground#managed-services) | ❌ | +| [AWS](/docs/providers/aws#managed-storage) | ✅ | +| [DigitalOcean](/docs/providers/digitalocean#future-improvements) | ❌ | +| [GCP](/docs/providers/gcp#future-improvements) | ❌ | ## How to use Managed Redis