Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for docker options specific to the ambari server . #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ambari-functions
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ USAGE
: ${AMBARI_SERVER_IMAGE:="hortonworks/ambari-server:latest"}
: ${AMBARI_AGENT_IMAGE:="hortonworks/ambari-agent:latest"}
: ${DOCKER_OPTS:=""}
: ${AMBARI_SERVER_DOCKER_OPTS:=""}
: ${CONSUL:="${NODE_PREFIX}-consul"}
: ${CONSUL_IMAGE:="sequenceiq/consul:v0.5.0-v6"}
: ${CLUSTER_SIZE:=3}
Expand All @@ -31,7 +32,7 @@ run-command() {
}

amb-clean() {
unset NODE_PREFIX AMBARI_SERVER_NAME AMBARI_SERVER_IMAGE AMBARI_AGENT_IMAGE DOCKER_OPTS CONSUL CONSUL_IMAGE DEBUG SLEEP_TIME AMBARI_SERVER_IP EXPOSE_DNS \
unset NODE_PREFIX AMBARI_SERVER_NAME AMBARI_SERVER_IMAGE AMBARI_AGENT_IMAGE DOCKER_OPTS AMBARI_SERVER_DOCKER_OPTS CONSUL CONSUL_IMAGE DEBUG SLEEP_TIME AMBARI_SERVER_IP EXPOSE_DNS \
DRY_RUN
}

Expand Down Expand Up @@ -60,6 +61,7 @@ amb-settings() {
AMBARI_SERVER_IMAGE=$AMBARI_SERVER_IMAGE
AMBARI_AGENT_IMAGE=$AMBARI_AGENT_IMAGE
DOCKER_OPTS=$DOCKER_OPTS
AMBARI_SERVER_DOCKER_OPTS=$AMBARI_SERVER_DOCKER_OPTS
AMBARI_SERVER_IP=$AMBARI_SERVER_IP
CONSUL=$CONSUL
CONSUL_IMAGE=$CONSUL_IMAGE
Expand Down Expand Up @@ -130,7 +132,7 @@ amb-start-first() {
run-command docker run -d $dns_port_command --name $CONSUL -h $CONSUL.service.consul $CONSUL_IMAGE -server -bootstrap
sleep 5

run-command docker run -d $DOCKER_OPTS --privileged --name $AMBARI_SERVER_NAME -h $AMBARI_SERVER_NAME.service.consul $AMBARI_SERVER_IMAGE \
run-command docker run -d $AMBARI_SERVER_DOCKER_OPTS $DOCKER_OPTS --privileged --name $AMBARI_SERVER_NAME -h $AMBARI_SERVER_NAME.service.consul $AMBARI_SERVER_IMAGE \
systemd.setenv=NAMESERVER_ADDR=$(get-consul-ip)

get-ambari-server-ip
Expand Down