1 #Setting up Carbon SR1 development environment
3 HINT1: Not all applications, available under code/apps are integrated into code-Carbon-SR1/apps.
4 HINT2: Modify the code under the *code* subdirectory. Modify in a way that it can be used in Boron and Carbon.
6 This *code-Carbon-SR1* folder does compile the sources from *code* in a Opendayligh Cabron SR1 context.
7 Mainly the pom.xml files are adapted. Sources are used from *code* referenced by a symbolic link.
9 ##Recommended structure
13 - WirelessTransportEmulator [from here: git MELACON](https://github.com/Melacon/WirelessTransportEmulator.git)
14 - CENTENNIAL [from here: git](https://github.com/OpenNetworkingFoundation/CENTENNIAL.git)
17 Working location for compiling Carbon code and managing the Carbon karaf container is here: **$HOME/odl/CENTENNIAL/code-Carbon-SR1**
18 Working directory for source code editing for Boron base is here: **$HOME/odl/CENTENNIAL/code**
22 ### 0. Do the installation of Java, maven, git npm and so on form the Boron/code description
24 Versions of tools that we use today (April 2018):
26 - Maven home: /usr/share/maven
27 - Java version: 1.8.0_162, vendor: Oracle Corporation
28 - Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
29 - Default locale: en_US, platform encoding: UTF-8
30 - OS name: "linux", version: "4.13.0-37-generic", arch: "amd64", family: "unix"
34 - jq: jq-1.5-1-a5b5cbe
38 ### 1. Download Carbon SR1 container
41 wget Carbon tar https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.6.1-Carbon/distribution-karaf-0.6.1-Carbon.tar.gz
43 ### 2. Creating dist.conf file
45 cd $HOME/odl/CENTENNIAL/code-Carbon-SR1
47 Create the file "dist.conf" with VI or any editor. Adapt template:
51 ODL_KARAF_DIST="distribution-karaf-0.6.1-Carbon"
52 ODL_KARAF_HOME=$HOME/odl/$ODL_KARAF_DIST
53 ODL_KARAF_DISTGZ="$HOME/Downloads/"$ODL_KARAF_DIST".tar.gz"
54 export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
55 #Optional for TAR build file creation
56 #If system is to slow it may be appropriate to specify a delay
57 #ODL_KARAF_AFTERCMD_DELAY_SECONDS="20"
58 ODL_BUILD_HOME="$HOME/build/att"
59 ODL_KARAF_STARTUP_SCRIPT="karaf_startup_all"
62 ### 3. Compile everything to m2
64 cd $HOME/odl/CENTENNIAL/code-Carbon-SR1
65 mvn clean install -DskipTests
67 Should end without error indication
69 ### 4. Prepare container
71 The *odl* script is replacing the older "install.sh" script collection. It will use the local settings, specified in dist.conf and can manage the karaf container specified by the configuration file. .
73 The prepare command will create
74 - The preconfigured karaf container
75 - Will create the link "dist" that points to the karaf container root, like $ODL_KARAF_HOME in the Boron environment.
76 E.g. cd to log directory works via cd dist/data/log
80 cd $HOME/odl/CENTENNIAL/code-Carbon-SR1
83 ### 5. Install the apps and Start the container
85 Install from $HOME/.m2/repository into dist/system and install features.
90 ### Further commands of odl script
92 List of all ./odl commands:
94 a for build all and install from M2
96 bower for install bower
97 cli start karaf command line
98 env List environment variables
99 d for devicemanager and install from M2
100 dbclean clean db and load with initial data
101 debug activate debug for netconf and mwtn
102 distremove remove existing karaf distribution
103 dlux install DLUX patch
105 ib for install from Build-directory
106 im for install from M2-directory
107 imd for install from M2-directory. Delete logs before start command
108 it fn install tar file to container
109 karafclean start clean and install apps on karaf
110 migrate migrate Param1 Param2 Migrate on localhost
111 prepare to install and prepare a karaf. Packed Version expected in Downloads
114 status display karaf status
115 stop stop and wait karaf
116 restart stop and start karaf
117 repoclean clean the repositories