You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by gu...@apache.org on 2022/05/11 02:00:09 UTC
[incubator-hugegraph-computer] 01/02: update ci install hdsf
This is an automated email from the ASF dual-hosted git repository.
guoshoujing pushed a commit to branch setup-hdfs
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git
commit 8f3411c323ff88ce722e4b7420bb2443059b88ee
Author: ShouJing <10...@qq.com>
AuthorDate: Wed May 11 09:56:49 2022 +0800
update ci install hdsf
---
.github/workflows/ci.yml | 11 ++---
computer-dist/src/assembly/travis/install-hdsf.sh | 55 +++++++++++++++++++++++
2 files changed, 59 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2c4e58ec..0ff6f82e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,14 +24,11 @@ jobs:
java-version: '8'
distribution: 'zulu'
- - name: Setup Python3
- uses: actions/setup-python@v2
- with:
- python-version: '3.8'
- name: Setup Hdfs
- uses: beyondstorage/setup-hdfs@master
- with:
- hdfs-version: '3.3.1'
+ env:
+ HDFS_VERSION: '3.3.1'
+ run:
+ $TRAVIS_DIR/install-env.sh $HDFS_VERSION
- name: Setup Minikube-Kubernetes
uses: manusa/actions-setup-minikube@v2.4.2
diff --git a/computer-dist/src/assembly/travis/install-hdsf.sh b/computer-dist/src/assembly/travis/install-hdsf.sh
new file mode 100644
index 00000000..254db10e
--- /dev/null
+++ b/computer-dist/src/assembly/travis/install-hdsf.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+set -ev
+
+UBUNTU_VERSION=$(lsb_release -r | awk '{print substr($2,0,2)}')
+
+sudo tee /etc/apt/sources.list.d/hdp.list <<EOF
+deb http://public-repo-1.hortonworks.com/HDP/ubuntu${UBUNTU_VERSION}/2.x/updates/2.6.5.0 HDP main
+EOF
+
+sudo apt-get update
+
+sudo mkdir -p /etc/hadoop/conf
+sudo tee /etc/hadoop/conf/core-site.xml <<EOF
+<configuration>
+ <property>
+ <name>fs.defaultFS</name>
+ <value>hdfs://localhost:8020</value>
+ </property>
+</configuration>
+EOF
+
+sudo tee /etc/hadoop/conf/hdfs-site.xml <<EOF
+<configuration>
+ <property>
+ <name>dfs.namenode.name.dir</name>
+ <value>/opt/hdfs/name</value>
+ </property>
+ <property>
+ <name>dfs.datanode.data.dir</name>
+ <value>/opt/hdfs/data</value>
+ </property>
+ <property>
+ <name>dfs.permissions.superusergroup</name>
+ <value>hadoop</value>
+ </property>
+ <property>
+ <name>dfs.support.append</name>
+ <value>true</value>
+ </property>
+</configuration>
+EOF
+
+sudo apt-get install -y --allow-unauthenticated hadoop hadoop-hdfs
+
+sudo mkdir -p /opt/hdfs/data /opt/hdfs/name
+sudo chown -R hdfs:hdfs /opt/hdfs
+sudo -u hdfs hdfs namenode -format -nonInteractive
+
+sudo adduser travis hadoop
+
+sudo /usr/hdp/current/hadoop-hdfs-datanode/../hadoop/sbin/hadoop-daemon.sh start datanode
+sudo /usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode
+
+hdfs dfsadmin -safemode wait