Merge "[HDP2] Add ambari element"
This commit is contained in:
commit
1065cc0793
@ -27,7 +27,7 @@ NOTE: Do not create all images for all plugins with the same mirrors. Different
|
|||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
tox -e venv -- sahara-image-create -p [vanilla|spark|hdp|cloudera|storm|mapr]
|
tox -e venv -- sahara-image-create -p [vanilla|spark|hdp|cloudera|storm|mapr|ambari]
|
||||||
|
|
||||||
5. To select which hadoop version to target use the '-v' commandline option like this:
|
5. To select which hadoop version to target use the '-v' commandline option like this:
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ NOTE: Do not create all images for all plugins with the same mirrors. Different
|
|||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
tox -e venv -- sahara-image-create -i [ubuntu|fedora|centos]
|
tox -e venv -- sahara-image-create -i [ubuntu|fedora|centos|centos7]
|
||||||
|
|
||||||
7. If the host system is missing packages required for diskimage-create.sh, the '-u' commandline option will instruct the script to install them without prompt.
|
7. If the host system is missing packages required for diskimage-create.sh, the '-u' commandline option will instruct the script to install them without prompt.
|
||||||
|
|
||||||
|
@ -227,6 +227,16 @@ case "$PLUGIN" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
"ambari")
|
||||||
|
case "$BASE_IMAGE_OS" in
|
||||||
|
"" | "centos" | "centos7" | "ubuntu" )
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "\"$BASE_IMAGE_OS\" image type is not supported by \"$PLUGIN\".\nAborting"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
"mapr")
|
"mapr")
|
||||||
case "$BASE_IMAGE_OS" in
|
case "$BASE_IMAGE_OS" in
|
||||||
"" | "ubuntu" | "centos");;
|
"" | "ubuntu" | "centos");;
|
||||||
@ -610,6 +620,44 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "hdp" ]; then
|
|||||||
unset BASE_IMAGE_FILE DIB_IMAGE_SIZE DIB_CLOUD_IMAGES
|
unset BASE_IMAGE_FILE DIB_IMAGE_SIZE DIB_CLOUD_IMAGES
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Images for Ambari plugin #
|
||||||
|
############################
|
||||||
|
|
||||||
|
if [ -z "$PLUGIN" -o "$PLUGIN" = "ambari" ]; then
|
||||||
|
export DIB_AMBARI_VERSION="$HADOOP_VERSION"
|
||||||
|
if [ -z "$BASE_IMAGE_OS" -o "$BASE_IMAGE_OS" = "ubuntu" ]; then
|
||||||
|
ambari_ubuntu_image_name=${ambari_ubuntu_image_name:-ubuntu_sahara_ambari}
|
||||||
|
ambari_element_sequence="vm ntp ubuntu ambari $JAVA_ELEMENT"
|
||||||
|
if [ -n "$USE_MIRRORS" -a "$UBUNTU_MIRROR" ]; then
|
||||||
|
ambari_element_sequence="$ambari_element_sequence apt-mirror"
|
||||||
|
fi
|
||||||
|
export DIB_RELEASE="precise"
|
||||||
|
disk-image-create $TRACING $ambari_element_sequence -o $ambari_ubuntu_image_name
|
||||||
|
unset DIB_RELEASE
|
||||||
|
fi
|
||||||
|
if [ -z "$BASE_IMAGE_OS" -o "$BASE_IMAGE_OS" = "centos" ]; then
|
||||||
|
export BASE_IMAGE_FILE="CentOS-6.6-cloud-init-20150821.qcow2"
|
||||||
|
export DIB_CLOUD_IMAGES="http://sahara-files.mirantis.com"
|
||||||
|
ambari_centos_image_name=${ambari_centos_image_name:-centos_sahara_ambari}
|
||||||
|
ambari_element_sequence="vm ntp centos ambari $JAVA_ELEMENT"
|
||||||
|
if [ -n "$USE_MIRRORS" -a "$CENTOS_MIRROR" ]; then
|
||||||
|
ambari_element_sequence="$ambari_element_sequence centos-mirror"
|
||||||
|
fi
|
||||||
|
if [ "$DEBUG_MODE" = "true" ]; then
|
||||||
|
ambari_element_sequence="$ambari_element_sequence root-passwd"
|
||||||
|
fi
|
||||||
|
disk-image-create $ambari_element_sequence -o $ambari_centos_image_name
|
||||||
|
unset BASE_IMAGE_FILE DIB_CLOUD_IMAGES
|
||||||
|
fi
|
||||||
|
if [ -z "$BASE_IMAGE_OS" -o "$BASE_IMAGE_OS" = "centos7" ]; then
|
||||||
|
ambari_centos7_image_name=${ambari_centos7_image_name:-"centos7-sahara-ambari"}
|
||||||
|
ambari_element_sequence="vm ntp centos7 disable-selinux ambari $JAVA_ELEMENT"
|
||||||
|
disk-image-create $ambari_element_sequence -o $ambari_centos7_image_name
|
||||||
|
fi
|
||||||
|
unset DIB_AMBARI_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# Images for CDH plugin #
|
# Images for CDH plugin #
|
||||||
#########################
|
#########################
|
||||||
|
14
elements/ambari/README.rst
Normal file
14
elements/ambari/README.rst
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
======
|
||||||
|
ambari
|
||||||
|
======
|
||||||
|
|
||||||
|
Installs Ambari Management Console
|
||||||
|
|
||||||
|
Environment Variables
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
AMBARI_VERSION
|
||||||
|
:Required: No
|
||||||
|
:Default: 2.0.1
|
||||||
|
:Description: Version of Ambari Management Console to install
|
||||||
|
:Example: ``AMBARI_VERSION="2.0.0"`` installs Ambari 2.0.0
|
3
elements/ambari/element-deps
Normal file
3
elements/ambari/element-deps
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
disable-firewall
|
||||||
|
java
|
||||||
|
package-installs
|
7
elements/ambari/package-installs.yaml
Normal file
7
elements/ambari/package-installs.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
wget:
|
||||||
|
phase: pre-install.d
|
||||||
|
ambari-agent:
|
||||||
|
ambari-log4j:
|
||||||
|
ambari-metrics-hadoop-sink:
|
||||||
|
ambari-metrics-monitor:
|
||||||
|
ambari-server:
|
14
elements/ambari/post-install.d/10-disable-ambari
Executable file
14
elements/ambari/post-install.d/10-disable-ambari
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
case "${DISTRO_NAME}" in
|
||||||
|
rhel | centos | centos7 )
|
||||||
|
chkconfig ambari-server off
|
||||||
|
chkconfig ambari-agent off
|
||||||
|
;;
|
||||||
|
esac
|
22
elements/ambari/pre-install.d/90-ambari-repo-conf
Executable file
22
elements/ambari/pre-install.d/90-ambari-repo-conf
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DIB_AMBARI_VERSION="${DIB_AMBARI_VERSION:-2.1.0}"
|
||||||
|
|
||||||
|
case "${DISTRO_NAME}" in
|
||||||
|
rhel | centos )
|
||||||
|
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/$DIB_AMBARI_VERSION/ambari.repo -O /etc/yum.repos.d/ambari.repo
|
||||||
|
;;
|
||||||
|
centos7 )
|
||||||
|
wget http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/$DIB_AMBARI_VERSION/ambari.repo -O /etc/yum.repos.d/ambari.repo
|
||||||
|
;;
|
||||||
|
ubuntu )
|
||||||
|
wget http://public-repo-1.hortonworks.com/ambari/ubuntu12/2.x/updates/$DIB_AMBARI_VERSION/ambari.list -O /etc/apt/sources.list.d/ambari.list
|
||||||
|
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user