Skip to content
Open
Show file tree
Hide file tree
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
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,27 @@ For the multi node Hadoop cluster instructions please read our [blog](http://blo
curl -Lo .amb j.mp/docker-ambari && . .amb && amb-deploy-cluster
```

## Locally Hosting HDP Repos

Download the repos and untar the repos:

```
wget http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.2.0/HDP-2.3.2.0-centos6-rpm.tar.gz
wget http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6/HDP-UTILS-1.1.0.20-centos6.tar.gz
tar -xzvf HDP-2.3.2.0-centos6-rpm.tar.gz
tar -xzvf HDP-UTILS-1.0.0.20-centos.tar.gz
```

Copy repoinfo.xml to path containing the tar.gz files above (let's call that tar-path).

Copy hdp_urlinfo.json to tar-path/HDP.

Export the following environmental variables:

```
export DOCKER_OPTS="-v tar-path/repoinfo.xml:/var/lib/ambari-server/resources/stacks/HDP/2.3/repos/repoinfo.xml"
export LOCAL_REPO_DIR="tar-path"
export EXPOSE_DNS=true
```

Proceed with cluster creation as normal.
13 changes: 12 additions & 1 deletion ambari-functions
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ USAGE
: ${DNS_PORT:=53}
: ${EXPOSE_DNS:=false}
: ${DRY_RUN:=false}
: ${LOCAL_REPO_DIR:=""}
: ${REPO:="${NODE_PREFIX}-repo"}

start-local-repo() {
if [ -n "$LOCAL_REPO_DIR" ]; then
run-command docker run -d --name ${REPO} -h ${REPO}.service.consul -v "$LOCAL_REPO_DIR":/usr/local/apache2/htdocs/ httpd:2.4
_consul-register-service ${REPO} $(get-host-ip ${REPO})
fi
}

run-command() {
CMD="$@"
Expand All @@ -30,7 +39,7 @@ run-command() {
}

amb-clean() {
unset NODE_PREFIX AMBARI_SERVER_NAME IMAGE DOCKER_OPTS CONSUL CONSUL_IMAGE DEBUG SLEEP_TIME AMBARI_SERVER_IP DRY_RUN
unset NODE_PREFIX AMBARI_SERVER_NAME IMAGE DOCKER_OPTS CONSUL CONSUL_IMAGE DEBUG SLEEP_TIME AMBARI_SERVER_IP DRY_RUN LOCAL_REPO_DIR REPO
}

get-ambari-server-ip() {
Expand Down Expand Up @@ -61,6 +70,7 @@ amb-settings() {
CONSUL=$CONSUL
CONSUL_IMAGE=$CONSUL_IMAGE
DRY_RUN=$DRY_RUN
LOCAL_REPO_DIR=$LOCAL_REPO_DIR
EOF
}

Expand All @@ -84,6 +94,7 @@ amb-start-cluster() {
echo starting an ambari cluster with: $act_cluster_size nodes

amb-start-first
start-local-repo
[ $act_cluster_size -gt 1 ] && for i in $(seq $((act_cluster_size - 1))); do
amb-start-node $i
done
Expand Down
43 changes: 43 additions & 0 deletions hdp_urlinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"HDP-2.3": {
"latest": {
"centos7": "http://amb-repo.service.consul/HDP/centos7/2.x/updates/2.3.2.0/",
"centos6": "http://amb-repo.service.consul/HDP/centos6/2.x/updates/2.3.2.0/",
"debian6": "http://amb-repo.service.consul/HDP/debian6/2.x/updates/2.3.2.0/",
"debian7": "http://amb-repo.service.consul/HDP/debian7/2.x/updates/2.3.2.0/",
"suse11": "http://amb-repo.service.consul/HDP/suse11sp3/2.x/updates/2.3.2.0/",
"ubuntu12": "http://amb-repo.service.consul/HDP/ubuntu12/2.x/updates/2.3.2.0/",
"ubuntu14": "http://amb-repo.service.consul/HDP/ubuntu14/2.x/updates/2.3.2.0/"
}
},
"HDP-2.2": {
"latest": {
"centos5": "http://amb-repo.service.consul/HDP/centos5/2.x/updates/2.2.9.0/",
"centos6": "http://amb-repo.service.consul/HDP/centos6/2.x/updates/2.2.9.0/",
"suse11": "http://amb-repo.service.consul/HDP/suse11sp3/2.x/updates/2.2.9.0/",
"ubuntu12": "http://amb-repo.service.consul/HDP/ubuntu12/2.x/updates/2.2.9.0/"
}
},
"HDP-2.1": {
"latest": {
"centos5": "http://amb-repo.service.consul/HDP/centos5/2.x/updates/2.1.7.0/",
"centos6": "http://amb-repo.service.consul/HDP/centos6/2.x/updates/2.1.7.0/",
"suse11": "http://amb-repo.service.consul/HDP/suse11sp3/2.x/updates/2.1.7.0/",
"ubuntu12": "http://amb-repo.service.consul/HDP/ubuntu12/2.1.7.0/"
}
},
"HDP-2.0": {
"latest": {
"centos5": "http://amb-repo.service.consul/HDP/centos5/2.x/updates/2.0.12.0/",
"centos6": "http://amb-repo.service.consul/HDP/centos6/2.x/updates/2.0.12.0/",
"suse11": "http://amb-repo.service.consul/HDP/suse11/2.x/updates/2.0.12.0/"
}
},
"HDP-1.3": {
"latest": {
"centos5": "http://amb-repo.service.consul/HDP/centos5/1.x/updates/1.3.8.0/",
"centos6": "http://amb-repo.service.consul/HDP/centos6/1.x/updates/1.3.8.0/",
"suse11": "http://amb-repo.service.consul/HDP/suse11/1.x/updates/1.3.8.0/"
}
}
}
32 changes: 32 additions & 0 deletions repoinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<reposinfo>
<latest>http://amb-repo.service.consul/HDP/hdp_urlinfo.json</latest>
<os family="redhat6">
<repo>
<baseurl>http://amb-repo.service.consul/HDP/centos6/2.x/updates/2.3.2.0/</baseurl>
<repoid>HDP-2.3</repoid>
<reponame>HDP</reponame>
</repo>
<repo>
<baseurl>http://amb-repo.service.consul/HDP-UTILS-1.1.0.20/repos/centos6</baseurl>
<repoid>HDP-UTILS-1.1.0.20</repoid>
<reponame>HDP-UTILS</reponame>
</repo>
</os>
</reposinfo>