Skip to content

Commit 0f5c1e0

Browse files
authored
Merge pull request #222 from DefangLabs/linda-enable-features
Show all blog posts + other md formatting fixes
2 parents f52cdd7 + 6daa4d8 commit 0f5c1e0

File tree

10 files changed

+93
-69
lines changed

10 files changed

+93
-69
lines changed

docs/concepts/defang-byoc.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ $ export DEFANG_PROVIDER=digitalocean
3131

3232
Please read the [AWS Provider](../providers/aws/aws.md) documentation for more details about how the AWS provider works and how to get started.
3333

34-
:::success AWS Free Tier & Credits
35-
You can use the AWS Free Tier to try out Defang. Learn more about it [here](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you're an elligible startup, you can sign up for credits [here](https://aws.amazon.com/startups/sign-up?referrer_url_path=%2Fstartups).
34+
:::tip[AWS Free Tier & Credits]
35+
You can use the AWS Free Tier to try out Defang. Learn more about it [here](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you're an eligible startup, you can sign up for credits [here](https://aws.amazon.com/startups/sign-up?referrer_url_path=%2Fstartups).
3636
:::
3737

3838
## DigitalOcean
@@ -44,8 +44,8 @@ The Defang DigitalOcean Provider is available for Public Preview as of October 2
4444

4545
Please read the [DigitalOcean Provider](../providers/digitalocean/digitalocean.md) documentation for more details about how the DigitalOcean provider works and how to get started.
4646

47-
:::success DigitalOcean Credits
48-
You can get DigitalOcean credits to try out Defang. Learn more about it on their [pricing page](https://www.digitalocean.com/pricing). If you're an elligible startup, you can sign up for credits [here](https://www.digitalocean.com/hatch).
47+
:::tip[DigitalOcean Credits]
48+
You can get DigitalOcean credits to try out Defang. Learn more about it on their [pricing page](https://www.digitalocean.com/pricing). If you're an eligible startup, you can sign up for credits [here](https://www.digitalocean.com/hatch).
4949
:::
5050

5151
## GCP
@@ -56,11 +56,10 @@ The Defang GCP Provider is available for Public Preview as of December 2024.
5656

5757
Please check out the [GCP Provider](../providers/gcp/) page for more details.
5858

59-
:::success GCP Free Tier & Credits
60-
You can use the GCP Free Tier to try out Defang. Learn more about it [here](https://cloud.google.com/free). If you're an elligible startup, you can sign up for credits [here](https://cloud.google.com/developers/startups).
59+
:::tip[GCP Free Tier & Credits]
60+
You can use the GCP Free Tier to try out Defang. Learn more about it [here](https://cloud.google.com/free). If you're an eligible startup, you can sign up for credits [here](https://cloud.google.com/developers/startups).
6161
:::
6262

63-
6463
## Azure
6564

6665
:::info

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

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

77
# Managed Object Storage
88

9-
:::info Not Yet Supported
9+
:::info[Not Yet Supported]
1010
As of September 2024, Defang does not yet support managed Object Storage, but it is on our roadmap. If you are interested in Object Storage support, please vote on [this issue](https://github.com/DefangLabs/defang/issues/688).
1111
:::
1212

docs/concepts/managed-storage/managed-postgres.md renamed to docs/concepts/managed-storage/managed-postgres.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ You can also set the following optional environment variables to configure the m
3939
You can connect to the managed Postgres instance using the name of your service as the hostname, `POSTGRES_USER`, `POSTGRES_DB`, and `POSTGRES_PASSWORD` environment variables.
4040

4141
### Example
42+
4243
:::info
4344
For a smoother experience with Defang, we recommend using Postgres 14 for your container images. This version provides easier access and improved usability.
4445
:::
@@ -83,7 +84,7 @@ When a project is deployed to a [production environment](/docs/concepts/deployme
8384

8485
The AWS Console can be used to restore a snapshot into a new instance of Postgres.
8586

86-
<!--
87+
{/*
8788
### Major Version Updating of Engine
8889
8990
To update the database engine you can update the image to a later version in your Compose file and apply it via ```defang compose up --provider=aws```. In the example below, we change from Postgres 15 to 16.
@@ -100,4 +101,5 @@ to
100101
```
101102
database:
102103
image: postgres:16
103-
``` -->
104+
```
105+
*/}

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

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

77
# Managed Storage
88

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

docs/concepts/resources.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
replicas: 3
2020
resources:
2121
reservations:
22-
cpus: '1.0'
22+
cpus: "1.0"
2323
memory: 2048M
2424
devices:
2525
- capabilities: ["gpu"]
@@ -32,17 +32,17 @@ const service = new defang.DefangService("gpu-service", {
3232
deploy: {
3333
replicas: 3,
3434
resources: {
35-
reservations: {
36-
cpu: 1.0,
37-
memory: 2048,
38-
devices: [{capabilities: ['gpu']}]
39-
}
40-
}
41-
}
35+
reservations: {
36+
cpu: 1.0,
37+
memory: 2048,
38+
devices: [{ capabilities: ["gpu"] }],
39+
},
40+
},
41+
},
4242
});
4343
```
4444

45-
:::info GPUs
45+
:::info[GPUs]
4646
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.
4747
:::
4848

@@ -68,7 +68,7 @@ Defang uses `shm_size` to configure both the memory and disk space available to
6868
The default `shm_size` values for each platform are as follows. More or less may be specified.
6969

7070
| Platform | `shm_size` Minimum |
71-
|---------------|--------------------|
71+
| ------------- | ------------------ |
7272
| AWS | 16G |
7373
| Digital Ocean | 8G |
7474
| GCP | 16G |

docs/providers/aws/aws.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ sidebar_position: 000
88

99
Why should you use Defang with AWS? Defang allows you to easily create and manage full, scalable applications with AWS. Defang aims to make it easier to deploy your services to the cloud. Don't waste your time learning the ins and outs of AWS, deciding which of the 200+ services to use, and then writing the infrastructure code to deploy your services, and making sure they are properly secured. Defang does all of that for you.
1010

11-
:::success AWS Free Tier & Credits
12-
You can use the AWS Free Tier to try out Defang. Learn more about it [here](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you're an elligible startup, you can sign up for credits [here](https://aws.amazon.com/startups/sign-up?referrer_url_path=%2Fstartups).
11+
:::tip[AWS Free Tier & Credits]
12+
You can use the AWS Free Tier to try out Defang. Learn more about it [here](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you're an eligible startup, you can sign up for credits [here](https://aws.amazon.com/startups/sign-up?referrer_url_path=%2Fstartups).
1313
:::
1414

1515
## Getting Started
@@ -66,7 +66,7 @@ Defang can help you provision [managed storage](/docs/concepts/managed-storage/m
6666

6767
### Managed Postgres
6868

69-
When using [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.md), the Defang CLI provisions an RDS Postgres instance in your account.
69+
When using [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.mdx), the Defang CLI provisions an RDS Postgres instance in your account.
7070

7171
### Managed Redis
7272

docs/providers/digitalocean/digitalocean.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ sidebar_position: 010
1010
The Defang DigitalOcean Provider is available for Public Preview as of October 2024.
1111
:::
1212

13-
:::success DigitalOcean Credits
14-
You can get DigitalOcean credits to try out Defang. Learn more about it on their [pricing page](https://www.digitalocean.com/pricing). If you're an elligible startup, you can sign up for credits [here](https://www.digitalocean.com/hatch).
13+
:::tip[DigitalOcean Credits]
14+
You can get DigitalOcean credits to try out Defang. Learn more about it on their [pricing page](https://www.digitalocean.com/pricing). If you're an eligible startup, you can sign up for credits [here](https://www.digitalocean.com/hatch).
1515
:::
1616

1717
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 can bypass the complexities of the DigitalOcean platform. Let Defang do it for you and spend more time working on what's important to you!
@@ -23,12 +23,15 @@ Why should you use Defang with DigitalOcean? Defang allows you to easily create
2323
To get started with the Defang BYOC DigitalOcean Provider, first [install the latest version of the Defang CLI](../getting-started#authenticate-with-defang).
2424

2525
### Sign up for DigitalOcean
26+
2627
Next, make sure you have signed up for a [DigitalOcean account](https://try.digitalocean.com/freetrialoffer/).
2728

2829
### Authenticate with DigitalOcean
30+
2931
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.
3032

3133
### Authenticate with DigitalOcean Spaces
34+
3235
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.
3336

3437
### Configure your shell environment
@@ -44,6 +47,7 @@ The Defang CLI will automatically check if these envinonment variables are set b
4447
### Deploy your project to DigitalOcean
4548

4649
Once you are ready to go, add the `--provider=digitalocean` to your command to tell the Defang CLI to use the DigitalOcean provider or set the `DEFANG_PROVIDER` environment variable to `digitalocean`.
50+
4751
```bash
4852
$ defang compose up --provider=digitalocean
4953
# or
@@ -73,9 +77,10 @@ Defang allows you to configure your services with [sensitive config values](http
7377
### Future Improvements
7478

7579
The following features are still in development for DigitalOcean:
80+
7681
- [Custom Domains](/docs/concepts//domains.mdx)
7782
- [Managed Redis](/docs/concepts//managed-storage/managed-redis.md)
78-
- [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.md)
83+
- [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.mdx)
7984
- [Managed Language Models](/docs/concepts/managed-llms/managed-language-models.md)
8085

8186
Stay tuned for future updates!

docs/providers/gcp.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ sidebar_position: 3000
1010
The Defang GCP Provider is available for Public Preview as of December 2024.
1111
:::
1212

13-
:::success GCP Free Tier & Credits
14-
You can use the GCP Free Tier to try out Defang. Learn more about it [here](https://cloud.google.com/free). If you're an elligible startup, you can sign up for credits [here](https://cloud.google.com/developers/startups).
13+
:::tip[GCP Free Tier & Credits]
14+
You can use the GCP Free Tier to try out Defang. Learn more about it [here](https://cloud.google.com/free). If you're an eligible startup, you can sign up for credits [here](https://cloud.google.com/developers/startups).
1515
:::
1616

1717
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!
@@ -66,10 +66,11 @@ Defang offers integration with managed, cloud-native large language model servic
6666
### Future Improvements
6767

6868
The following features are in active development for GCP:
69+
6970
- [Configuration and management of secrets](/docs/concepts//configuration.md)
7071
- [Networking and Load Balancing](/docs/concepts//networking.mdx)
7172
- [Custom Domains](/docs/concepts//domains.mdx)
7273
- [Managed Redis](/docs/concepts//managed-storage/managed-redis.md)
73-
- [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.md)
74+
- [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.mdx)
7475

7576
Stayed tuned for future updates!

docs/tutorials/deploy-with-gpu.mdx

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,36 @@ sidebar_position: 500
55

66
# Deploy a GPU-Powered Application to AWS
77

8-
This tutorial will show you how to create and deploy a GPU-powered application on AWS using Defang.
8+
This tutorial will show you how to create and deploy a GPU-powered application on AWS using Defang.
99

1010
We will walk you through the whole deployment process based on the [Mistral & vLLM](https://github.com/DefangLabs/samples/tree/main/samples/vllm) sample.
1111

1212
:::info
1313
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).
1414
:::
1515

16-
<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>
16+
<iframe
17+
width="560"
18+
height="315"
19+
src="https://www.youtube.com/embed/kynFa2zU7hQ?si=qdV0xa6vkhMFJ6qv"
20+
title="YouTube video player"
21+
frameborder="0"
22+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
23+
referrerpolicy="strict-origin-when-cross-origin"
24+
allowfullscreen
25+
></iframe>
1726

1827
## Prerequisites
1928

20-
* [A Defang Account](/docs/concepts/authentication)
21-
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
22-
* [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
29+
- [A Defang Account](/docs/concepts/authentication)
30+
- [The Defang CLI](/docs/getting-started#install-the-defang-cli)
31+
- [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
2332

2433
### AWS Account with GPU Access
2534

2635
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".
2736

28-
:::warning Timing
37+
:::warning[Timing]
2938
This process can take a few days for AWS to approve.
3039
:::
3140

@@ -41,27 +50,29 @@ You'll need to clone the [Mistral & vLLM](https://github.com/DefangLabs/samples/
4150

4251
## Step 2 - Check your [Defang BYOC](../concepts/defang-byoc.md) settings
4352

44-
* Make sure you [install the latest version of the Defang CLI](../getting-started#install-the-defang-cli.md)
45-
* 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.
53+
- Make sure you [install the latest version of the Defang CLI](../getting-started#install-the-defang-cli.md)
54+
- 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.
4655

4756
:::tip
4857
If you have the AWS CLI installed (which is not required in order to use the Defang CLI), you can verify that you've authenticated to AWS by running `aws sts get-caller-identity` and see your account ID.
4958
:::
5059

5160
## Step 3 - Prepare your Environment
52-
* Log into your Defang account
61+
62+
- Log into your Defang account
63+
5364
```bash
5465
defang login
5566
```
5667

57-
* Set the HuggingFace token using the `defang config` command
68+
- Set the HuggingFace token using the `defang config` command
69+
5870
```bash
5971
defang config set --name HF_TOKEN
6072
```
6173

6274
[Configuration](../concepts/configuration.md) stores your sensitive information such as API keys, passwords, and other credentials for you.
6375

64-
6576
## Step 4 - Explore the Compose File
6677

6778
The `compose.yml` file is where you define your services and their configurations.
@@ -105,19 +116,19 @@ We start with the latest vLLM Docker image provided by [Mistral AI](https://docs
105116

106117
```yaml
107118
mistral:
108-
image: ghcr.io/mistralai/mistral-src/vllm:latest
119+
image: ghcr.io/mistralai/mistral-src/vllm:latest
109120
```
110121
111122
We specify that we require a GPU to run our application.
112123
113124
```yaml
114125
deploy:
115-
resources:
116-
reservations:
126+
resources:
127+
reservations:
117128
cpus: '2.0'
118-
memory: 8192M
119-
devices:
120-
- capabilities: ["gpu"]
129+
memory: 8192M
130+
devices:
131+
- capabilities: ["gpu"]
121132
```
122133
123134
The Mistral model will be downloaded from HuggingFace. We need to have a HuggingFace Token to enable the installation, so we specify that we need to get the `HF_TOKEN` configuration value from Defang.
@@ -126,41 +137,40 @@ Specifying the `HF_TOKEN` in the `environment` section of the service in the `co
126137

127138
```yaml
128139
environment:
129-
- HF_TOKEN
140+
- HF_TOKEN
130141
```
131142

132143
### The UI Service
133144

134145
In this sample we also provide a simple UI to interact with the endpoint created by vLLM. The UI service is a Next.js application that runs on port 3000.
135146

136-
:::tip Networking
147+
:::tip
137148
You can see here how Defang's [networking](../concepts//networking.mdx) works. The `mistral` service is available at `http://mistral:8000`, exactly as it would be in a local `docker-compose` environment.
138149
:::
139150

140151
```yaml
141-
ui:
142-
restart: unless-stopped
143-
build:
144-
context: ui
145-
dockerfile: Dockerfile
146-
ports:
147-
- mode: ingress
148-
target: 3000
149-
deploy:
150-
resources:
151-
reservations:
152-
memory: 256M
153-
healthcheck:
154-
test: ["CMD","wget","--spider","http://localhost:3000"]
155-
interval: 10s
156-
timeout: 2s
157-
retries: 10
152+
ui:
153+
restart: unless-stopped
154+
build:
155+
context: ui
156+
dockerfile: Dockerfile
157+
ports:
158+
- mode: ingress
159+
target: 3000
160+
deploy:
161+
resources:
162+
reservations:
163+
memory: 256M
164+
healthcheck:
165+
test: ["CMD", "wget", "--spider", "http://localhost:3000"]
166+
interval: 10s
167+
timeout: 2s
168+
retries: 10
158169
environment:
159170
// highlight-next-line
160-
- OPENAI_BASE_URL=http://mistral:8000/v1/
171+
- OPENAI_BASE_URL=http://mistral:8000/v1/
161172
```
162173

163-
164174
## Step 5 - Deploy to Your Own AWS Account with Defang
165175

166176
Run the following command to deploy your service:

docusaurus.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ const config = {
6868
'https://github.com/DefangLabs/defang-docs/tree/main/',
6969
},
7070
blog: {
71+
blogSidebarCount: 'ALL', // Show all posts in sidebar
72+
blogSidebarTitle: 'All Posts', // Custom title
7173
showReadingTime: true,
7274
// Remove the editUrl property for the blog section
7375
},
@@ -188,6 +190,12 @@ const config = {
188190
],
189191
markdown: {
190192
mermaid: true,
193+
format: 'mdx',
194+
mdx1Compat: { //set to false for Docusaurus v3+ compatibility
195+
comments: false,
196+
admonitions: false,
197+
headingIds: false
198+
}
191199
},
192200
};
193201

0 commit comments

Comments
 (0)