You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/02/24 15:30:46 UTC

[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]: changed command for mongodb-org installation

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
     new 693dd0d  [DATALAB-2091]: changed command for mongodb-org installation
693dd0d is described below

commit 693dd0d55e889d1ce12a91be58e34241b540f812
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Feb 24 17:30:33 2021 +0200

    [DATALAB-2091]: changed command for mongodb-org installation
---
 infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
index 024cc8f..9d537f3 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -165,9 +165,10 @@ def ensure_mongo():
     try:
         if not exists(datalab.fab.conn,os.environ['ssn_datalab_path'] + 'tmp/mongo_ensured'):
             datalab.fab.conn.sudo('wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -')
-            datalab.fab.conn.sudo('bash -c "ver=`lsb_release -cs`; touch /etc/apt/sources.list.d/mongodb-org-4.4.list; '
-                                  'echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $ver/mongodb-org/4.4 '
-                                  'multiverse\" >> /etc/apt/sources.list.d/mongodb-org-4.4.list; apt update"')
+            os_version = datalab.fab.conn.sudo('lsb_release -cs').stdout.replace('\n', '')
+            datalab.fab.conn.sudo('echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu '
+                                  '{}/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list; '
+                                  'apt update'.format(os_version))
             datalab.fab.conn.sudo('ls -lah /etc/apt/sources.list.d/mongodb-org-4.4.list')
             manage_pkg('-y install', 'remote', 'mongodb-org')
             datalab.fab.conn.sudo('systemctl enable mongod.service')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org