Skip to content

Commit

Permalink
Update stack testing CI playbooks and shell scripts (elastic#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
liza-mae authored Nov 28, 2018
1 parent 03511d1 commit 183c220
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 14 deletions.
17 changes: 17 additions & 0 deletions playbooks/stack_testing/ci/jenkins_stack_testing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
#
# @author: Liza Dayoub

if [ $CI_BUILD == "true" ]; then
export ES_BUILD_OSS=$CI_OSS
if [ $ES_BUILD_OSS == "true" ]; then
export AIT_ANSIBLE_PLAYBOOK="${AIT_ROOTDIR}/playbooks/stack_testing/install_no_xpack.yml"
else
export AIT_ANSIBLE_PLAYBOOK="${AIT_ROOTDIR}/playbooks/stack_testing/install_xpack.yml"
fi
# This will eventually be added to the CI_ stuff
export ES_BUILD_PKG_EXT=tar
export AIT_VM=vagrant_vm
fi

source jenkins_build.sh
19 changes: 19 additions & 0 deletions playbooks/stack_testing/install_no_xpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#----------------------------------------------------------------------------------------------------------------------
# Playbook: Install products without x-pack
#
# Author: liza.dayoub@elastic.co
#----------------------------------------------------------------------------------------------------------------------

- hosts: "{{ uut | default(lookup('env','AIT_UUT')) }}"

vars_files:
- "{{ es_var_file | default(lookup('env','ANSIBLE_GROUP_VARS')) }}"

roles:
- { role: elasticsearch, ait_role: elasticsearch_install_config_start_verify }
- { role: kibana, ait_role: kibana_install_config_start_verify }
- { role: logstash, ait_role: logstash_install_config_start_verify }
- { role: filebeat, ait_role: filebeat_install_config_start_verify_import_dashboards }
- { role: metricbeat, ait_role: metricbeat_install_config_start_verify_import_dashboards }
- { role: packetbeat, ait_role: packetbeat_install_config_start_verify_import_dashboards }
- { role: apm_server, ait_role: apm_server_install_config_start_verify_import_dashboards }
19 changes: 19 additions & 0 deletions playbooks/stack_testing/install_xpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#----------------------------------------------------------------------------------------------------------------------
# Playbook: Install products with x-pack
#
# Author: liza.dayoub@elastic.co
#----------------------------------------------------------------------------------------------------------------------

- hosts: "{{ uut | default(lookup('env','AIT_UUT')) }}"

vars_files:
- "{{ es_var_file | default(lookup('env','ANSIBLE_GROUP_VARS')) }}"

roles:
- { role: xpack_elasticsearch, ait_role: xpack_elasticsearch_install_gencert_config_start_verify }
- { role: xpack_kibana, ait_role: xpack_kibana_install_config_start_verify }
- { role: xpack_logstash, ait_role: xpack_logstash_install_config_start_verify }
- { role: xpack_filebeat, ait_role: xpack_filebeat_install_config_start_verify_import_dashboards }
- { role: xpack_metricbeat, ait_role: xpack_metricbeat_install_config_start_verify_import_dashboards }
- { role: xpack_packetbeat, ait_role: xpack_packetbeat_install_config_start_verify_import_dashboards }
- { role: xpack_apm_server, ait_role: xpack_apm_server_install_config_start_verify_import_dashboards }
14 changes: 0 additions & 14 deletions scripts/shell/lib/build_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ export_env_vars() {
export ES_BUILD_URL="${ES_BUILD_SERVER}.elastic.co/$LATEST_BUILD_ID"
fi

# Added to support CI multi phase job
# Note: Specific to elastic stack testing CI job
if [ $CI_BUILD == "true" ] && [ $RC == 1 ]; then
export ES_BUILD_OSS=$CI_OSS
if [ $ES_BUILD_OSS == "true" ]; then
export AIT_ANSIBLE_PLAYBOOK="${AIT_ROOTDIR}/playbooks/get_started/install_no_xpack.yml"
else
export AIT_ANSIBLE_PLAYBOOK="${AIT_ROOTDIR}/playbooks/get_started/install_xpack.yml"
fi
# This will eventually be added to the CI_ stuff
export ES_BUILD_PKG_EXT=tar
export AIT_VM=vagrant_vm
fi

env | sort

}
Expand Down

0 comments on commit 183c220

Please sign in to comment.