Remote Python Executor (RPE) Installation
On this Page
- 1 Overview
- 2 Steps
- 2.1 SSH to the Node
- 2.2 Install Docker
- 2.3 Start RPE
- 2.4 Custom Image
Overview
Remote Python Script Snap can execute a Python script natively on local or remote Python executors. The Remote Python Executor (RPE) can be installed either on the same node as the Snaplex or on a remote node that is accessible by the Snaplex.
Steps
Establish an SSH connection to the node.
Install Docker CE.
Create and start the RPE container.
SSH to the Node
Establish an SSH connection to the node where you want to install the RPE. The latter steps may require root access.
Install Docker
Follow the instructions on the official Docker site to install Docker CE on your machine. To install Docker on specific operating systems use the following links:
The Remote Python Execute can be installed only on Groundplexes and not on Cloudplexes.
Start RPE
Docker Images
A Docker container is an instance created from a Docker image. We provide RPE as a Docker image, which you can download from here. This is the type available: min: the minimal version for CPU instances.
CPU Instance
Execute the following command to start the RPE container minimal version:
sudo docker pull snaplogic/rpe:min
sudo docker run --memory-swap="-1" --restart=always -dti -p 5301:5301 -e "REMOTE_PYTHON_EXECUTOR_TOKEN=" -v /opt/remote_python_executor_log/:/opt/remote_python_executor_log/ --name=rpe snaplogic/rpe:min
Options
Option | Format | Description |
---|---|---|
|
| The container can use unlimited space for memory swapping. See Memory Swap for more information. "–restart=always" automatically restarts the docker container if the machine restarts. |
|
| The RPE is accessible from the host port which is 5301 by default. You may change the host port to support multiple containers on the same node. |
|
| The default token is empty. A strong token is recommended. |
|
| The log is mounted to /opt/remote_python_executor_log/by default. This location can be changed. |
|
| The container’s name can be changed in case of multiple containers on the same node. |
Manage RPE
Since the RPE starts with the container, use the following commands to start, stop, restart, and remove the RPE.
sudo docker start rpe
sudo docker stop rpe
sudo docker restart rpe
sudo docker rm rpe
Custom Image
Download the custom RPE package. This package contains Dockerfile and others. You can modify the Dockerfile and add required libraries in requirements.txt. Then, run the following command to build the Docker image.
Make sure to run cd into the directory containing the Dockerfile.
sudo docker build --no-cache -t snaplogic_custom_rpe .
Once the image is built, execute the following command to create and start the custom RPE container.
Â
Related content
Docker installation:
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.