dlab-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omartushevs...@apache.org
Subject [incubator-dlab] branch DLAB-1158 updated: fixed issue with permissions
Date Thu, 16 Jan 2020 15:25:09 GMT
This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-1158
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-1158 by this push:
     new b0c1d4b  fixed issue with permissions
b0c1d4b is described below

commit b0c1d4bf8e4d3c6d19bd931919963c832f837bdc
Author: Oleh Martushevskyi <Oleh_Martushevskyi@epam.com>
AuthorDate: Thu Jan 16 17:24:55 2020 +0200

    fixed issue with permissions
---
 infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py | 2 +-
 infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py | 2 +-
 infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py | 2 +-
 infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
index 7f5c9c8..2c5a138 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
@@ -67,7 +67,7 @@ def install_nginx_lua(edge_ip, nginx_version, keycloak_auth_server_url,
keycloak
             sudo('apt-get -y install gcc build-essential make automake zlib1g-dev libpcre++-dev
libssl-dev git libldap2-dev libc6-dev libgd-dev libgeoip-dev libpcre3-dev apt-utils autoconf
liblmdb-dev libtool libxml2-dev libyajl-dev pkgconf liblua5.1-0 liblua5.1-0-dev libreadline-dev
libreadline6-dev libtinfo-dev libtool-bin lua5.1 zip readline-doc')
             if os.environ['conf_stepcerts_enabled'] == 'true':
                 sudo('mkdir -p /home/{0}/keys'.format(user))
-                sudo('echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt'.format(
+                sudo('bash -c \'echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt\''.format(
                      os.environ['conf_stepcerts_root_ca']))
                 fingerprint = sudo('step certificate fingerprint /etc/ssl/certs/root_ca.crt')
                 sudo('step ca bootstrap --fingerprint {0} --ca-url "{1}"'.format(fingerprint,
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py
index 25a28cc..d4832b7 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py
@@ -72,7 +72,7 @@ def install_nginx_ldap(edge_ip, nginx_version, ldap_ip, ldap_dn, ldap_ou,
ldap_s
                 'yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel git
openldap-devel')
             if os.environ['conf_stepcerts_enabled'] == 'true':
                 sudo('mkdir -p /home/{0}/keys'.format(user))
-                sudo('echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt'.format(
+                sudo('bash -c \'echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt\''.format(
                      os.environ['conf_stepcerts_root_ca']))
                 fingerprint = sudo('step certificate fingerprint /etc/ssl/certs/root_ca.crt')
                 sudo('step ca bootstrap --fingerprint {0} --ca-url "{1}"'.format(fingerprint,
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index 0cf8e4d..865cedb 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -133,7 +133,7 @@ def configure_ssl_certs(hostname, custom_ssl_cert):
             if os.environ['conf_stepcerts_enabled'] == 'true':
                 ensure_step(args.os_user)
                 sudo('mkdir -p /home/{0}/keys'.format(args.os_user))
-                sudo('echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt'.format(
+                sudo('bash -c \'echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt\''.format(
                      os.environ['conf_stepcerts_root_ca']))
                 fingerprint = sudo('step certificate fingerprint /etc/ssl/certs/root_ca.crt')
                 sudo('step ca bootstrap --fingerprint {0} --ca-url "{1}"'.format(fingerprint,
diff --git a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
index 9d4426df..8746bc6 100644
--- a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
+++ b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
@@ -104,7 +104,7 @@ def ensure_step_certs():
             conn.sudo('wget https://github.com/smallstep/cli/releases/download/v0.13.3/step-cli_0.13.3_amd64.deb
'
                       '-O /tmp/step-cli_0.13.3_amd64.deb')
             conn.sudo('dpkg -i /tmp/step-cli_0.13.3_amd64.deb')
-            conn.sudo('echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt'.format(args.step_root_ca))
+            conn.sudo('bash -c \'echo "{0}" | base64 --decode > /etc/ssl/certs/root_ca.crt\''.format(args.step_root_ca))
             fingerprint = conn.sudo('step certificate fingerprint /etc/ssl/certs/root_ca.crt').stdout.replace('\n',
'')
             conn.sudo('step ca bootstrap --fingerprint {0} --ca-url "{1}"'.format(fingerprint,
                                                                                   args.step_ca_url))


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


Mime
View raw message