It kind of depends on what you want to develop in Ambari.
* Using OSX and natively running in Eclipse is great. The problem is that
you can't test certain items
* Kerberos (difference between MIT and Heimdal)
* Server-side python files won't work
* Agents must be pre-installed (there is no bootstrapping)
* Using a VM environment (such as CentOS) gives the most authentic
experience.
* Debugging is slower and more cumbersome
* Kerberos, python, etc all work
* For ease of development, you'd want to install Ambari Server on a VM
but have it point to OSX for Eclipse-generated class files. You can accomplish
this by editing the serverClassPath.py file and pre-pending the shared folder
between OSX and your VM which has your class files. You can also edit
ambari-env.sh in order to setup remote debugging so your IDE can connect to the
remove process.
So, if you don't want to worry about Kerberos or the server-side python
scripts, then you can use OSX. Below is from an email I had sent earlier in the
year. But if you want a more "authentic" Ambari install, complete with Kerberos
and Python, then you'll want to use a VM and just have it link to your
generated class files.
- Install postgres
- Load the source code in your IDE of choice
- Have your own ambari.properties and ensure to include it on the classpath
when launching from the IDE. This is probably the hardest part to setup since
you’ll need to override a ton of properties to get Ambari to start on OSX. Here
are some examples:
java.home=/usr/jdk64/jdk1.7.0_45
jdk.name=jdk-7u45-linux-x64.tar.gz
resources.dir=/foo/dev/ambari/resources
server.persistence.inMemory=false
server.os_family=redhat6
server.os_type=centos6
# postgres
server.jdbc.database_name=ambari
server.jdbc.user.name=ambari-server
server.version.file=/foo/dev/ambari/conf/version
metadata.path=src/main/resources/stacks
security.server.keys_dir=/foo/dev/ambari/keystore
security.server.passphrase=DEV
shared.resources.dir=/foo/src/ambari/ambari-common/src/main/python/ambari_commons/resources
custom.action.definitions=/foo/src/ambari/ambari-server/src/main/resources/custom_action_definitions
recommendations.dir=/foo/dev/ambari/stack-recommendations
stackadvisor.script=/foo/src/ambari/ambari-server/src/main/resources/scripts/stack_advisor.py
webapp.dir=/foo/src/ambari/ambari-web/public
views.dir=/foo/dev/ambari/views
common.services.path=/foo/src/ambari/ambari-server/src/main/resources/common-services
On Dec 21, 2015, at 12:35 AM, Jeff Zhang
<[email protected]<mailto:[email protected]>> wrote:
Hi all,
I check the wiki page for how to develop in ambari. And wondering which is
the suggested os platform for developing ambari. Current I am in max os.
And if I use mac os for development, do I must install VM to verify the
ambari ? is there any other lightways to do that ? Thanks
https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development
--
Best Regards
Jeff Zhang