Skip to main content

Simplify deploying and managing Jina projects on Jina Cloud

Project description




JCloud logo: the command line interface that simplifies deploying and managing Jina projects on Jina Cloud


Simplify deploying and managing Jina projects on Jina Cloud

PyPI

☁️ To the cloud! - Smoothly deploy a local project as a cloud service. Radically easy, no brainfuck.

🎯 Cut to the chase - One CLI with five commands to manage the lifecycle of your Jina projects.

🎟️ Early free access - Sneak peek at our stealthy cloud hosting platform. Built on latest cloud-native tech stack, we now host your Jina project and offer computational and storage resources, for free!

Install

pip install jcloud
jc -h

Get Started

Login

jc login

You can use Google/Github account to register and login. Without login, you can do nothing.

Deploy a Jina Project

In Jina's idiom, a project is a Flow, which represents an end-to-end task such as indexing, searching, recommending. In the sequel, we will use "project" and "Flow" interchangeably.

A Flow can have two types of file structure:

  • A folder: just like a regular Python project, you can have sub-folders of Executor implementations; and a flow.yml on the top-level to connect all Executors together. You can create an example project folder via jc new. This is often used in prototyping.
  • A single YAML file: a self-contained YAML file, consisting of all configs at the Flow-level and Executor-level. Note that, all Executors' uses: must follow uses: jinahub+docker://MyExecutor (from Jina Hub) or uses: docker://your_dockerhub_org/MyExecutor (from Docker Hub) to avoid any local file dependency. This is often used in production.

Deploy a Flow from a folder

jc new ./hello
jc deploy ./hello

Deploy a Flow from a single YAML

The simplest toy.yml looks like the following:

jtype: Flow
executors: {}
jc deploy toy.yml

Flow is succefully deployed when you see:

You will get a Flow ID, say 84b8b495df. This ID is required to manage, view logs and remove the Flow.

As this Flow is deployed with default gRPC gateway (feel free changing it to http or websocket), you can use jina.Client to access it:

from jina import Client, Document

c = Client(host='grpcs://84b8b495df.wolf.jina.ai')
print(c.post('/', Document(text='hello')))

View logs

To watch the logs in realtime.

jc logs 84b8b495df

Remove a Flow

jc remove 84b8b495df

Get the status of a Flow

jc status 84b8b495df

List all Flows on the cloud

jc list

You can only see the Flows deployed by you.

Verbose logs

To make the output more verbose, you can add --loglevel DEBUG before each CLI subcommand, e.g.

jc --loglevel DEBUG deploy toy.yml

gives you more comprehensive output.

Support

Join Us

JCloud is backed by Jina AI and licensed under Apache-2.0. We are actively hiring AI engineers, solution engineers to build the next neural search ecosystem in open-source.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jcloud-0.0.12.tar.gz (21.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page