Skip to content

Commit f2c2eef

Browse files
Merge pull request #130 from DefangLabs/jordan/launch-prep-feedback
More documentation revisions
2 parents 4dbcecc + 66e1e7b commit f2c2eef

File tree

5 files changed

+77
-30
lines changed

5 files changed

+77
-30
lines changed

docs/concepts/deployment-modes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Defang Deployment Modes
2+
title: Deployment Modes
33
description: Defang provides three deployment modes which allow you to balance cost and resiliency.
44
sidebar_position: 501
55
---

docs/tutorials/deploy-with-gpu.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@ title: Deploy a GPU-Powered Application
33
sidebar_position: 500
44
---
55

6-
# Deploy a GPU-Powered Application
6+
# Deploy a GPU-Powered Application to AWS
77

88
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 this [Deploying Mistral with vLLM](https://github.com/DefangLabs/samples/tree/main/samples/vllm) sample.
99

10+
:::info
11+
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).
12+
:::
13+
1014
<iframe width="560" height="315" src="https://www.youtube.com/embed/kynFa2zU7hQ?si=qdV0xa6vkhMFJ6qv" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
1115

1216
## Prerequisites
1317

18+
* [A Defang Account](/docs/concepts/authentication)
19+
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
20+
* [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
21+
1422
### AWS Account with GPU Access
1523

1624
For any of this to work, you'll need to have access to GPU instances in your AWS account. To do that you'll need to go to the "[Service Quotas](https://console.aws.amazon.com/servicequotas/home)" console in your AWS account. From there you can request access to spot GPU instances. You'll need to request 8 or more because the value is per vCPU and the smallest GPU instance has 8 vCPUs. The instance types you're requesting are "All G and VT spot instances".

docs/tutorials/monitoring-your-services.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,43 @@ description: How to monitoring services deployed with Defang
66

77
# Monitoring Your Services
88

9-
Monitoring your services with Defang.
10-
By default, all the output (stdout and stderr) from your app is logged. You can view these logs in real-time. You can view logs for all your services, one service, or even one specific deployment of a service.
9+
## Status
1110

12-
- From the CLI:
11+
When deploying to Playground, you can monitor your service status from the [Defang Portal](https://portal.defang.dev).
1312

14-
```tsx
15-
defang tail --name service1
16-
```
13+
When deploying to your own cloud, the primary way to monitor your services is through your cloud provider's dashboard. Defang does, however, provide some tools for monitoring your service logs.
1714

18-
- From the Defang Portal:
15+
## Logs
1916

20-
[https://portal.defang.dev/](https://portal.defang.dev/)
17+
When deploying to Playground, your service's logs may be viewed in the [Defang Portal](https://portal.defang.dev).
2118

19+
By default, all the output (stdout and stderr) from your app is logged. You can view these logs in real-time or for a time in the past. You can view logs for all your services, one service, or even one specific deployment of a service.
20+
21+
### Tailing Live Logs For All Services
22+
23+
```bash
24+
$ defang tail
25+
```
26+
27+
### Tailing Logs Since a Specific Time
28+
29+
```bash
30+
$ defang tail --since 1h
31+
```
32+
33+
### Tailing Logs For a Service
34+
35+
```bash
36+
$ defang tail --name service-name
37+
```
38+
39+
### Build Time Logs
40+
41+
```bash
42+
$ defang logs --type=build
43+
```
44+
45+
All of the above flags can be combined to get the exact logs you need. See the CLI reference for [`defang tail`](/docs/cli/defang_tail) for more information.
2246

2347
:::info
2448
* To learn more about observability in Defang, check out the [observability page](../concepts/observability.md).

docs/tutorials/updating-your-services.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,28 @@ description: How to update services deployed with Defang
66

77
# Updating Your Services
88

9-
To update your app (for example, updating the base image of your container, or making changes to your code) you can run the `defang compose up` command and it will build and deploy a new version with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.
9+
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.
10+
11+
## Deploying New Services or Removing Existing Services
1012

11-
:::info
1213
If you are using [compose files](../concepts/compose.md) to define your services, you can add/remove services, make changes to code, etc. When you run `defang compose up`, the update will be diffed against the current state and any necessary changes will be applied to make the current state match the desired state.
14+
15+
## Deployment Modes
16+
17+
Defang offers multiple [deployment modes](/docs/concepts/deployment-modes). You can specify which mode you would like to be used when you deploy with the `--mode` flag on the CLI. The default mode is `development`. You may also specify `staging` or `production`.
18+
19+
```shell
20+
$ defang compose up --mode=production
21+
```
22+
23+
### Development Mode (Default)
24+
25+
The default deployment mode is `development`. This is the In this mode, the existing services will be deprovisioned before your new service will be spun up. This means that there will be a short downtime while the new service is being provisioned.
26+
27+
### Production Mode (Zero-downtime Updates)
28+
29+
If you are running in `production` mode, the update will be done with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.
30+
31+
:::info
32+
For more information on Deployment Modes, see the [Deployment Modes](/docs/concepts/deployment-modes) concept documentation.
1333
:::

docs/tutorials/use-your-own-domain-name.mdx

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,17 @@ title: How to Use Your Own Domain
33
sidebar_position: 600
44
---
55

6-
# How to Use Your Own Domain
7-
8-
In our latest version of [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) (Bring Your Own Cloud), you can now use your own domain name. (Currently, this new feature is not applicable to [Defang Playground](https://docs.defang.io/docs/concepts/defang-playground))
6+
# How to Use Your Own Domain with AWS
97

108
<iframe width="560" height="315" src="https://www.youtube.com/embed/n4RlMpsdTbs?si=_Ru6tobSbi9LT4Q1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
119

10+
## Prerequisites
1211

13-
## Step 1 - Check your [Defang BYOC](../concepts/defang-byoc.md) settings
14-
15-
* Make sure you [install the latest version of the Defang CLI](../getting-started#install-the-defang-cli.md)
16-
* Then, make sure you have properly [authenticated your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). The Defang CLI makes use of AWS environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`, so make sure the correct values are set for those.
17-
18-
If you use the AWS CLI, you can verify that your are authenticated against AWS using the following command (note that the AWS CLI itself is not required to use the Defang CLI in BYOC mode):
19-
```bash
20-
aws sts get-caller-identity
21-
```
12+
* [A Defang Account](/docs/concepts/authentication)
13+
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
14+
* [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
2215

23-
24-
## Step 2 - Setup a Hosted Zone in AWS Route 53
16+
## Step 1 - Setup a Hosted Zone in AWS Route 53
2517

2618
:::info
2719
**If you purchased your domain with AWS, you can skip this step.**
@@ -31,8 +23,7 @@ For Defang to be able to manage your domain, you need to create a [public hosted
3123

3224
<img src="/img/domains-tutorial/zone.png" alt="Hosted Zone UI Screenshot" style={{maxWidth: 650}} />
3325

34-
35-
## Step 3 - Configure your DNS settings in your domain registrar
26+
## Step 2 - Configure your DNS settings in your domain registrar
3627

3728
:::info
3829
**If you purchased your domain with AWS, you can skip this step.**
@@ -43,7 +34,7 @@ You'll need to create NS records in your domain registrar that point to the AWS
4334
![CloudFlare NS Records Screenshot](/img/domains-tutorial/ns-records.png)
4435

4536

46-
## Step 4 - Set up Your Compose File
37+
## Step 3 - Set up Your Compose File
4738
In your compose file, specify the domain name you want to use, for example
4839

4940
```yaml
@@ -59,7 +50,7 @@ services:
5950
```
6051
6152
62-
## Step 5 - Deploy
53+
## Step 4 - Deploy
6354
Run the following command to deploy your service:
6455
```bash
6556
defang compose up
@@ -68,3 +59,7 @@ defang compose up
6859
This will deploy your service and set up the necessary DNS records in Route 53 as seen in the screenshot below as well as provision SSL certificates. You can now access your service at the domain you specified in your compose file.
6960

7061
<img src="/img/domains-tutorial/route53-records.png" alt="Route 53 DNS Records Screenshot" />
62+
63+
***
64+
65+
For a deeper discussion of how to use a custom domain with Defang, see our [Domain](/docs/concepts/domains) concept docs.

0 commit comments

Comments
 (0)