Skip to content

Commit

Permalink
fix: jcloud config reading
Browse files Browse the repository at this point in the history
  • Loading branch information
deepankarm committed Jul 18, 2023
1 parent 7af3d64 commit 753fc7f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 30 deletions.
33 changes: 10 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ You'll get a URL to access your newly deployed application along with the Swagge

Dive into understanding `fastapi-serve` through our comprehensive documentation and examples:

- 🚀 [Deploy a Simple FastAPI Application](docs/simple/)
- 🚀 **Getting Started**
- 🧱 [Deploy a Simple FastAPI Application](docs/simple/)
- 🖥️ [Dig deep into the `fastapi-serve` CLI](docs/CLI.md)
- ⚙️ [Understanding Configuration and Pricing](docs/CONFIG.MD)
- ↕️ **Scaling**
- 💹 [**Auto-scaling** endpoints based on CPU usage](docs/autoscaling/cpu/)
- 📉 **Serverless** (scale-to-zero) deployments based on requests-per-second (Example TBD!)
Expand All @@ -55,35 +58,19 @@ Dive into understanding `fastapi-serve` through our comprehensive documentation
- 💾 **Storage**
- 📁 [Handle File Uploads and Downloads with built-in **Blob Storage**](docs/file_handling/)
- 🌐 Network Storage for persisting and securely accessing app data (Example TBD!)
- 🔒 [Secure Your Endpoints with built-in **OAuth2.0 Authorization**](docs/authorization/)
- 🐳 Deployment with **Custom Dockerfile** (Coming Soon!)
- 🛠️ Export Your App for **Self-Hosting** with docker-compose / Kubernetes (Coming Soon!)
- 🔒 **Security**
- 👮‍♂️ [Secure Your Endpoints with built-in **OAuth2.0 Authorization**](docs/authorization/)
- 🐳 **Deployment Options**
- 🚢 Deployment with **Custom Dockerfile** (Coming Soon!)
- 🛠️ Export Your App for **Self-Hosting** with docker-compose / Kubernetes (Coming Soon!)


## 🖥️ `fastapi-serve` CLI

`fastapi-serve` comes with a simple CLI that allows you to deploy your FastAPI applications to the cloud with ease.

| Description | Command |
| --- | ---: |
| Deploy your app locally | `fastapi-serve deploy local app:app` |
| Deploy your app on JCloud | `fastapi-serve deploy jcloud app:app` |
| Update existing app on JCloud | `fastapi-serve deploy jcloud app:app --app-id <app-id>` |
| Get app status on JCloud | `fastapi-serve status <app-id>` |
| List all apps on JCloud | `fastapi-serve list` |
| Remove app on JCloud | `fastapi-serve remove <app-id>` |


## ⚙️💰 Configuration and Pricing

Read our [Configuration & Pricing Guide](examples/CONFIG.MD) to learn more about the various configuration options available to you and the pricing model for `fastapi-serve`.

## 💪 Support

If you encounter any problems or have questions, feel free to open an issue on the GitHub repository. You can also join our [Discord](https://discord.jina.ai/) to get help from our community members and the Jina team.


## Our Cloud Platform 🌐
## 🌐 Our Cloud Platform

`cloud.jina.ai` is our robust and scalable cloud platform designed to run your FastAPI applications with minimum hassle and maximum efficiency. With features like auto-scaling, integrated observability, and automated containerization, it provides a seamless and worry-free deployment experience.

Expand Down
15 changes: 15 additions & 0 deletions docs/CLI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## 🖥️ `fastapi-serve` CLI

> **Note**
> More to be added soon.
`fastapi-serve` comes with a simple CLI that allows you to deploy your FastAPI applications to the cloud with ease.

| Description | Command |
| --- | ---: |
| Deploy your app locally | `fastapi-serve deploy local app:app` |
| Deploy your app on JCloud | `fastapi-serve deploy jcloud app:app` |
| Update existing app on JCloud | `fastapi-serve deploy jcloud app:app --app-id <app-id>` |
| Get app status on JCloud | `fastapi-serve status <app-id>` |
| List all apps on JCloud | `fastapi-serve list` |
| Remove app on JCloud | `fastapi-serve remove <app-id>` |
24 changes: 17 additions & 7 deletions docs/CONFIG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ For example:

```
instance: C4
autoscale_min: 0
autoscale:
min: 0
max: 2
disk_size: 1.5G
```

Expand All @@ -22,7 +24,12 @@ If you don't provide a configuration file or a specific configuration isn't spec

```
instance: C3
autoscale_min: 1
timeout: 120
autoscale:
min: 1
max: 10
metric: cpu
target: 70
disk_size: 1G
```

Expand All @@ -38,7 +45,8 @@ Applications hosted on JCloud are priced in two categories:
- You can change the instance type and the minimum number of instances by providing a YAML configuration file using the `--config` option. For example, if you want to use instance type `C4` with a minimum of 0 replicas, and 2G EFS disk, you can provide the following configuration file:
```yaml
instance: C4
autoscale_min: 0
autoscale:
min: 0
disk_size: 2G
```
Expand All @@ -57,9 +65,10 @@ Applications hosted on JCloud are priced in two categories:
<summary><b>Example 1</b></summary>
Consider an HTTP application that has served requests for `10` minutes in the last hour and uses a custom config:
```
```yaml
instance: C4
autoscale_min: 0
autoscale:
min: 0
disk_size: 2G
```

Expand All @@ -79,9 +88,10 @@ Total credits per hour = 0.208 + 3.33 = 3.538
<summary><b>Example 2</b></summary>

Consider a WebSocket application that had active connections for 20 minutes in the last hour and uses the default configuration.
```
```yaml
instance: C3
autoscale_min: 1
autoscale:
min: 1
disk_size: 1G
```
Expand Down

0 comments on commit 753fc7f

Please sign in to comment.