testsuite: Use more ansible for setup
This commit is contained in:
parent
b1e7dac0f9
commit
5a825785e3
@ -1,3 +1,4 @@
|
|||||||
hbase_version: "0.96.1.1"
|
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 }}"
|
hbase_archive_url: "https://archive.apache.org/dist/hbase/hbase-{{ hbase_version }}/{{ hbase_archive }}"
|
||||||
|
@ -11,10 +11,8 @@ HBASE_FILE_CKSUM="1625453f839f7d8c86078a131af9731f6df28c59e58870db84913dcbc640d4
|
|||||||
HBASE_CONFIG_TEMPLATE="hbase/conf/hbase-site.xml.j2"
|
HBASE_CONFIG_TEMPLATE="hbase/conf/hbase-site.xml.j2"
|
||||||
HBASE_TEST_SUITE_EXECUTABLE="hbase/bin/hbase"
|
HBASE_TEST_SUITE_EXECUTABLE="hbase/bin/hbase"
|
||||||
|
|
||||||
declare -a DEPS=("java")
|
|
||||||
|
|
||||||
SCRIPT_PATH=$(dirname "$0")
|
SCRIPT_PATH=$(dirname "$0")
|
||||||
source $SCRIPT_PATH/setup.sh
|
source $SCRIPT_PATH/../../setup.sh
|
||||||
|
|
||||||
create_hbase_config_template() {
|
create_hbase_config_template() {
|
||||||
read -r -d '' CONFIG <<EOF
|
read -r -d '' CONFIG <<EOF
|
||||||
@ -38,6 +36,5 @@ EOF
|
|||||||
echo "$CONFIG"
|
echo "$CONFIG"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_dependencies
|
|
||||||
HBASE_CONFIG=$(create_hbase_config_template)
|
HBASE_CONFIG=$(create_hbase_config_template)
|
||||||
write_file ${HBASE_CONFIG_TEMPLATE} "${HBASE_CONFIG}"
|
write_file ${HBASE_CONFIG_TEMPLATE} "${HBASE_CONFIG}"
|
||||||
|
@ -5,19 +5,20 @@
|
|||||||
url: "{{ hbase_archive_url }}"
|
url: "{{ hbase_archive_url }}"
|
||||||
dest: "{{ script_path }}"
|
dest: "{{ script_path }}"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
checksum: sha256:7334e7da0b655ab02cfc64454c3d2e93a4c584efbde2dfd37915b9530d1643f8
|
checksum: sha256:{{ hbase_archive_file_checksum256 }}
|
||||||
|
run_once: true
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Copy archive
|
- name: Copy archive
|
||||||
copy:
|
copy:
|
||||||
src: "{{ script_path }}/{{ hbase_file }}"
|
src: "{{ script_path }}/{{ hbase_archive }}"
|
||||||
dest: "/tmp"
|
dest: "/tmp"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
|
||||||
- name: Extract archive
|
- name: Extract archive
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "/tmp/{{ hbase_file }}"
|
src: "/tmp/{{ hbase_archive }}"
|
||||||
dest: "{{ script_path }}"
|
dest: "/tmp"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
|
||||||
- name: Write config template
|
- name: Write config template
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
hadoop_version: "2.10.0"
|
hadoop_version: "2.10.0"
|
||||||
hadoop_archive_file: "hadoop-{{ hadoop_version }}.tar.gz"
|
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 }}"
|
hadoop_archive_url: "https://artfiles.org/apache.org/hadoop/common/hadoop-{{ hadoop_version }}}/{{ hadoop_archive_file }}"
|
||||||
|
@ -13,9 +13,7 @@ HDFS_CONFIG_DATANODES="localhost"
|
|||||||
HDFS_TEST_SUITE_EXECUTABLE="hadoop/bin/hdfs"
|
HDFS_TEST_SUITE_EXECUTABLE="hadoop/bin/hdfs"
|
||||||
|
|
||||||
SCRIPT_PATH=$(dirname "$0")
|
SCRIPT_PATH=$(dirname "$0")
|
||||||
source $SCRIPT_PATH/setup.sh
|
source $SCRIPT_PATH/../../setup.sh
|
||||||
|
|
||||||
declare -a DEPS=("java" "ansible-playbook")
|
|
||||||
|
|
||||||
create_hdfs_core_config_template() {
|
create_hdfs_core_config_template() {
|
||||||
#printf "Writing HDFS core-site.xml config\n"
|
#printf "Writing HDFS core-site.xml config\n"
|
||||||
@ -114,7 +112,6 @@ EOF
|
|||||||
echo "$CONFIG"
|
echo "$CONFIG"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_dependencies
|
|
||||||
HDFS_CONFIG=$(create_hdfs_config_template)
|
HDFS_CONFIG=$(create_hdfs_config_template)
|
||||||
HDFS_CONFIG_CORE=$(create_hdfs_core_config_template)
|
HDFS_CONFIG_CORE=$(create_hdfs_core_config_template)
|
||||||
HDFS_CONFIG_MAPRED=$(create_hdfs_mapred_config_template)
|
HDFS_CONFIG_MAPRED=$(create_hdfs_mapred_config_template)
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
url: "{{ hadoop_archive_url }}"
|
url: "{{ hadoop_archive_url }}"
|
||||||
dest: "{{ script_path }}"
|
dest: "{{ script_path }}"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
checksum: sha256:273d5fa1d479d0bb96759b16cf4cbd6ba3e7f863a0778cbae55ab83417e961f0
|
checksum: sha256:{{ hadoop_archive_file_checksum256 }}
|
||||||
|
run_once: true
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Copy archive
|
- name: Copy archive
|
||||||
@ -17,7 +18,7 @@
|
|||||||
- name: Extract archive
|
- name: Extract archive
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "/tmp/{{ hadoop_archive }}"
|
src: "/tmp/{{ hadoop_archive }}"
|
||||||
dest: "{{ script_path }}"
|
dest: "/tmp"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
|
||||||
- name: Write config template
|
- name: Write config template
|
||||||
|
Loading…
Reference in New Issue
Block a user