-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8275fb5
commit b536f3c
Showing
3 changed files
with
285 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,96 @@ jupyter: | |
|
||
## Introduction | ||
|
||
Ploomber Cloud is a platform that allows you to deploy Python applications. It provides a CLI to deploy your projects to the cloud and schedule tasks to run at specific times. It also provides a user interface to monitor your tasks and view their logs. | ||
Deploying artificial intelligence and machine learning applications can be a daunting task, especially when it comes to managing the underlying infrastructure. With Ploomber Cloud, you can enjoya platform where AI/ML applications can be deployed with minimal hassle. Here's a comprehensive guide to getting started with Ploomber Cloud and leveraging its deployment capabilities, including its CLI and integration with GitHub for continuous deployment. | ||
|
||
## Getting Started with Ploomber Cloud | ||
|
||
1. Sign Up | ||
First, head to the [Ploomber Cloud sign-up page](https://platform.ploomber.io/register) and create a free account using your email and a password. | ||
|
||
2. Confirm Your Email | ||
After signing up, check your inbox (and spam folder, just in case) for a confirmation email. Click the provided link to activate your account. | ||
|
||
3. Sign In | ||
Now, return to Ploomber Cloud and sign in with your credentials. | ||
|
||
4. Deploy Your First App | ||
Congratulations, you're all set! Next, explore how to deploy your first application. | ||
|
||
## Acquiring an API Key | ||
To interact with Ploomber Cloud, you'll need an [API key](https://docs.cloud.ploomber.io/en/latest/quickstart/apikey.html). After signing up, navigate to your account section and copy the API key. | ||
|
||
## Deploying Applications via Command-Line Interface | ||
|
||
Install the Ploomber Cloud package using `pip`: | ||
|
||
```bash | ||
pip install ploomber-cloud | ||
``` | ||
|
||
Next, set your API key as an environment variable: | ||
|
||
```bash | ||
ploomber-cloud key YOURKEY | ||
``` | ||
|
||
Initialize a New App | ||
|
||
```bash | ||
ploomber-cloud init | ||
``` | ||
|
||
This will create a `ploomber-cloud.json` file in the directory where you ran the command. This file contains the configuration for your project. You can edit this file to customize your project's configuration. This is what it looks like: | ||
|
||
```python | ||
{ | ||
"id": "APP_ID", | ||
"type": "APP_TYPE" | ||
} | ||
``` | ||
|
||
Where your `APP_ID` is a unique identifier for your project and `APP_TYPE` is the type of application you're deploying. Currently, Ploomber Cloud supports the following types of applications: | ||
|
||
|
||
|
||
After initialization, deploy your app using: | ||
|
||
```bash | ||
ploomber-cloud deploy | ||
``` | ||
|
||
The deploy command provides a URL for tracking your deployment's progress. | ||
|
||
## Integration with GitHub | ||
|
||
Start by storing your API key as a GitHub secret in your repository. This is crucial for GitHub Actions to deploy your projects securely. | ||
|
||
Configure GitHub Actions: | ||
|
||
Add a YAML file in ``.github/workflows/ploomber-cloud.yaml`` to your repository. This file will contain the workflow configuration. | ||
|
||
Sample Workflow Configuration | ||
|
||
```yaml | ||
name: Ploomber Cloud | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Deploy to Ploomber Cloud | ||
uses: ploomber/actions/[email protected] | ||
with: | ||
api-key: ${{ secrets.PLOOMBER_CLOUD_API_KEY }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters