Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Follow the steps below to set up the development environment on your client machine, and to establish credentials with which you may access the repositories.

...



install java 

set JAVA_HOME in ~/.bashrc

yum install java-1.8.0-openjdk-devel

get it via alternatives --config javac

currently

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64

install git and development tools
yum install git
yum groupinstall 'Development Tools'

this will give you make and python

install npm
(will also be installed automatically by the ecomp build) - TODO: UPDATE as ecomp is locked

download and install Maven 3.6.3

create an ~/.m2 folder and copy our settings.xml there

add maven to your path - check it with mvn --version

http://maven.apache.org/download.cgi

tar -xvf apache-maven-3.6.3-bin.tar.gz

Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux

-Djava.net.preferIPv4Stack=true

enable IP4 forwarding to enable the RHEL VM to act as an edge router - without this docker containers cannot communicate

add to /etc/sysctl.conf
net.ipv4.ip_forward = 1

Install docker (required for some repos like dcae-inventory off dcae
sudo yum install -y yum-utils
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --enable docker-ce-edge
sudo yum makecache fast
sudo yum install docker-ce
sudo systemctl start docker
20190130


Code Block
themeMidnight
sudo curl https://releases.rancher.com/install-docker/17.03.sh | sh

sudo wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -O jq
sudo chmod 777 jq
# not +x or jq will not be runnable from your non-root user
sudo mv jq /usr/local/bin
jq --version

sudo usermod -aG docker ubuntu


...



enable ubuntu desktop

apt-get update

apt-get install ubuntu-desktop

enable static IP

vi /etc/network/interfaces

add

iface enp0s25 inet static

address 192.168.15.101

netmask 255.255.255.0

network 192.168.15.0

broadcast 192.168.15.255

gateway 192.168.15.1

dns-nameservers 8.8.4.4

disable strict host checking (client and server)
in ~/.ssh/config
Host *
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

Enable non CD repositories so an apt-get update will work

comment out the CD first line in /etc/apt/sources.list
enable ssh if skipped during installation so we can remote sshsudo apt-get install openssh-server
enable root login and gui (no sudo su -)
sudo passwd root

sudo usermod -U root

sudo reboot now

sudo vi /etc/lightdm/lightdm.conf

[SeatDefaults]

greeter-session=unity-greeter

user-session=ubuntu

greeter-show-manual-login=true


: enable root login

vi /etc/ssh/sshd_config
FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes

systemctl restart sshd

The 131 version of Java 8 is installed by default - currently running 151

set JAVA_HOME in ~/.bashrc or /etc/environment

ubuntu@ubuntu:~$ echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-amd64

if not

sudo apt install openjdk-8-jdk

install git and development tools
sudo apt-get install git
install npm
(will also be installed automatically by the ecomp build)
sudo apt install npm

download and install Maven 3.5.0

create an ~/.m2 folder and copy our settings.xml there

add maven to your path - check it with mvn --version

http://maven.apache.org/download.cgi

tar -xvf apache-maven-3.5.0-bin.tar.gz

or

sudo apt install maven

Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux

in /etc/environment

-Djava.net.preferIPv4Stack=true

Install docker (required when building docker images)


use the current as of 20180621 17.03 version in the script
which is


Code Block
languagebash
themeMidnight
curl https://releases.rancher.com/install-docker/17.03.sh | sh



...

Note: The DCAE and SDC  repo will not fully clone in a windows environment (even git-bash) until some file paths are reduced below 255 chars - 

Jira Legacy
serverONAP JIRASystem Jira
serverId425b2b0a4733707d-557c2057-3c0c3a0f-b515ae5e-579789cceedb4fd8aff50176
keyDCAE-24
 and 
Jira Legacy
serverONAP JIRASystem Jira
serverId425b2b0a4733707d-557c2057-3c0c3a0f-b515ae5e-579789cceedb4fd8aff50176
keySDC-21
 - you may use Linux or OSX native or VMs as an alternative for now.

...

Info

You should execute puttygen.exe as an Administrator, otherwise, the key files will be stored in %localappdata%\VirtualStore\PuTTY, typically C:\Users\<user>\AppData\Local\VirtualStore\Program Files (x86)\PuTTY.

To do this, right-click on C:\Program Files (x86)\PuTTY\puttygen.exe and select Run as Administrator:

...

As per https://gerrit.onap.org/r/#/c/79312/1/onap-java-formatter.xml, an ONAP Eclipse Java Formatter XML file has been merged and can be imported into Eclipse. Updates to the settings should be committed and merged back into the repository (e.g.

Jira Legacy
serverONAP JIRASystem Jira
serverId425b2b0a4733707d-557c2057-3c0c3a0f-b515ae5e-579789cceedb4fd8aff50176
keyAAI-2198
) . TBC: This should probably be in oparent for all to share.

...

Verify that you can log in at https://gerrit.onap.org/ and that you can see the ONAP list of repositories.

OS Specific Instructions

MAC/OSX  ( to be reviewed by a MAC user )

get your MBP 2016 ready for development

generate keys - either ssh-add the key or rename it as id_rsa and put it into your ~/.ssh dir

...

Basic Setup

Git

Install git for your OS in accordance with https://www.oracleatlassian.com/technetworkgit/java/javase/downloads/jdk8-downloads-2133151.html

Install homebrew package manager - 

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

python should already be installed. - do a --version check

install pip - sudo easy_install pip

install openstack tools

install docker (dmg) - https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac

Redhat/CentOS ( to be reviewed by a Redhat/CentOS user )

20190130 - re-validating for RHEL 7.6 subscription

...

install java 

set JAVA_HOME in ~/.bashrc

...

yum install java-1.8.0-openjdk-devel

get it via alternatives --config javac

currently

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64

...

Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux

...

-Djava.net.preferIPv4Stack=true

...

add to /etc/sysctl.conf
net.ipv4.ip_forward = 1

...

sudo yum install -y yum-utils
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --enable docker-ce-edge
sudo yum makecache fast
sudo yum install docker-ce
sudo systemctl start docker
20190130

Code Block
themeMidnight
sudo curl https://releases.rancher.com/install-docker/17.03.sh | sh

sudo wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -O jq
sudo chmod 777 jq
# not +x or jq will not be runnable from your non-root user
sudo mv jq /usr/local/bin
jq --version

sudo usermod -aG docker ubuntu

...

Ubuntu ( to be reviewed by a Ubuntu user )

...

apt-get update

apt-get install ubuntu-desktop

...

vi /etc/network/interfaces

add

iface enp0s25 inet static

address 192.168.15.101

netmask 255.255.255.0

network 192.168.15.0

broadcast 192.168.15.255

gateway 192.168.15.1

dns-nameservers 8.8.4.4

...

in ~/.ssh/config
Host *
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

...

Enable non CD repositories so an apt-get update will work

...

sudo passwd root

sudo usermod -U root

sudo reboot now

sudo vi /etc/lightdm/lightdm.conf

[SeatDefaults]

greeter-session=unity-greeter

user-session=ubuntu

greeter-show-manual-login=true

: enable root login

vi /etc/ssh/sshd_config
FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes

systemctl restart sshd

...

set JAVA_HOME in ~/.bashrc or /etc/environment

ubuntu@ubuntu:~$ echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-amd64

if not

...

tutorials/install-git

Since this is common for all OS, we will also use it to generate our SSH keys as well :

Code Block
ssh-keygen

This should generate a private and public ssh key.

The public ssh key can then be uploaded to Gerrit or elsewhere as needed for authorization.

Java

ONAP is moving to Java 11 but many projects still use Java 8.

Download and install the appropriate openjdk version in accordance with the component you are using and set JAVA_HOME.

Maven

Download the latest Maven using installer from https://maven.apache.org/download.cgi

Add maven to your path variable.

To test the new installation run:

Code Block
mvn -version

Use the settings.xml found in the oparent repo.

Save this Maven settings.xml as your ~/.m2/settings.xml 

WSL users can point to one common repo across Windows and Ubuntu as :

Code Block
ln -s /mnt/c/Users/<username>/.m2 ~


If you are behind a proxy you can add a proxy section to your settings.xml 

Expand
titleProxy settings


Code Block
languagexml
	<proxies>
        <proxy>
            <id>evil-corp-http</id>
            <active>true</active>
            <protocol>http</protocol>
            <host>proxy.evil-corp.com</host>
            <port>599</port>
            <nonProxyHosts>localhost|127.0.0.1|*.evil-corp.com|*.happy.evil-corp.com|fun.evil-corp.com</nonProxyHosts>
        </proxy>
        <proxy>
            <id>evil-corp-https</id>
            <active>true</active>
            <protocol>https</protocol>
            <host>proxy.evil-corp.com</host>
            <port>599</port>
            <nonProxyHosts>localhost|127.0.0.1|*.evil-corp.com|*.happy.evil-corp.com|fun.evil-corp.com</nonProxyHosts>
        </proxy>
	</proxies>


OS Specific Instructions

MAC/OSX  ( to be reviewed by a MAC user )

get your MBP 2016 ready for development

Install homebrew package manager - 

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

python should already be installed. - do a --version check

install pip - sudo easy_install pip

install openstack tools

install docker (dmg) - https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac

Redhat/CentOS ( to be reviewed by a Redhat/CentOS user )

20190130 - re-validating for RHEL 7.6 subscription

enable IP4 forwarding to enable the RHEL VM to act as an edge router - without this docker containers cannot communicate


Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux

in /etc/environment

-Djava.net.preferIPv4Stack=true

Install docker (required when building docker images)

use the current as of 20180621 17.03 version in the script
https://git.onap.org/logging-analytics/tree/deploy/rancher/oom_rancher_setup.sh
which is

Code Block
languagebash
themeMidnight

add to /etc/sysctl.conf
net.ipv4.ip_forward = 1

Install docker (required for some repos like dcae-inventory off dcae

sudo yum install -y yum-utils
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --enable docker-ce-edge
sudo yum makecache fast
sudo yum install docker-ce
sudo systemctl start docker
20190130


Code Block
themeMidnight
sudo curl https://releases.rancher.com/install-docker/17.03.sh | sh

Windows

Note: The DCAE and SDC  repo will not fully clone in a windows environment (even git-bash) until some file paths are reduced below 255 chars - 

Jira Legacy
serverONAP JIRA
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyDCAE-24
 and 
Jira Legacy
serverONAP JIRA
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keySDC-21
 - you may use Linux or OSX native or VMs as an alternative for now.

Enabling long paths in windows

Code Block
git config --system core.longpaths true

GitBash

Install git for your OS in accordance with https://www.atlassian.com/git/tutorials/install-git

Java

ONAP is moving to Java 11 but many projects still use Java 8.

Download and install the appropriate openjdk version in accordance with the component you are using and set JAVA_HOME.

Maven

Download the latest Maven using installer from https://maven.apache.org/download.cgi

Add maven to your path variable.

To test the new installation run:

Code Block
mvn -version

Use the settings.xml found in the oparent repo.

Save this Maven settings.xml as your ~/.m2/settings.xml 

WSL users can point to one common repo across Windows and Ubuntu as :

Code Block
ln -s /mnt/c/Users/<username>/.m2 ~

If you are behind a proxy you can add a proxy section to your settings.xml 

...

titleProxy settings

...

languagexml

...



sudo wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -O jq
sudo chmod 777 jq
# not +x or jq will not be runnable from your non-root user
sudo mv jq /usr/local/bin
jq --version

sudo usermod -aG docker ubuntu



to install kubernetes follow Cloud Native Deployment#Scriptedundercloud(Helm/Kubernetes/Docker)andONAPinstall-SingleVM

Ubuntu ( to be reviewed by a Ubuntu user )



enable ubuntu desktop

apt-get update

apt-get install ubuntu-desktop

enable static IP

vi /etc/network/interfaces

add

iface enp0s25 inet static

address 192.168.15.101

netmask 255.255.255.0

network 192.168.15.0

broadcast 192.168.15.255

gateway 192.168.15.1

dns-nameservers 8.8.4.4

disable strict host checking (client and server)
in ~/.ssh/config
Host *
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

Enable non CD repositories so an apt-get update will work

comment out the CD first line in /etc/apt/sources.list
enable ssh if skipped during installation so we can remote sshsudo apt-get install openssh-server
enable root login and gui (no sudo su -)
sudo passwd root

sudo usermod -U root

sudo reboot now

sudo vi /etc/lightdm/lightdm.conf

[SeatDefaults]

greeter-session=unity-greeter

user-session=ubuntu

greeter-show-manual-login=true


: enable root login

vi /etc/ssh/sshd_config
FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes

systemctl restart sshd

Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux

in /etc/environment

-Djava.net.preferIPv4Stack=true

Install docker (required when building docker images)

use the current as of 20180621 17.03 version in the script
https://git.onap.org/logging-analytics/tree/deploy/rancher/oom_rancher_setup.sh
which is


Code Block
languagebash
themeMidnight
curl https://releases.rancher.com/install-docker/17.03.sh | sh



Windows

Note: The DCAE and SDC  repo will not fully clone in a windows environment (even git-bash) until some file paths are reduced below 255 chars - 

Jira Legacy
serverSystem Jira
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keyDCAE-24
 and 
Jira Legacy
serverSystem Jira
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keySDC-21
 - you may use Linux or OSX native or VMs as an alternative for now.

Enabling long paths in windows

Code Block
git config --system core.longpaths true

Connecting to ONAP Gerrit

...