From fde1e3b386c43033bd2be8331fb076e1d232dc41 Mon Sep 17 00:00:00 2001 From: Yazan Al-Yasin Date: Tue, 30 Jan 2024 20:54:51 +0400 Subject: [PATCH 1/6] Add ECS instances Fixes cloudera-labs/edge2ai-workshop#25 --- setup/terraform/manage-instances.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/terraform/manage-instances.sh b/setup/terraform/manage-instances.sh index 89b358a..ed26e8f 100755 --- a/setup/terraform/manage-instances.sh +++ b/setup/terraform/manage-instances.sh @@ -29,7 +29,7 @@ function list_instances() { printf "%-12s %-15s %-8s %-40s %s\n" $(echo "State Owner EndDate Name Id"; list_cloud_instances "$instance_ids") } -INSTANCE_IDS="$(cluster_instances | cluster_attr id) $(web_instance | web_attr id) $(ipa_instance | ipa_attr id)" +INSTANCE_IDS="$(cluster_instances | cluster_attr id) $(web_instance | web_attr id) $(ipa_instance | ipa_attr id) $(ecs_instances | ecs_attr id)" if [[ $ACTION == "list" ]]; then list_instances "$INSTANCE_IDS" From ee66edbf23c871796e8f3b6043248eece579c967 Mon Sep 17 00:00:00 2001 From: Yazan Al-Yasin Date: Tue, 30 Jan 2024 22:14:20 +0400 Subject: [PATCH 2/6] Add openssl11 Fixes cloudera-labs/edge2ai-workshop#27 --- setup/terraform/resources/common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/terraform/resources/common.sh b/setup/terraform/resources/common.sh index 8d46abb..c057eba 100644 --- a/setup/terraform/resources/common.sh +++ b/setup/terraform/resources/common.sh @@ -1329,6 +1329,8 @@ function deploy_cluster_prereqs() { yum_install nodejs gcc-c++ make shellinabox mosquitto transmission-cli rh-python38 rh-python38-python-devel httpd # Below is needed for secure clusters (required by Impyla) yum_install cyrus-sasl-md5 cyrus-sasl-plain cyrus-sasl-gssapi cyrus-sasl-devel + # SSB-LB-UI needs libssl.so.1.1 + yum_install --enablerepo=epel openssl11 } function resolve_host_addresses() { From 9574b0ebefc454b89c082cdaf0222cdaa61f04f5 Mon Sep 17 00:00:00 2001 From: Yazan Al-Yasin Date: Tue, 30 Jan 2024 22:29:21 +0400 Subject: [PATCH 3/6] Install GO v1.21.5 from tar Fixes cloudera-labs/edge2ai-workshop#28 --- setup/terraform/resources/setup-ecs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/terraform/resources/setup-ecs.sh b/setup/terraform/resources/setup-ecs.sh index 72854d4..41a7cf7 100644 --- a/setup/terraform/resources/setup-ecs.sh +++ b/setup/terraform/resources/setup-ecs.sh @@ -67,8 +67,11 @@ EOF create_certs "$IPA_HOST" log_status "ECS: Installing k9s" - yum_install golang + # install golang from tar cd /tmp + wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz + rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz + export PATH=$PATH:/usr/local/go/bin git clone https://github.com/derailed/k9s cd k9s/ make build From 618c95b18676df007e7d2c992ba9a97a6a10abfc Mon Sep 17 00:00:00 2001 From: Yazan Al-Yasin Date: Tue, 30 Jan 2024 22:34:16 +0400 Subject: [PATCH 4/6] Add jdk17 to support CEM 2.x Fixes cloudera-labs/edge2ai-workshop#29 --- setup/terraform/resources/setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/terraform/resources/setup.sh b/setup/terraform/resources/setup.sh index 5b02fe4..36f7248 100644 --- a/setup/terraform/resources/setup.sh +++ b/setup/terraform/resources/setup.sh @@ -222,6 +222,13 @@ EOF chkconfig --add efm chown -R root:root /opt/cloudera/cem/${EFM_BASE_NAME} sed -i.bak 's#APP_EXT_LIB_DIR=.*#APP_EXT_LIB_DIR=/usr/share/java#' /opt/cloudera/cem/efm/conf/efm.conf + if [[ $CEM_MAJOR_VERSION == 2 ]]; then + # Install JDK17 + mkdir -p /opt/jdk17 + retry_if_needed 5 5 "wget --progress=dot:giga https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz -O /tmp/jdk17.tar.gz" + tar -zxf /tmp/jdk17.tar.gz -C /opt/jdk17 + echo "JAVA_HOME=/opt/jdk17/jdk-17.0.2" >> /opt/cloudera/cem/efm/conf/efm.conf + fi fi MINIFI_TARBALL=$(find /opt/cloudera/cem/ -name "minifi-[0-9]*-bin.tar.gz" | sort | tail -1) From 5553b6b1daa18e855e6cca33c70b67deb6807b6d Mon Sep 17 00:00:00 2001 From: Yazan Al-Yasin Date: Tue, 30 Jan 2024 22:57:17 +0400 Subject: [PATCH 5/6] Install dependencies on python38 for ECS 1.5.2 Fixes cloudera-labs/edge2ai-workshop#30 --- setup/terraform/resources/setup-ecs.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setup/terraform/resources/setup-ecs.sh b/setup/terraform/resources/setup-ecs.sh index 41a7cf7..51f8cb8 100644 --- a/setup/terraform/resources/setup-ecs.sh +++ b/setup/terraform/resources/setup-ecs.sh @@ -35,6 +35,17 @@ if [[ $ACTION == "install-prereqs" ]]; then fi deploy_os_prereqs + # Install dependencies on python38 for ECS 1.5.2 + yum_install centos-release-scl + yum_install rh-python38 rh-python38-python-devel + # Enable python38 and add yaml + enable_py3 + pip install --quiet --upgrade pip pyyaml + rm -f /usr/bin/python3 /usr/bin/pip3 /usr/local/bin/python3.8 + ln -s /opt/rh/rh-python38/root/bin/python3 /usr/bin/python3 + ln -s /opt/rh/rh-python38/root/bin/pip3 /usr/bin/pip3 + ln -s /opt/rh/rh-python38/root/usr/bin/python3.8 /usr/local/bin/python3.8 + complete_host_initialization "ecs" log_status "Ensure domain search list only contains ec2.internal, and not nip.io" From 1510fe840f374d57566463d525bcb69b174ea1f9 Mon Sep 17 00:00:00 2001 From: Yazan Al-Yasin Date: Wed, 20 Mar 2024 13:50:50 +0400 Subject: [PATCH 6/6] Revert "Add jdk17 to support CEM 2.x" This reverts commit 618c95b18676df007e7d2c992ba9a97a6a10abfc. --- setup/terraform/resources/setup.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/setup/terraform/resources/setup.sh b/setup/terraform/resources/setup.sh index 36f7248..5b02fe4 100644 --- a/setup/terraform/resources/setup.sh +++ b/setup/terraform/resources/setup.sh @@ -222,13 +222,6 @@ EOF chkconfig --add efm chown -R root:root /opt/cloudera/cem/${EFM_BASE_NAME} sed -i.bak 's#APP_EXT_LIB_DIR=.*#APP_EXT_LIB_DIR=/usr/share/java#' /opt/cloudera/cem/efm/conf/efm.conf - if [[ $CEM_MAJOR_VERSION == 2 ]]; then - # Install JDK17 - mkdir -p /opt/jdk17 - retry_if_needed 5 5 "wget --progress=dot:giga https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz -O /tmp/jdk17.tar.gz" - tar -zxf /tmp/jdk17.tar.gz -C /opt/jdk17 - echo "JAVA_HOME=/opt/jdk17/jdk-17.0.2" >> /opt/cloudera/cem/efm/conf/efm.conf - fi fi MINIFI_TARBALL=$(find /opt/cloudera/cem/ -name "minifi-[0-9]*-bin.tar.gz" | sort | tail -1)