diff options
author | seshukm <seshu.kumar.m@huawei.com> | 2018-08-22 15:49:51 +0800 |
---|---|---|
committer | seshukm <seshu.kumar.m@huawei.com> | 2018-08-22 15:49:51 +0800 |
commit | ec1cf2336475d859e98a30540f44f396eea1af8e (patch) | |
tree | bac857d06d766324999c564ff112e5d80571d80e /docs | |
parent | cb4f87025be4cb4b5466abc186c3785d003ef770 (diff) |
update install and configure document
Issue-ID: SO-675
Change-Id: I157d04c2bebf3771df22792d9c7856ffa99d8393
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Install_Configure_SO.rst | 12 | ||||
-rw-r--r-- | docs/installconfigure/Configure_git_and_gerrit.rst | 93 | ||||
-rw-r--r-- | docs/installconfigure/Install_Docker.rst | 85 | ||||
-rw-r--r-- | docs/installconfigure/Workspace_and_Development_Tools.rst | 107 |
4 files changed, 291 insertions, 6 deletions
diff --git a/docs/Install_Configure_SO.rst b/docs/Install_Configure_SO.rst index 29b5e9fc0a..e06385e39b 100644 --- a/docs/Install_Configure_SO.rst +++ b/docs/Install_Configure_SO.rst @@ -65,11 +65,11 @@ Auto-mount: <checked> Read-only: <unchecked>
-.. image:: images/Configure_ubuntu_SO_3.png
+.. image:: ../images/Configure_ubuntu_SO_3.png
.
-.. image:: images/Configure_ubuntu_SO_4.png
+.. image:: ../images/Configure_ubuntu_SO_4.png
Install Ubuntu in the VM
------------------------
@@ -111,7 +111,7 @@ Connect to the VM from your host computer -----------------------------------------
The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM.
-.. image:: images/Configure_ubuntu_SO_7.png
+.. image:: ../images/Configure_ubuntu_SO_7.png
Install VirtualBox Guest Additions
----------------------------------
@@ -159,6 +159,6 @@ Further Reading .. toctree::
:maxdepth: 1
- Install_Docker.rst
- Configure_git_and_gerrit.rst
- Workspace_and_Development_Tools.rst
\ No newline at end of file + installconfigure/Install_Docker.rst
+ installconfigure/Configure_git_and_gerrit.rst
+ installconfigure/Workspace_and_Development_Tools.rst
\ No newline at end of file diff --git a/docs/installconfigure/Configure_git_and_gerrit.rst b/docs/installconfigure/Configure_git_and_gerrit.rst new file mode 100644 index 0000000000..c4598faf7b --- /dev/null +++ b/docs/installconfigure/Configure_git_and_gerrit.rst @@ -0,0 +1,93 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +Configure git and gerrit +======================== + +Basics +------ +The recommended version of git is 2.7.4 or later. Check the installed version in the Ubuntu VM: + +.. code-block:: bash + + git --version + +Create an SSH key to user with gerrit. Use no passphrase. + +.. code-block:: bash + + ssh-keygen -t rsa + +Enter your SSH public key (id_rsa) into gerrit: + +- Browse to https://gerrit.onap.org +- Log in +- Open the menu next to your name (under the green search button) + +.. image:: images/Configure_git_1.png + +- Select "Settings" +- In the "Settings" sidebar, click "SSH Public Keys"` +- Click "Add Key..." +- Paste the entire contents of $HOME/.ssh/id_rsa.pub into the text area and click "Add". + +.. image:: images/Configure_git_2.png + +Install the git-review package. + +.. code-block:: bash + + sudo apt update + sudo apt install git-review + +Create $HOME/.gitconfig (replace highlighted values with your own information): + [user] + + name = FirstName LastName + + email = you@yourcompany.com + + [core] + + autocrlf = false + + [merge] + + tool = vimdiff + + [gitreview] + + username = YourLinuxFoundationId + +**If you're behind a corporate firewall and your proxy server has SOCKS support...** + +You may be able to use the SSH protocol with git, which is preferred versus HTTP. This method is known to work in the AT&T corporate network. +Install the socat package, which allows you to tunnel SSH connections through a proxy that supports SOCKS: + +.. code-block:: bash + + sudo apt update + sudo apt install socat + +Create (or append to) $HOME/.ssh/config (replace highlighted values with your information) + + Host gerrit.onap.org + + User userid + + Hostname gerrit.onap.org + + ProxyCommand socat - PROXY:host:%h:%p,proxyport=port + + IdentityFile /home/userid/.ssh/id_rsa + + ServerAliveInterval 10 + +Verify that you have connectivity to gerrit through the proxy. Answer "yes" to continue connecting, if prompted. + +.. code-block:: bash + + ssh -p 29418 gerrit.onap.org + +.. image:: images/Configure_git_3.png diff --git a/docs/installconfigure/Install_Docker.rst b/docs/installconfigure/Install_Docker.rst new file mode 100644 index 0000000000..91e40ca138 --- /dev/null +++ b/docs/installconfigure/Install_Docker.rst @@ -0,0 +1,85 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2018 Huawei Technologies Co., Ltd. + +Install Docker +=============== + +Make sure curl is installed on the Ubuntu VM: + +.. code-block:: bash + + sudo apt update + sudo apt install curl + +If you are behind a corporate firewall (replace "proxyhost:port" with your actual proxy information) + https_proxy="https://*proxyhost:port*" curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add - + +Otherwise: + curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add - +Expected Response: + OK +Add the docker package repository: + sudo apt-add-repository "deb https://apt.dockerproject.org/repo ubuntu-xenial main" + +Install packages: + +.. code-block:: bash + + sudo apt update + sudo apt-cache policy docker-engine + sudo apt install docker-engine + sudo apt install docker-compose + +If you are behind a corporate firewall, you will need to configure proxy settings for docker so that images may be obtained from internet repositories. In the commands shown here, replace *"proxyhost:port"*, *"yourdomain1.com"*, and *"yourdomain2.com"* with appropriate values. + + Make the docker configuration directory: + +.. code-block:: bash + + sudo mkdir -p /etc/systemd/system/docker.service.d + + Edit (create) this file: + +.. code-block:: bash + + sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf + + Add these lines: + + [Service] + + Environment="HTTP_PROXY=https://*proxyhost:port*" + + Environment="HTTPS_PROXY=https://*proxyhost:port*" + + Environment="NO_PROXY=localhost,127.0.0.1,.yourdomain1.com,.yourdomain2.com" + + Restart docker: + +.. code-block:: bash + + sudo systemctl daemon-reload + sudo systemctl restart docker + +Add yourself to the docker user group (replace "userid" with your user ID): + +.. code-block:: bash + + sudo usermod -a -G docker *userid* + +Log out and log back in so that the user group change will takeeffect. + +Verify that you can connect to docker as yourself (i.e. not as root): + +.. code-block:: bash + + docker ps + +Verify that you can download and run the hello-world container + +.. code-block:: bash + + docker run hello-world + +.. image:: images/Docker_install_1.png
\ No newline at end of file diff --git a/docs/installconfigure/Workspace_and_Development_Tools.rst b/docs/installconfigure/Workspace_and_Development_Tools.rst new file mode 100644 index 0000000000..598439f75f --- /dev/null +++ b/docs/installconfigure/Workspace_and_Development_Tools.rst @@ -0,0 +1,107 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2017 Huawei Technologies Co., Ltd. + +Workspace and Development Tools +=============================== + +We recognize that there are different ways to set up a workspace and different tools that may be chosen. This is just one way to set things up. + +Suggested Directory Structure +------------------------------ +*NOTE*: You may have different versions of eclipse and java. + + onap + + .m2 + + apache-maven-3.3.9 + + camunda-modeler + + eclipse-jee-neon-3-linux-gtk-x86_64 + + jdk1.8.0_131 + + workspace + + SO + chef-repo + + docker-config + + libs + + so + + so-config + +Java +----- +Download the latest Java_8_SE_Development_Kit_ from Oracle. Select a Linux x64 package. + +Unpack it. + +.. _Java_8_SE_Development_Kit: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html + +Maven +------ + +Download the Apache_Maven_3.3.9_ binary. NOTE: 3.3.9 is the recommended version, even though much higher versions are available. + +Unpack it. + +.. _Apache_Maven_3.3.9: https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/ + +Create an .m2 directory for maven and put settings.xml_ in it. Edit the local repository path in settings.xml to make it correct for your environment. Everything else should be OK. + +.. _settings.xml: https://wiki.onap.org/download/attachments/15997820/settings.xml?version=1&modificationDate=1506156303000&api=v2 + +Camunda Modeler +--------------- + +Download the Camunda_Modeler_. Select the Linux x64 package. +Unpack it. + +.. _Camunda_Modeler: https://camunda.org/download/modeler/ + +Eclipse +------- + +Download Eclipse_for_Linux_. Select the 64-bit Eclipse IDE for Java EE Developers. Oxygen seems to be the latest version. These instructions were written for Neon. +Unpack it. + +.. _Eclipse_for_Linux: https://www.eclipse.org/downloads/eclipse-packages/?osType=linux + +In the eclipse directory, edit eclipse.ini + + Add (or change) the -vm setting so that it points to your JDK. + + Adjust the maximum heap space (2GB is recommended). + + Example: + +.. image:: images/Workspace_and_Development_Tools.png + +Eclipse Settings +---------------- + +**Configure eclipse to use your external maven 3.3.9 installation:** + Go to Window→Preferences→Maven→Installations + + Click "Add" and browse to your apache-maven-3.3.9 directory. Click "OK" to select it. + + Click "Finish" + +.. image:: images/Workspace_and_Development_Tools_2.png + +Make sure the external installation is selected: + +.. image:: images/Workspace_and_Development_Tools_3.png + +**Configure eclipse to use your settings.xml** + Go to Window→Preferences→Maven→User Settings + + Type the full path to your settings.xml file into the "User Settings" box and click "OK". + +.. image:: images/Workspace_and_Development_Tools_4.png
\ No newline at end of file |