EDDA Development Environment Setup
This document would go over the details of setting up an open source cloud management platform, EDDA which is maintained and used by Netflix for their cloud service orchestration.
There are 3 main components to EDDA:
· MongoDB framework for storing AWS component information. We will see how to set this up as a windows service.
· Gradle build automation framework. We will see how to go about setting this up and what are some of the advantages of using this framework.
· EDDA source pulled from Github. We will see how we can go from source to a development environment by adding Scala IDE plugin to Eclipse and importing the project from Netflix’s repository
· A great article detailing out the individual steps required to setup MongoDB can be found here
· Sample mongod.cfg file:
o One may encounter numerous issues with configuring mongodb as a service. The most common error was:
Error 1053: The service did not respond to the start or control request in a timely fashion.
§ Verify the path to the mongod.cgf file is absolute and not relative.
§ Edit registry to entry for mongoDb’s ImagePath to include –rest and –master:
"C:\Programs\mongodb\bin\mongod.exe" --config "C:\Programs\mongodb\mongod.cfg" --service --rest –master
Refer this for more details on this common issue.
§ Now when you enter
NET START MongoDB
you should see the service running correctly by hitting http://localhost:28017/ which is the admin page. This page would provide a detailed look into performance metrics of the NoSQL engine and also provide additional logs which will help track status.
· If you now test this system with
you should be able to see a new connection being established to the mongodb service running in the background.
· CAUTION: Unlike MySql, MongoDB does not ensure authenticated to access to objects as out of the box it is assumed to be running in a trusted environment.
· Snapshot Admin page:
Gradle is a build automation framework for java and scala applications. It’s known for making the build as transparent as possible for developers. Build scripts are programming tools in their own right and as compared to Ant or Maven, it offers more capabilities by providing an object oriented way to write build scripts.
Apart from this it also enables smooth integration with different platforms like jetty, tomcat, maven, ant etc. to ensure complete interoperability between build systems.
To set up Gradle,
· Follow the installation guide here
Now that we have the build and DB frameworks setup, we can now move on to EDDA source. However before that it’s vital to add the JAVA_OPTS property:
$> set JAVA_OPTS= -XX:MaxPermSize=256M -Xmx1g
The default values for the JVM are not sufficient for EDDA as this is a memory intensive platform as the cloud component object metadata is stored in memory.
Scala IDE for Eclipse
EDDA is written in Scala, a programming language that is similar to java in the way that the source code is converted to bytecode with some variations in enabling the code volume to be much lesser than JAVA. It also has many interesting features like interoperability between java classes and scala objects and vice versa, compiling both java and scala code together etc. It also provides support for procedural programming rather than being purely object oriented.
One can download a scala compiler from here and use an editor of any choice to be able to write scala code and compile.
However, a preferred way to go about developing scala applications is to use Eclipse to be able to work with Scala and/or Java code for Scala applications. To set up the Scala IDE in Eclipse:
· Copy the link to the update site for the version of Eclipse you are running from here
· In Eclipse go to Help->Install New Software and add this link and click OK.
· Proceed with the installation and restart Eclipse. Scala should not be set up and configured in Eclipse. Test it out by creating a new Scala project just like how you would create a new Java project from the Project Wizard. Sample Hello World application can be found here
o On different IDEs there may be many issues that may be encountered while updating directly from the update site. Alternative in this case would be to download the jars for scala plugin and installing it manually.
o If you are using Spring Toolsuite then the update sites as described above may not work. You can install the IDE by navigating to the Dashboard in STS and search for plugins with name Scala. Click on Scala IDE * and install. Once STS restarts after the installation, the Scala IDE is successfully set up.
Finally, we are now ready to pull down EDDA from github and import this project into Eclipse with Scala IDE set up.
· Download the source into a folder called ‘edda’.
· Ensure that the following executables have their entries in the PATH environment variable:
o MongoDB : C:\Programs\mongodb\bin
o Gradle: C:\Programs\gradle\bin
o Java: <path to your Java home directory>
· Run the following to explore the tasks available for EDDA
$> gradle tasks
· Run the following to generate the files required for IDEs to set up EDDA for a project import into Eclipse:
· Import this project as a Scala Project in Eclipse. Clean and Build this project to ensure that there are no errors reported. You may have to do this multiple times and refresh the project folder to ensure all the files are imported and the set of referenced libraries are downloaded.
· Create a new Jetty Run configuration for this project:
· Before running the application you would have to add the AWS Access and Secret key to the src/main/resources/edda.properties file
· Ensuring that the MongoDB service is up and running, you can Run/Debug EDDA and see how the date is fetched from AWS, stored in mongodb and subsequent polling to get the changes in configuration. Test this by making an API request like:
http://localhost/edda/api/v2/aws/volumes which would return a JSON list of volumes associated with your account.
· To build the application after code changes you can use the gradle framework:
$> gradle clean
$> gradle build
· To create a WAR that can be thrown out to a standalone jetty server you can do:
$> gradle war
· To just have your local changes reflected in a local instance of the server you can start EDDA by:
$> gradlew jettyRun
· There are numerous tasks available for EDDA that can be initiated with gradle for various purposes. See
for more details.
 Install MongoDB on Windows, http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
 Registry fix for MongoDB service, http://www.webiyo.com/2011/02/install-mongodb-service-on-windows-7.html
 Installing Gradle, http://www.gradle.org/docs/current/userguide/installation.html#N10129
 Scala Distribution, http://www.scala-lang.org/downloads
 Scala IDE for Eclipse, http://scala-ide.org/download/current.html
 Getting started with Scala, http://www.scala-lang.org/node/166
 Netflix/edda, https://github.com/Netflix/edda