Assign image keyname and pubkey at vnf level
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / README.md
1 #Setting up Carbon SR1 development environment
2
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.
5
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.
8
9 ##Recommended structure
10
11    - $HOME/Downloads
12    - $HOME/odl
13       - WirelessTransportEmulator [from here: git MELACON](https://github.com/Melacon/WirelessTransportEmulator.git)
14       - CENTENNIAL [from here: git](https://github.com/OpenNetworkingFoundation/CENTENNIAL.git)
15
16
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**
19
20 ## Steps
21
22 ### 0. Do the installation of Java, maven, git npm and so on form the Boron/code description
23
24 Versions of tools that we use today (April 2018):
25   - Apache Maven 3.3.9
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"
31   - git version 2.7.4
32   - node: v4.2.6
33   - npm: 3.5.2
34   - jq: jq-1.5-1-a5b5cbe
35   - bower 1.8.0
36
37
38 ### 1. Download Carbon SR1 container
39
40     cd $HOME/Downloads
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
42
43 ### 2. Creating dist.conf file
44
45     cd $HOME/odl/CENTENNIAL/code-Carbon-SR1
46
47 Create the file "dist.conf" with VI or any editor. Adapt template:
48
49     #Own configuration
50     #Mandatory
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"
60
61
62 ### 3. Compile everything to m2
63
64     cd $HOME/odl/CENTENNIAL/code-Carbon-SR1
65     mvn clean install -DskipTests
66
67 Should end without error indication
68
69 ### 4. Prepare container
70
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. .
72
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
77
78 Execute prepare:
79
80      cd $HOME/odl/CENTENNIAL/code-Carbon-SR1
81      ./odl prepare
82
83 ### 5. Install the apps and Start the container
84
85 Install from $HOME/.m2/repository into dist/system and install features.
86
87     ./odl im
88
89
90 ### Further commands of odl script
91
92 List of all ./odl commands:
93 ```
94  a           for build all and install from M2
95  build       build subsystem
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
104  help        List this help
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
112  test        do some testing
113  start       start karaf
114  status      display karaf status
115  stop        stop and wait karaf
116  restart     stop and start karaf
117  repoclean   clean the repositories
118  v           get Versions
119 ```