From a1de428e3440fd596264b82ac29b1a0a914a3060 Mon Sep 17 00:00:00 2001 From: Cory Zue Date: Wed, 6 Dec 2023 10:39:04 +0200 Subject: [PATCH 1/3] use fabric3 --- deploy/malawi/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/malawi/dev-requirements.txt b/deploy/malawi/dev-requirements.txt index b41cc8078..fa5a6af93 100644 --- a/deploy/malawi/dev-requirements.txt +++ b/deploy/malawi/dev-requirements.txt @@ -1 +1 @@ -fabric==1.14.1 +Fabric3==1.14.post1 From d963dcd350cf41991b821fec134ee1e2d354dde6 Mon Sep 17 00:00:00 2001 From: Cory Zue Date: Wed, 6 Dec 2023 10:39:10 +0200 Subject: [PATCH 2/3] add note to install fabric --- docs/systems-administration/common-tasks.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/systems-administration/common-tasks.md b/docs/systems-administration/common-tasks.md index 6ceb976b0..57a17eac2 100644 --- a/docs/systems-administration/common-tasks.md +++ b/docs/systems-administration/common-tasks.md @@ -3,7 +3,9 @@ Common System Administration Tasks ## Deploying Code -To deploy code you must first connect to the VPN. Then run: +Deploying code requires installing fabric3 (`pip install -r requrements/deploy/dev-requirements.txt`). + +Then, to deploy you must first connect to the VPN. Then run: ``` fab malawi deploy From dffe4e277ecb621e2c57c1e3d6b913cfa3db0b9a Mon Sep 17 00:00:00 2001 From: Cory Zue Date: Wed, 6 Dec 2023 11:34:29 +0200 Subject: [PATCH 3/3] update directories / IPs --- fabfile.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fabfile.py b/fabfile.py index 3285ef40b..a2561b99e 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,7 +1,7 @@ from fabric.api import * -VIRTUALENV_HOME = '/home/dimagi/.virtualenvs/cstock/bin' +VIRTUALENV_HOME = '/home/cstock/.virtualenvs/cstock/bin/' PIP = f'{VIRTUALENV_HOME}/pip' PYTHON = f'{VIRTUALENV_HOME}/python' @@ -10,9 +10,8 @@ def malawi(): """ Malawi configuration """ - env.deploy_dir = '/home/dimagi/src' - env.hosts = ['dimagi@10.84.168.89'] - env.code_dir = f'{env.deploy_dir}/logistics' + env.hosts = ['cstock@10.10.100.77'] + env.code_dir = '/home/cstock/www/cstock/code_root' env.branch = "main"