Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add jina ai cloud restructure jcloud and hub #5298

Merged
merged 16 commits into from
Oct 23, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Applications built with Jina enjoy the following features out of the box:
- Async and non-blocking data processing over dynamic flows.

☁️ **Cloud-native**
- Seamless Docker container integration: sharing, exploring, sandboxing, versioning and dependency control via [Jina Hub](https://hub.jina.ai).
- Seamless Docker container integration: sharing, exploring, sandboxing, versioning and dependency control via [Executor Hub](https://hub.jina.ai).
- Full observability via Prometheus and Grafana.
- Fast deployment to Kubernetes, Docker Compose.

Expand Down Expand Up @@ -338,15 +338,15 @@ executors:

### Seamless Container integration

Without having to worry about dependencies, you can easily share your Executors with others; or use public/private Executors in your project thanks to [Jina Hub](https://hub.jina.ai).
Without having to worry about dependencies, you can easily share your Executors with others; or use public/private Executors in your project thanks to [Executor Hub](https://hub.jina.ai).

To create an Executor:

```bash
jina hub new
```

To push it to Jina Hub:
To push it to Executor Hub:

```bash
jina hub push .
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The term "final release" is relative to "developmental release" as described bel
The recommended way of installing Jina is `pip install -U jina`

`"standard"` include extra dependencies that enables:
- Jina Hub + Docker support
- Executor Hub + Docker support
- FastAPI + Websocket support (required when using `Flow(protocol='http')` or `Flow(protocol='websocket')`)
- the best compression via LZ4 algorithm
- the best async eventloop management via `uvloop`
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/executor/containerize-executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Once you understand what an {class}`~jina.Executor` is and how to use it inside a {class}`~jina.Flow`, you may want to wrap it into a container so you can isolate its dependencies and make it ready to run in the cloud or Kubernetes.

````{tip}
The recommended way to containerize an Executor is to leverage {ref}`Jina Hub <jina-hub>` to ensure your Executor can run as a container. It handles auto-provisioning, building, version control, etc:
The recommended way to containerize an Executor is to leverage {ref}`Executor Hub <jina-hub>` to ensure your Executor can run as a container. It handles auto-provisioning, building, version control, etc:

```bash
jina hub new
Expand Down
6 changes: 3 additions & 3 deletions docs/fundamentals/executor/executor-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You can use {class}`~jina.Executor` objects directly, just like a regular Python object.

There are two ways to instantiate an Executor object: From a local Python class, or from Jina Hub:
There are two ways to instantiate an Executor object: From a local Python class, or from Executor Hub:

````{tab} From local Python
You can use `Executor` objects directly, just like a regular Python object:
Expand Down Expand Up @@ -31,8 +31,8 @@ Text: hello world



````{tab} From Jina Hub
You can pull an Executor from Jina Hub and use it directly as a Python object. [Jina Hub](https://hub.jina.ai/) is our marketplace for Executors.
````{tab} From Executor Hub
You can pull an Executor from Executor Hub and use it directly as a Python object. [Executor Hub](https://hub.jina.ai/) is our marketplace for Executors.

```python
from docarray import Document, DocumentArray
Expand Down
8 changes: 4 additions & 4 deletions docs/fundamentals/executor/executor-serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ Executor.to_kubernetes_yaml(
```shell
kubectl apply -R -f /tmp/config_out_folder
```
The above example deploys the `DummyHubExecutor` from Jina Hub into your Kubernetes cluster.
The above example deploys the `DummyHubExecutor` from Executor Hub into your Kubernetes cluster.

````{admonition} Hint
:class: hint
The Executor you use needs to be already containerized and stored in a registry accessible from your Kubernetes cluster. We recommend Jina Hub for this.
The Executor you use needs to be already containerized and stored in a registry accessible from your Kubernetes cluster. We recommend Executor Hub for this.
````

(external-shared-executor)=
Expand Down Expand Up @@ -120,10 +120,10 @@ Executor.to_docker_compose_yaml(
```shell
docker-compose -f /tmp/docker-compose.yml up
```
The above example runs the `DummyHubExecutor` from Jina Hub locally on your computer using Docker Compose.
The above example runs the `DummyHubExecutor` from Executor Hub locally on your computer using Docker Compose.

````{admonition} Hint
:class: hint
The Executor you use needs to be already containerized and stored in an accessible registry. We recommend Jina Hub for this.
The Executor you use needs to be already containerized and stored in an accessible registry. We recommend Executor Hub for this.
````

8 changes: 4 additions & 4 deletions docs/fundamentals/executor/hub/create-hub-executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MyExecutor/
```

- `executor.py` contains your Executor's main logic.
- `config.yml` is the Executor's {ref}`configuration <executor-yaml-spec>` file, where you can define `__init__` arguments using the `with` keyword. You can also define meta annotations relevant to the Executor, for getting better exposure on Jina Hub.
- `config.yml` is the Executor's {ref}`configuration <executor-yaml-spec>` file, where you can define `__init__` arguments using the `with` keyword. You can also define meta annotations relevant to the Executor, for getting better exposure on Executor Hub.
- `requirements.txt` describes the Executor's Python dependencies.
- `README.md` describes how to use your Executor.
- `Dockerfile` is only generated if you choose advanced configuration.
Expand All @@ -49,11 +49,11 @@ In the `jina hub new` wizard you can choose from four Dockerfile templates: `cpu
```


* You don't need need to bump the Jina version
* You don't need to bump the Jina version

Hub Executors are version-agnostic. When you pull an Executor from Jina Hub, it will select the right Jina version for you. You don't need to upgrade your version of Jina.
Hub Executors are version-agnostic. When you pull an Executor from Executor Hub, it will select the right Jina version for you. You don't need to upgrade your version of Jina.


* Fill in metadata of your Executor correctly

Information you include under the `metas` key in `config.yml` is displayed on Jina Hub. `The specification can be found here<config.yml>`.
Information you include under the `metas` key in `config.yml` is displayed on Executor Hub. `The specification can be found here<config.yml>`.
2 changes: 1 addition & 1 deletion docs/fundamentals/executor/hub/hub-portal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Portal

Jina Hub is a marketplace for {class}`~jina.Executor`s where you can upload your own Executors or use ones already developed by the community. If this is your first time developing an Executor you can check our {ref}`tutorials <create-hub-executor>` that guide you through the process.
Executor Hub is a marketplace for {class}`~jina.Executor`s where you can upload your own Executors or use ones already developed by the community. If this is your first time developing an Executor you can check our {ref}`tutorials <create-hub-executor>` that guide you through the process.

Let's see the [Hub portal](https://hub.jina.ai) in detail.

Expand Down
6 changes: 3 additions & 3 deletions docs/fundamentals/executor/hub/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(jina-hub)=
# Hub
# Executor Hub

Now that you understand that {class}`~jina.Executor` is a building block in Jina, you may also wonder:

Expand All @@ -13,11 +13,11 @@ Basically, something like the following:
:align: center
```

**Yes!** This is exactly the purpose of Jina Hub - a marketplace for Executors. With Hub you can pull prebuilt
**Yes!** This is exactly the purpose of Executor Hub - a marketplace for Executors. With Hub you can pull prebuilt
Executors to dramatically reduce the effort and complexity needed in your search system, or push your own custom
Executors to share privately or publicly.

A Hub Executor is an Executor published on Jina Hub. You can use such an Executor in a Flow:
A Hub Executor is an Executor published on Executor Hub. You can use such an Executor in a Flow:

```python
from jina import Flow
Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/executor/hub/push-executor.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(push-executor)=
# Publish

If you want to share your {class}`~jina.Executor`, you can push it to Jina Hub.
If you want to share your {class}`~jina.Executor`, you can push it to Executor Hub.

There are two ways to share:
- **Public** (default): Anyone can use public Executors without any restrictions.
Expand All @@ -25,7 +25,7 @@ If you haven't logged into Jina, it will return `NAME` and `SECRET`. You need th
If you are logged into the Hub using our CLI tools (`jina auth login` or `jcloud login`), you can push and pull your Executors without `SECRET`.
````

You can then visit [Jina Hub](https://hub.jina.ai), select the "Recent" tab and see your published Executor.
You can then visit [Executor Hub](https://hub.jina.ai), select the "Recent" tab and see your published Executor.

````{admonition} Note
:class: note
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/executor/hub/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Sandbox is serverless. It will not be removed immediately after the Flow is clos

**Sandboxes are shared with other users**. Sometimes you can access the sandbox quickly because other users have already started it.

Jina Hub finds existing sandbox based on three factors:
Executor Hub finds existing sandbox based on three factors:
alexcg1 marked this conversation as resolved.
Show resolved Hide resolved
- Executor name
- Executor tag
- Jina version of the driver program
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/executor/hub/use-hub-executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ You can disable automatic volume setting by passing `f.add(..., disable_auto_vol

## Use in Flow via source code

Use the source code from Jina Hub in your Python code:
Use the source code from Executor Hub in your Python code:

```python
from jina import Flow
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/executor/yaml-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ List of strings defining the Executor's Python dependencies. Most notably this m
### `metas`
Collection containing meta-information about the Executor.

Your Executor is annotated with this information when publishing to Jina Hub. To get better appeal on Jina Hub, set the `metas` fields to the correct values:
Your Executor is annotated with this information when publishing to Executor Hub. To get better appeal on Executor Hub, set the `metas` fields to the correct values:

- **`name`**: Human-readable name of the Executor.
- **`description`**: Human-readable description of the Executor.
Expand Down
8 changes: 4 additions & 4 deletions docs/fundamentals/flow/add-executors.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ An {class}`~jina.Executor`'s type is defined by the `uses` keyword. Note that so
| ✅ | ❌ | `ExecutorClass` | Use `ExecutorClass` from the inline context. |
| ✅ | ❌ | `'my.py_modules.ExecutorClass'` | Use `ExecutorClass` from `my.py_modules`. |
| ✅ | ✅ | `'executor-config.yml'` | Use an Executor from a YAML file defined by {ref}`Executor YAML interface <executor-yaml-spec>`. |
| ✅ | ❌ | `'jinahub://TransformerTorchEncoder/'` | Use an Executor as Python source from Jina Hub. |
| ✅ | ✅ | `'jinahub+docker://TransformerTorchEncoder'` | Use an Executor as a Docker container from Jina Hub. |
| ✅ | ✅ | `'jinahub+sandbox://TransformerTorchEncoder'` | Use a {ref}`Sandbox Executor <sandbox>` hosted on Jina Hub. The Executor runs remotely on Jina Hub. |
| ✅ | ❌ | `'jinahub://TransformerTorchEncoder/'` | Use an Executor as Python source from Executor Hub. |
| ✅ | ✅ | `'jinahub+docker://TransformerTorchEncoder'` | Use an Executor as a Docker container from Executor Hub. |
| ✅ | ✅ | `'jinahub+sandbox://TransformerTorchEncoder'` | Use a {ref}`Sandbox Executor <sandbox>` hosted on Executor Hub. The Executor runs remotely on Executor Hub. |
| ✅ | ❌ | `'docker://sentence-encoder'` | Use a pre-built Executor as a Docker container. |


Expand Down Expand Up @@ -424,7 +424,7 @@ different_name

Different {class}`~jina.Executor`s in a {class}`~jina.Flow` may depend on different `types` for array-like data such as `doc.tensor` and `doc.embedding`,
often because they were written with different machine learning frameworks.
As the builder of a Flow you don't always have control over this, for example when using Executors from Jina Hub.
As the builder of a Flow you don't always have control over this, for example when using Executors from Executor Hub.

To ease the integration of different Executors, a Flow allows you to convert `tensor` and `embedding`
by using the `f.add(..., output_array_type=..)`:
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/flow/create-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ For advanced utilisation of Kubernetes with Jina please refer to {ref}`How to <k


```{tip}
Based on your local Jina version, Jina Hub may rebuild the Docker image during the YAML generation process.
Based on your local Jina version, Executor Hub may rebuild the Docker image during the YAML generation process.
If you do not wish to rebuild the image, set the environment variable `JINA_HUB_NO_IMAGE_REBUILD`.
```

Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/flow/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The most important methods of the `Flow` object are the following:
| {meth}`~jina.clients.mixin.PostMixin.post()` | Sends requests to the Flow API. |
| {meth}`~jina.Flow.block()` | Blocks execution until the program is terminated. This is useful to keep the Flow alive so it can be used from other places (clients, etc). |
| {meth}`~jina.Flow.to_docker_compose_yaml()` | Generates a Docker-Compose file listing all Executors as services. |
| {meth}`~jina.Flow.to_kubernetes_yaml()` | Generates Kubernetes configuration files in `<output_directory>`. Based on your local Jina version, Jina Hub may rebuild the Docker image during the YAML generation process. If you do not wish to rebuild the image, set the environment variable `JINA_HUB_NO_IMAGE_REBUILD`. |
| {meth}`~jina.Flow.to_kubernetes_yaml()` | Generates Kubernetes configuration files in `<output_directory>`. Based on your local Jina version, Executor Hub may rebuild the Docker image during the YAML generation process. If you do not wish to rebuild the image, set the environment variable `JINA_HUB_NO_IMAGE_REBUILD`. |
| {meth}`~jina.clients.mixin.HealthCheckMixin.is_flow_ready()` | Check if the Flow is ready to process requests. Returns a boolean indicating the readiness. |

## Why should you use a Flow?
Expand Down
15 changes: 2 additions & 13 deletions docs/fundamentals/jcloud/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(jcloud)=
# JCloud
# JCloud Hosting


```{toctree}
Expand Down Expand Up @@ -44,17 +44,6 @@ In case the command `jc` is already occupied by another tool, use `jcloud` inste

For the rest of this section, we use `jc` or `jcloud`. But again they are interchangable with `jina cloud`.


### Log in

```bash
jc login
```

You can use a Google or GitHub account to register and log in. For all the next steps, logging in is mandatory.

If you have no access to a web browser in your integration environment, you can set the environment variable `JINA_AUTH_TOKEN` using an authentication token before working with JCloud. Authentication tokens can be generated by user login or Personal Access Token (PAT) creation. Please visit [jina-auth](https://github.com/jina-ai/auth) for more information (`jc` already includes `jina-auth`.)

### Deploy

In Jina's idiom, a project is a [Flow](https://docs.jina.ai/fundamentals/flow/), which represents an end-to-end task such as indexing, searching or recommending. In this document, we use "project" and "Flow" interchangeably.
Expand All @@ -69,7 +58,7 @@ A Flow can have two types of file structure: a single YAML file or a project fol

A self-contained YAML file, consisting of all configuration at the [Flow](https://docs.jina.ai/fundamentals/flow/)-level and [Executor](https://docs.jina.ai/fundamentals/executor/)-level.

> All Executors' `uses` must follow the format `jinahub+docker://MyExecutor` (from [Jina Hub](https://hub.jina.ai)) to avoid any local file dependencies:
> All Executors' `uses` must follow the format `jinahub+docker://MyExecutor` (from [Executor Hub](https://hub.jina.ai)) to avoid any local file dependencies:

```yaml
# flow.yml
Expand Down