You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/deploy-with-gpu.mdx
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,22 @@ title: Deploy a GPU-Powered Application
3
3
sidebar_position: 500
4
4
---
5
5
6
-
# Deploy a GPU-Powered Application
6
+
# Deploy a GPU-Powered Application to AWS
7
7
8
8
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.
9
9
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
+
10
14
<iframewidth="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>
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".
Copy file name to clipboardExpand all lines: docs/tutorials/monitoring-your-services.md
+32-8Lines changed: 32 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,43 @@ description: How to monitoring services deployed with Defang
6
6
7
7
# Monitoring Your Services
8
8
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
11
10
12
-
- From the CLI:
11
+
When deploying to Playground, you can monitor your service status from the [Defang Portal](https://portal.defang.dev).
13
12
14
-
```tsx
15
-
defangtail--nameservice1
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.
When deploying to Playground, your service's logs may be viewed in the [Defang Portal](https://portal.defang.dev).
21
18
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.
22
46
23
47
:::info
24
48
* To learn more about observability in Defang, check out the [observability page](../concepts/observability.md).
Copy file name to clipboardExpand all lines: docs/tutorials/updating-your-services.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,28 @@ description: How to update services deployed with Defang
6
6
7
7
# Updating Your Services
8
8
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
10
12
11
-
:::info
12
13
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.
Copy file name to clipboardExpand all lines: docs/tutorials/use-your-own-domain-name.mdx
+13-18Lines changed: 13 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,25 +3,17 @@ title: How to Use Your Own Domain
3
3
sidebar_position: 600
4
4
---
5
5
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
9
7
10
8
<iframewidth="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>
11
9
10
+
## Prerequisites
12
11
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):
**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
31
23
32
24
<imgsrc="/img/domains-tutorial/zone.png"alt="Hosted Zone UI Screenshot"style={{maxWidth: 650}} />
33
25
34
-
35
-
## Step 3 - Configure your DNS settings in your domain registrar
26
+
## Step 2 - Configure your DNS settings in your domain registrar
36
27
37
28
:::info
38
29
**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
43
34

44
35
45
36
46
-
## Step 4 - Set up Your Compose File
37
+
## Step 3 - Set up Your Compose File
47
38
In your compose file, specify the domain name you want to use, for example
48
39
49
40
```yaml
@@ -59,7 +50,7 @@ services:
59
50
```
60
51
61
52
62
-
## Step 5 - Deploy
53
+
## Step 4 - Deploy
63
54
Run the following command to deploy your service:
64
55
```bash
65
56
defang compose up
@@ -68,3 +59,7 @@ defang compose up
68
59
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.
69
60
70
61
<imgsrc="/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