Software Defined Networking
1753575 Members
6200 Online
108796 Solutions
New Discussion

Building the SDN development environment?

 
SOLVED
Go to solution
Dave-B
Frequent Advisor

Building the SDN development environment?

I´m trying to set up the SDN development environment on an Ubuntu 12.04.4 LTS desktop. I have downloaded the HP_SDN_DeveloperKit.zip from http://h17007.www1.hp.com/us/en/networking/solutions/technology/sdn/devcenter/index.aspx#tab=TAB2

The HP_SDN_DeveloperKit.zip only contains the REST, Admin and Controller Programming Guide pdfs.

 

Should there be more or is this correct?

 

The 5998-4920_HP_VAN_SDN_Controller_Programming_Guide.pdf describes how to setup an eclipse dev environment.

 

I have installed eclipse, maven and OpenJDK Java 7 Runtime.

 

I have unzipped the sdk-sample-app.zip and followed the instructions>

 

Page 8 of 5998-4920 lists:

$ bin/install-sdk

I cannot find this.

 

Page 114 of 5998-4920 lists:

~/dev/sdn-apps/sdk-sample-app/health-monitor/hm-root$ mvn eclipse:eclipse

 

This fails with

[WARNING] Missing POM for com.hp.util:hp-util-test:jar:6.23.0
[WARNING] Missing POM for com.hp.util:hp-util-misc:jar:6.23.0
[WARNING] Missing POM for com.hp.util:hp-util-api:jar:6.23.0
[WARNING] Missing POM for com.hp.util:hp-util-ip:jar:6.23.0
[WARNING] Missing POM for com.hp.sdn:sdn-common-model:jar:2.0.0
[WARNING] An error occurred during dependency resolution.

 

[ERROR] Failed to execute goal on project hm-dao-model: Could not resolve dependencies for project com.hp.hm:hm-dao-model:bundle:1.0.0-SNAPSHOT: The following artifacts could not be resolved: com.hp.hm:hm-model:jar:1.0.0-SNAPSHOT, com.hp.util:hp-util-dao:jar:6.23.0, com.hp.util:hp-util-misc:jar:6.23.0, com.hp.util:hp-util-api:jar:6.23.0, com.hp.util:hp-util-ip:jar:6.23.0, com.hp.sdn:sdn-common-model:jar:2.0.0: Could not find artifact com.hp.hm:hm-model:jar:1.0.0-SNAPSHOT -> [Help 1]

 

 

It has been about 5 years since I wrote any java or used eclipse.

 

Am I missing some SDK files?

 

Or am I doing something fundamentally wrong?

 

 

Thanks in advance, Dave.

15 REPLIES 15
sdnindia
Trusted Contributor

Re: Building the SDN development environment?

Hello Dave,

 

REST, Admin and Controller Programming Guide pdfs are enough to get a start .However if you really need other documents like Controller Release Notes, API doc ,License registration and activation then you can click on “start your free 60 day trial” on the same page http://h17007.www1.hp.com/us/en/networking/solutions/technology/sdn/devcenter/index.aspx#tab=TAB2  and you can get Controller zip file(around 175 MB) which already contains Release Notes pdf, apidoc, SDN Controller and SDK.

 

install-sdk script is present in bin directory under SDK. Please check if you have downloaded successfully. Also you might need to check your  ~/.m2/settings.xml file to access the internet based maven repositories.

After running this script please re run the other command and let us know if you are facing any problem.

 

Thanks,

HP SDN Team

Dave-B
Frequent Advisor

Re: Building the SDN development environment?

SDN Team,

 

Thanks for the reply. Been away, but I have now found the SDK environment files in HP_SDN_DeveloperKit.zip.

 

The bin/install-sdk command seems to work OK. I now have  ~/.m2 folder containing a repository, but there is no  ~/.m2/settings.xml file.

 

When I use the mvn eclipse:eclipse command I am still unable to resolve the hm-dao-model.

 

~/dev/sdk-sample-app/health-monitor/hm-root$ mvn eclipse:eclipse

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hm-root ........................................... SUCCESS [1.145s]
[INFO] hm-model .......................................... SUCCESS [0.727s]
[INFO] hm-api ............................................ SUCCESS [0.041s]
[INFO] hm-dao-model ...................................... FAILURE [0.209s]
[INFO] hm-dao-api ........................................ SKIPPED
[INFO] hm-dao ............................................ SKIPPED
[INFO] hm-bl ............................................. SKIPPED
[INFO] hm-rs ............................................. SKIPPED
[INFO] hm-ui ............................................. SKIPPED
[INFO] hm-app ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.743s
[INFO] Finished at: Tue Mar 25 14:11:59 GMT 2014
[INFO] Final Memory: 7M/18M
[ERROR] Failed to execute goal on project hm-dao-model: Could not resolve dependencies for project com.hp.hm:hm-dao-model:bundle:1.0.0-SNAPSHOT: Could not find artifact com.hp.hm:hm-model:jar:1.0.0-SNAPSHOT

 

Dave.

sdnindia
Trusted Contributor

Re: Building the SDN development environment?

Hello Dave,

 

To get access to the internet based maven repositories , you may need to set proxy settings in settings.xml file.

You can take setting example from SDN Programming guide[page 217] , modify accordingly and put the same  in settings.xml file under m2 directory.

You can also take help from attached file.Please modify the settings.xml file[Attached ] accordingly and put this file under m2 directory.

 

Also please make sure you are following the steps as per the Programming guide. Each step should be successfully completed in order to get the successful build.If you are just trying to build the sample application ( “Device Health monitor” which is generated by running the command gen-sdn-app ),it should build successfully provided you successfully download required files and setup environment correctly.

 

Please let us know if you still face the issue.

 

Thanks,

HP SDN Team

sdnindia
Trusted Contributor

Re: Building the SDN development environment?

Hello Dave,

 

Doing a follow up to check if you need any further assistance with respect to the query posted.

Please do let us know  if your problem is solved.

If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.

 

 

Thanks

HP SDN Team

Dave-B
Frequent Advisor

Re: Building the SDN development environment?

Sorry for the delay in reponse. I had posted a reply about 2 weeks ago, but the reply did not post properly. I did not realise that your reply system times out if you start a reply, go to lunch, then post later.
 
My normal development machine is a 32 bit Ubutnu 12.04 desktop on a test network with no proxy.

I tried a fresh 64 bit Ubutnu 12.04 desktop install in VirtualBox on my Win7 desktop machine on the our main network with the setting.xml modified with the masin network proxy setttings:
 
$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:    12.04
Codename:    precise

 

~/dev$ ls -alh
total 33M
drwxrwxr-x  5 davidpb davidpb 4.0K Mar 31 14:46 .
drwxr-xr-x 28 davidpb davidpb 4.0K Apr 23 14:50 ..
drwxr-xr-x  5 davidpb davidpb 4.0K Oct 25 03:15 hp-sdn-apidoc-2.0.0
drwxr-xr-x  4 davidpb davidpb 4.0K Oct 25 04:11 hp-sdn-sdk-2.0.0
-rw-rw-rw-  1 davidpb davidpb  33M Mar 31 13:58 hp-sdn-sdk-2.0.0.zip
drwxrwxr-x  4 davidpb davidpb 4.0K Mar 31 14:23 sdk-sample-app
-rw-rw-rw-  1 davidpb davidpb 112K Mar 31 14:23 sdk-sample-app.zip
 
~/dev$ mvn --version
Apache Maven 2.2.1 (rdebian-8)
Java version: 1.6.0_30
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux" version: "3.11.0-19-generic" arch: "amd64" Family: "unix"
 
~/dev$ java -version
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.1) (6b30-1.13.1-1ubuntu2~0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
 
~/dev/sdk-sample-app/health-monitor/hm-root$ mvn eclipse:eclipse
[INFO] Scanning for projects...
[INFO] Reactor build order:  
[INFO]   hm-root
[INFO]   hm-model
[INFO]   hm-api
[INFO]   hm-dao-model
[INFO]   hm-dao-api
[INFO]   hm-dao
[INFO]   hm-bl
[INFO]   hm-rs
[INFO]   hm-ui
[INFO]   hm-app
[WARNING] POM for 'biz.aQute:bndlib:pom:1.50.0:runtime' is invalid.
.......................
.......................
 
[INFO] ------------------------------------------------------------------------
[INFO] Building hm-dao-model
[INFO]    task-segment: [eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
 
Missing:
----------
1) com.hp.hm:hm-model:jar:1.0.0-SNAPSHOT
 
  Try downloading the file manually from the project website.
 
  Then, install it using the command:  
      mvn install:install-file -DgroupId=com.hp.hm -DartifactId=hm-model -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
 
  Alternatively, if you host your own repository you can deploy the file there:  
      mvn deploy:deploy-file -DgroupId=com.hp.hm -DartifactId=hm-model -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
 
  Path to dependency:  
      1) com.hp.hm:hm-dao-model:bundle:1.0.0-SNAPSHOT
      2) com.hp.hm:hm-model:jar:1.0.0-SNAPSHOT
 
----------
1 required artifact is missing.
 
for artifact:  
  com.hp.hm:hm-dao-model:bundle:1.0.0-SNAPSHOT
 
from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


I still seem to be missing components for the hm-dao-model.

Dave.

sdnindia
Trusted Contributor
Solution

Re: Building the SDN development environment?

Hello Dave,

 

As per the SDN Controller Programming guide pdf[page 8 ]  Maven 3.0.4  or newer is needed  while the command on your system shows Maven 2.2.1 as below-

 

mvn --version

Apache Maven 2.2.1

...

...

 

So please update your mavan to 3.0.4 or newer and try again.

Please do let us know  if you still face the problem.

 

Thanks

HP SDN Team

Dave-B
Frequent Advisor

Re: Building the SDN development environment?

Thanks.

 

I downloaded the latest verion of maven from http://maven.apache.org/download.cgi and installed.

 

The maven command now works:

 

$ mvn eclipse:eclipse
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hm-root ........................................... SUCCESS [  0.929 s]
[INFO] hm-model .......................................... SUCCESS [  0.642 s]
[INFO] hm-api ............................................ SUCCESS [  0.070 s]
[INFO] hm-dao-model ...................................... SUCCESS [  4.405 s]
[INFO] hm-dao-api ........................................ SUCCESS [  0.039 s]
[INFO] hm-dao ............................................ SUCCESS [  0.403 s]
[INFO] hm-bl ............................................. SUCCESS [  0.586 s]
[INFO] hm-rs ............................................. SUCCESS [  0.606 s]
[INFO] hm-ui ............................................. SUCCESS [  0.101 s]
[INFO] hm-app ............................................ SUCCESS [  0.007 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.444 s
[INFO] Finished at: 2014-04-30T15:29:39+00:00
[INFO] Final Memory: 14M/34M
[INFO] ------------------------------------------------------------------------

 

Dave.

SatishK
Frequent Advisor

Re: Building the SDN development environment?

Hi,

 

I followed the above questionarry and found that it is working fine for Dave,

 

I do have same kind of issue and still it is not working for me,

I have the latest versionof Maven.

 

C:\Users\satish.khandre\SDN\sdk-sample-app\health-monitor\hm-root>mvn --version
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T02:28:10+05:30)
Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.2.3

 

One thing is I am trying on Windows 7, 32 bit m/c.

 

Facing the same issue,

 

[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) > generate-resources @ hm-dao-model >>>
[WARNING] The POM for com.hp.util:hp-util-misc:jar:6.23.0 is missing, no dependency information available
[WARNING] The POM for com.hp.util:hp-util-api:jar:6.23.0 is missing, no dependency information available
[WARNING] The POM for com.hp.util:hp-util-ip:jar:6.23.0 is missing, no dependency information available
[WARNING] The POM for com.hp.sdn:sdn-common-model:jar:2.0.0 is missing, no dependency information available
[WARNING] The POM for com.hp.util:hp-util-dao:jar:6.23.0 is missing, no dependency information available
[WARNING] The POM for com.hp.util:hp-util-test:jar:6.23.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hm-root ............................................ SUCCESS [ 0.525 s]
[INFO] hm-model ........................................... SUCCESS [ 0.606 s]
[INFO] hm-api ............................................. SUCCESS [ 0.358 s]
[INFO] hm-dao-model ....................................... FAILURE [ 0.097 s]
[INFO] hm-dao-api ......................................... SKIPPED
[INFO] hm-dao ............................................. SKIPPED
[INFO] hm-bl .............................................. SKIPPED
[INFO] hm-rs .............................................. SKIPPED
[INFO] hm-ui .............................................. SKIPPED
[INFO] hm-app ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.373 s
[INFO] Finished at: 2014-09-10T16:15:08+05:30
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hm-dao-model: Could not resolve dependencies for project com.hp.hm:hm-dao-model:bundle:1.0.0-SNAPSH
OT: The following artifacts could not be resolved: com.hp.hm:hm-model:jar:1.0.0-SNAPSHOT, com.hp.util:hp-util-dao:jar:6.23.0, com.hp.util:hp-
util-misc:jar:6.23.0, com.hp.util:hp-util-api:jar:6.23.0, com.hp.util:hp-util-ip:jar:6.23.0, com.hp.sdn:sdn-common-model:jar:2.0.0: Could not
find artifact com.hp.hm:hm-model:jar:1.0.0-SNAPSHOT -> [Help 1]

 

Thanks for help,,

Regards,

Satish K

Dave-B
Frequent Advisor

Re: Building the SDN development environment?

Satish,

 

Have you updated your pom.xml file in the -root folder of your SDN App folder structure?

 

You need to add the HP library depencies. They are mentioned by the warning when you tried ti build your app, e.g

 

 

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.rd.pingctrl</groupId>
    <artifactId>pingctrl-root</artifactId>
    <packaging>pom</packaging>
    <version>1.0.0-SNAPSHOT</version>

    <name>pingctrl-root</name>
    <description>Application that responds to pings from clients.</description>

    <modules>
        <!--
             Suggested application modules. The order defined here is
             approximatery the order in which the modules will be compiled.
        -->
        <module>../pingctrl-model</module>
        <module>../pingctrl-api</module>
        <module>../pingctrl-bl</module>
        <module>../pingctrl-rs</module>
        <module>../pingctrl-ui</module>
        <module>../pingctrl-app</module>
    </modules>

    <properties>
        <hp-util.version>6.23.0</hp-util.version>
        <sdn.version>2.0.0</sdn.version>
        <slf4j.version>1.7.5</slf4j.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.hp.util</groupId>
            <artifactId>hp-util-test</artifactId>
            <version>${hp-util.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.annotations</artifactId>
            <version>1.9.4</version>
        </dependency>

     <dependency>
            <groupId>com.hp.util</groupId>
            <artifactId>hp-util-pkt</artifactId>
            <version>${hp-util.version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.util</groupId>
            <artifactId>hp-util-net</artifactId>
            <version>${hp-util.version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.sdn</groupId>
            <artifactId>sdn-ctl-api</artifactId>
            <version>${sdn.version}</version>
        </dependency>

    <dependency>
        <groupId>com.hp.util</groupId>
        <artifactId>hp-util-ip</artifactId>
        <version>${hp-util.version}</version>
    </dependency>

        <dependency>
            <groupId>com.hp.sdn</groupId>
            <artifactId>sdn-common-misc</artifactId>
            <version>${sdn.version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.sdn</groupId>
            <artifactId>sdn-of-lib</artifactId>
            <version>${sdn.version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.sdn</groupId>
            <artifactId>sdn-of-ctl</artifactId>
            <version>${sdn.version}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.9</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
                <version>1.13.0</version>
                <executions>
                    <execution>
                        <id>generate-scr-srcdescriptor</id>
                        <goals>
                            <goal>scr</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <supportedProjectTypes>
                        <supportedProjectType>bundle</supportedProjectType>
                        <supportedProjectType>war</supportedProjectType>
                    </supportedProjectTypes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.3.6</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                       <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.14.1</version>
            </plugin>

            <!-- Findbugs is optional, but recommended. -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.5.1</version>
            </plugin>
        </plugins>
    </build>
</project>

 

Dave.