testsuite: Use more ansible for setup

This commit is contained in:
Björn Busse 2021-03-08 23:47:08 +01:00
parent b1e7dac0f9
commit 5a825785e3
6 changed files with 13 additions and 15 deletions

View File

@ -1,3 +1,4 @@
hbase_version: "0.96.1.1"
hbase_archive: "hbase-{{ hbase_version }}-hadoop2-bin.tar.gz"
hbase_archive_file: "hbase-{{ hbase_version }}-hadoop2-bin.tar.gz"
hbase_archive_file_checksum256: "7334e7da0b655ab02cfc64454c3d2e93a4c584efbde2dfd37915b9530d1643f8"
hbase_archive_url: "https://archive.apache.org/dist/hbase/hbase-{{ hbase_version }}/{{ hbase_archive }}"

View File

@ -11,10 +11,8 @@ HBASE_FILE_CKSUM="1625453f839f7d8c86078a131af9731f6df28c59e58870db84913dcbc640d4
HBASE_CONFIG_TEMPLATE="hbase/conf/hbase-site.xml.j2"
HBASE_TEST_SUITE_EXECUTABLE="hbase/bin/hbase"
declare -a DEPS=("java")
SCRIPT_PATH=$(dirname "$0")
source $SCRIPT_PATH/setup.sh
source $SCRIPT_PATH/../../setup.sh
create_hbase_config_template() {
read -r -d '' CONFIG <<EOF
@ -38,6 +36,5 @@ EOF
echo "$CONFIG"
}
check_dependencies
HBASE_CONFIG=$(create_hbase_config_template)
write_file ${HBASE_CONFIG_TEMPLATE} "${HBASE_CONFIG}"

View File

@ -5,19 +5,20 @@
url: "{{ hbase_archive_url }}"
dest: "{{ script_path }}"
mode: 0600
checksum: sha256:7334e7da0b655ab02cfc64454c3d2e93a4c584efbde2dfd37915b9530d1643f8
checksum: sha256:{{ hbase_archive_file_checksum256 }}
run_once: true
delegate_to: localhost
- name: Copy archive
copy:
src: "{{ script_path }}/{{ hbase_file }}"
src: "{{ script_path }}/{{ hbase_archive }}"
dest: "/tmp"
remote_src: yes
- name: Extract archive
ansible.builtin.unarchive:
src: "/tmp/{{ hbase_file }}"
dest: "{{ script_path }}"
src: "/tmp/{{ hbase_archive }}"
dest: "/tmp"
remote_src: yes
- name: Write config template

View File

@ -1,3 +1,4 @@
hadoop_version: "2.10.0"
hadoop_archive_file: "hadoop-{{ hadoop_version }}.tar.gz"
hadoop_archive_file_checksum256: "273d5fa1d479d0bb96759b16cf4cbd6ba3e7f863a0778cbae55ab83417e961f0"
hadoop_archive_url: "https://artfiles.org/apache.org/hadoop/common/hadoop-{{ hadoop_version }}}/{{ hadoop_archive_file }}"

View File

@ -13,9 +13,7 @@ HDFS_CONFIG_DATANODES="localhost"
HDFS_TEST_SUITE_EXECUTABLE="hadoop/bin/hdfs"
SCRIPT_PATH=$(dirname "$0")
source $SCRIPT_PATH/setup.sh
declare -a DEPS=("java" "ansible-playbook")
source $SCRIPT_PATH/../../setup.sh
create_hdfs_core_config_template() {
#printf "Writing HDFS core-site.xml config\n"
@ -114,7 +112,6 @@ EOF
echo "$CONFIG"
}
check_dependencies
HDFS_CONFIG=$(create_hdfs_config_template)
HDFS_CONFIG_CORE=$(create_hdfs_core_config_template)
HDFS_CONFIG_MAPRED=$(create_hdfs_mapred_config_template)

View File

@ -5,7 +5,8 @@
url: "{{ hadoop_archive_url }}"
dest: "{{ script_path }}"
mode: 0600
checksum: sha256:273d5fa1d479d0bb96759b16cf4cbd6ba3e7f863a0778cbae55ab83417e961f0
checksum: sha256:{{ hadoop_archive_file_checksum256 }}
run_once: true
delegate_to: localhost
- name: Copy archive
@ -17,7 +18,7 @@
- name: Extract archive
ansible.builtin.unarchive:
src: "/tmp/{{ hadoop_archive }}"
dest: "{{ script_path }}"
dest: "/tmp"
remote_src: yes
- name: Write config template