Creating a Remote Jina Pod from Console with jinad¶


Before the start, make sure you have read the prerequisites for using jinad


In the simplest case, you may want to create a Pod on the remote. The most naive way is to log into the remote machine and start a pod using jina CLI. To avoid logging into the remote machine every time, we can use jinad to do the same thing. Furthermore, jinad offers a session management for the running Pods on the remote and saves you from manually creating and deleting Pods.

Here we start a simple Pod with the default configuration _logforward. The Pod forwards received messages and print the messages out in the logs. On the local, you can run the following command to start a remote pod.

jina pod --uses _logforward --host --port-expose 8000
▶️  /Users/nanwang/.pyenv/versions/3.7.5/bin/jina pod --uses _logforward --host --port-expose 8000
   [email protected][S]:created remote pod with id dcb5046e-554a-11eb-86b2-0ab9db700358
        [email protected][S]:ready and listening
   [email protected][I]:🌏 Fetching streamed logs from remote id: dcb5046e-554a-11eb-86b2-0ab9db700358
   🌏 [email protected][I]:input tcp:// (PULL_BIND) output tcp:// (PUSH_BIND) control over tcp:// (PAIR_BIND)
      🌏 [email protected][I]:ready and listening

Note: The logs starting with 🌏 are fetched from the remote Pod. Now we have already the Pod running remotely and we can check the connectivity.

jina ping 49993
▶️  /Users/nanwang/.pyenv/versions/3.7.5/bin/jina ping 49993
           [email protected][I]:ping tcp:// at 2 round...
           [email protected][I]:ping tcp:// at 2 round takes 1 second (1.23s)
           [email protected][S]:avg. latency: 1343 ms

What’s next?¶

You many also want to checkout the following articles. Creating a Remote Pod via Flow APIs Creating a Remote Flow