Docker based development environment for Ambari
This project aims to ease the development of the ambari server by setting up a real-like development environment using docker containers.
The following software components need to be installed:
- [Boot2docker] (http://boot2docker.io/)
- [docker-compose] (https://docs.docker.com/compose/install/)
- the source code is cloned to the host machine
- the project is made available to the containers as docker volumes
- development is done in the preferred IDE, on the host
- components (the server and the agents) run in docker containers
-
clone the project from the git repo:
git clone git@github.com:lpuskas/ambari-dev-env.git
-
set up your development profile:
./setup.sh
and set the variables in the generated.dev-profile
file -
run the
./setup.sh
again -
run the
./startDevEnv.sh
-
you remotely debug the code from your IDE
run ./setup.sh repo-mirror repoid repo_source_url
e.g. ./setup.sh repo-mirror HDP-2.3.2.0 http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.2.0/hdp.repo will setup a mirror for HDP-2.3.2.0
Specify http://yum-repos/repos/HDP-2.3.2.0 and http://yum-repos/repos/HDP-UTILS-1.1.0.20 as the URL for the HDP repositories for the desired os type when deploying the cluster.
Ambari server command line functions can be reached through ambari-server.py python script within ambari server docker container
- Start a bash session in a running ambari server container
docker exec -it ambari-server bash
- Run the desired ambari server command line function in the container
e.g. to refresh stack hash codes run python /ambari/ambari-server/src/main/python/ambari-server.py refresh-stack-hash