Assign image keyname and pubkey at vnf level
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / docs / READMEInstallDevelopmentEnvironment.md
1 ## 1. Setup ODL network app development environment
2
3 Description of how to get an development environment for creating network applications on top of opendaylight.
4 The development environment is a single server solution with graphical front-end for the developer.
5 The ODL Boron release is used as basis.
6
7 ### 1.1. Server setup
8
9 Server setup for a development server with eclipse as IDE, ODL Boron Karaf container and NE Simulators.
10 Remote Desktop is used to access the server via a VPN connection.
11   - From Windows PC: MS Remote Desktop
12   - From Ubuntu PC: There are some. Example: Remmina Remote Desktop Client (sudo apt install remmina)
13
14 Capacity of the VM Server should be about 4 CPUs and 8 Gig of RAM and 50 Gig of HDD.
15
16 #### Base software:
17
18   - ubuntu server edition (16.04.03 LTS)
19   - xfce desktop
20   - xrdp : remote management GUI
21     - For setup that supports copy and paste use the PPA Version 0.9.x
22     - version standard repository version 0.6.x is basically also working.
23   - chromium
24
25 #### xrdp PPA install
26
27 Do the following steps and restart server if done.
28
29 1. Answer yes, if asked about overwriting etc/xrdp/xrdp.ini
30
31     ```
32     sudo add-apt-repository ppa:hermlnx/xrdp
33     sudo apt-get update
34     sudo apt-get install xrdp
35     sudo apt-get upgrade
36     ```
37
38 2. Switch of extensive gui features. In ubuntu desktop goto menu on the left right corner <br/>
39    to **Applications-> Settings -> Windows Manager Tweaks**, select folder Compositor and
40    disable it by unchecking the option.
41
42 3. Improve performance (if required)
43
44   Change configuration in /etc/xrdp/xrdp.ini
45       - Security level high to none
46
47 4. Change sudo vi /etc/xrdp/sessman.ini and add change to '.thinclient_drives' (see the dot)
48
49     [Chansrv]
50     ; drive redirection, defaults to xrdp_client if not set
51     FuseMountName=.thinclient_drives
52
53
54 4. reboot server to activate xrdp configuration
55
56 5. Login with RPC application connect to server. Use defaults and enter existing user an password.
57
58
59 #### Adaption for Windows Client:
60   - Adapt TAB key handling ([details askubuntu](https://askubuntu.com/questions/352121/bash-auto-completion-with-xubuntu-and-xrdp-from-windows)):<br/>
61     edit the `~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml` file to unset the following mapping
62     ```
63     <       <property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/>
64     ---
65     >       <property name="&lt;Super&gt;Tab" type="string" value="empty"/>
66     ```
67     NOTE: There may be two entries, and the first already has the value "empty". If this is the case, edit the second entry.
68
69 #### Adding further tools
70
71 Add chromium as browser
72     - See [details askubuntu](https://wiki.ubuntuusers.de/Chromium/Installation/)
73
74     sudo apt-get install chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg
75
76 ### 1.2 Directory structure
77
78 home
79   - eclipse (Eclipse installation directory)
80   - odl (Workspace)
81     - CENTENNIAL (network application)
82     - other projects go here
83     - distribution-karaf-0.6.1-Carbon (opendaylight karaf run-time environment)
84
85 Prereq:
86     - Access to highstreet technologies gitlab server and to project "CENTENNIAL"
87     - Gerrit account [Create account](https://wiki.opendaylight.org/view/OpenDaylight_Controller:Gerrit_Setup)
88
89
90 ### 1.3 Install setup ODL_KARAF_HOME, Java, eclipse, mvn, draw and tools
91
92   Setup in home directory .bashrc like follows and logout/login to activate.
93
94      export ODL_KARAF_DIST="distribution-karaf-0.6.1-Carbon"
95      export ODL_KARAF_HOME="$HOME/odl/$ODL_KARAF_DIST"
96      export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
97
98   Verify
99
100       echo $ODL_KARAF_HOME
101
102   According to step 2.2 [CENTENNIAL/code/README.md](../README.md#step-22---download-CENTENNIAL-applications)
103   - openjdk (sudo apt-get install)
104   - mvn, configure maven for ODL
105   - bower
106   - ODL Boron distribution
107
108   And this software
109   - libre office draw  (sudo apt-get install libreoffice-draw)
110   - eclipse via oomph for ODL Development
111
112   Example eclipse configuration for user "Herbert"
113
114   ![eclipse parameters](READMEInstallDevelopmentEnvironment_1_eclipseinst.png?raw=true "Eclipse parameters")
115
116   After install .. change setting below for Secure Store:
117
118   ![eclipse adaption](READMEInstallDevelopmentEnvironment_2_secureStore.png?raw=true "Secure store option")
119
120   Add plugins from eclipse marketplace
121     - "GitHub Flavored Markdown viewer plugin 1.8.3" (GFM)
122     - Elcipse YANG editor
123
124
125 ### 2. Create app
126
127 See the documentation [create app documentation](READMECreateApp4Carbon.md)
128
129
130 ### 3. Remarks
131
132   - Karaf Intro and Install
133   - Simulators (Three times)