From be15534332dfd61054a217b7a079c534d092c374 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Fri, 30 Aug 2019 19:19:37 +0500 Subject: [PATCH] a --- app/file.py | 3 ++- app/host.py | 3 ++- app/image.py | 3 ++- app/scheduler.py | 3 ++- init.sh | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/file.py b/app/file.py index b28cdcd..db9e731 100644 --- a/app/file.py +++ b/app/file.py @@ -49,8 +49,9 @@ def setup(path, base_dir, file_prefix, etcd_url, etcd_password): url="https://code.ungleich.ch/ahmedbilal/etcd3_wrapper", ) + op_result.add(PipenvOperation.create, path=repo_name, site_packages=True) op_result.add(PipenvOperation.install, path=repo_name) - + # Write Crontab entry with open("/etc/crontabs/root", "a") as crontab: crontab.write( diff --git a/app/host.py b/app/host.py index ecf7bad..6beff32 100644 --- a/app/host.py +++ b/app/host.py @@ -63,4 +63,5 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, etcd_passwor dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), ) - op_result.add(PipenvOperation.install, path=repo_name) + op_result.add(PipenvOperation.create, path=repo_name, site_packages=True) + op_result.add(PipenvOperation.install, path=repo_name) \ No newline at end of file diff --git a/app/image.py b/app/image.py index b1fa727..c6c18bd 100644 --- a/app/image.py +++ b/app/image.py @@ -47,8 +47,9 @@ def setup(path, base_dir, etcd_url, etcd_password): url="https://code.ungleich.ch/ahmedbilal/etcd3_wrapper", ) + op_result.add(PipenvOperation.create, path=repo_name, site_packages=True) op_result.add(PipenvOperation.install, path=repo_name) - + # Write Crontab entry with open("/etc/crontabs/root", "a") as crontab: crontab.write( diff --git a/app/scheduler.py b/app/scheduler.py index 48a5e36..070a30b 100644 --- a/app/scheduler.py +++ b/app/scheduler.py @@ -63,4 +63,5 @@ def setup(path, vm_prefix, host_prefix, request_prefix, etcd_url, etcd_password) dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), ) - op_result.add(PipenvOperation.install, path=repo_name) + op_result.add(PipenvOperation.create, path=repo_name, site_packages=True) + op_result.add(PipenvOperation.install, path=repo_name) \ No newline at end of file diff --git a/init.sh b/init.sh index abc5061..be5f388 100644 --- a/init.sh +++ b/init.sh @@ -18,7 +18,7 @@ apk add python3 ceph py2-pip py3-pip # Some python package dependencies apk add libffi-dev openssl-dev make alpine-sdk gcc g++ python3-dev -apk add py3-grpcio +apk add py3-grpcio pip3 install --upgrade pip pip2 install --upgrade pip