aboutsummaryrefslogtreecommitdiffstats
path: root/ms/py-executor/README.md
blob: 58b4fc5c9c2da27d5e6aac16b7fc312d2c7f3fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Install virtual environments

```bash
python3 -m pip install --user virtualenv # Install virtualenv

python3 -m venv venv # Create virtual environment under py-executor path

source env/bin/activate # Activate the current virtualenv

pip install -r requirements.txt # Install the pip packages defined in requirements.txt file

```
## Generate TLS certificates

```bash
# Generate Server Certificates( chain and private keys ) using config file
openssl req -config py-executor.conf -new -x509 -newkey rsa:4096 -nodes -keyout py-executor-key.pem -days 3650 -out py-executor-chain.pem

# Verify the certificates generated
openssl x509 -in py-executor-chain.pem -text -noout
```

## Generate Python GRPC bindings from Proto file

```bash
cd blueprints_grpc/proto

# Remove Python generated files
rm *pb2*.py

#Generate proto python
python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. *.proto
```
fix the python import package issues.