Skip to content

Commit 32af478

Browse files
rough cut
1 parent 1884950 commit 32af478

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

docs/intro/how-it-works.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
sidebar_position: 250
3+
title: How it Works
4+
description: Overview of the Defang platform and how it works in your cloud
5+
---
6+
7+
# How Defang Works
8+
9+
Defang is a radically simpler way to develop, deploy, and debug applications in your favourite cloud. Defang abstracts away the complexity of cloud infrastructure and provides a streamlined experience to develop, deploy, and debug your cloud applications.
10+
11+
```mermaid
12+
13+
flowchart TD
14+
subgraph workspace["Local Workspace"]
15+
compose[compose.yaml]
16+
cli("Defang CLI")
17+
end
18+
19+
subgraph cloud["Cloud"]
20+
sdk(("SDK"))
21+
cd(cd)
22+
kaniko(Kaniko)
23+
24+
subgraph services["Your Services"]
25+
service1["Service 1"]
26+
service2["Service 2"]
27+
service3["Service 3"]
28+
end
29+
end
30+
31+
compose --> cli
32+
33+
cli <--> cd
34+
cd --> kaniko
35+
cd --> sdk
36+
sdk --> services
37+
38+
```
39+
40+
## Defang CD
41+
42+
The first time you deploy with Defang, we will create a new `cd` service in your cloud account. This service acts as an intermediary between you and your cloud provider. The Defang CLI will communicate with this service to orchestrate the build and deployment process for your services.
43+
44+
:::info
45+
This service does not run all the time. It is only used when you deploy a new service or update an existing service. Once it has finished deploying your service, it will shut itself down.
46+
:::
47+
48+
## Image Builds
49+
50+
When you deploy a new service, Defang will build a Docker image from your source code. `cd` will determine if your service's image needs to be rebuilt, and if it does it will start a new container for each build it needs to complete. Defang uses [Kaniko](https://github.com/GoogleContainerTools/kaniko/actions/workflows/images.yaml) to build your images in a container in your cloud account. The resulting images will be stored in your cloud account's private container registry for future reference. Defang will then deploy this image to your cloud account as a new service.
51+
52+
## Service Provisioning
53+
54+
Once your service's image has been built, Defang will provision cloud resources for your application's services. Defang uses the cloud provider's SDK to create the necessary resources for your services. This includes creating a new container, setting up networking, and configuring any other resources your service needs.

0 commit comments

Comments
 (0)