diff options
Diffstat (limited to 'docs/installconfigure')
-rw-r--r-- | docs/installconfigure/Configure_git_and_gerrit.rst | 93 | ||||
-rw-r--r-- | docs/installconfigure/Install_Configure_SO.rst | 164 | ||||
-rw-r--r-- | docs/installconfigure/Install_Docker.rst | 85 | ||||
-rw-r--r-- | docs/installconfigure/Workspace_and_Development_Tools.rst | 107 |
4 files changed, 449 insertions, 0 deletions
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_Configure_SO.rst b/docs/installconfigure/Install_Configure_SO.rst new file mode 100644 index 0000000000..bdfd328fc5 --- /dev/null +++ b/docs/installconfigure/Install_Configure_SO.rst @@ -0,0 +1,164 @@ +.. 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. + +SO Install & Configure +========================================== + +Get Ubuntu +---------- +Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition. + +Get VirtualBox and VirtualBox Guest Additions +--------------------------------------------- +Make sure you have the VirtualBox Guest Additions ISO for your version of VirtualBox. I'm using VirtualBox 5.1.28. Save the Guest Additions ISO on your host computer along with the Ubuntu ISO. Get the Guest Additions ISO from here: + http://download.virtualbox.org/virtualbox +*NOTE*: Guest Additions versions prior to 5.1 will not work with Ubuntu 16.04.3. If you have an earlier version of VirtualBox, you should upgrade to the latest 5.1 version. + +Create a new VM in VirtualBox for Ubuntu +---------------------------------------- +Type: Linux + +Version: Ubuntu (64-bit) + +At least 2048 MB memory + +At least 40 GB VDI + +Network: Attached to: NAT + +Create a port-forwarding rule for SSH +------------------------------------- +Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM. + +Go to "Network" settings in VirtualBox, add a port forwarding rule: + +Name: SSH + +Protocol: TCP + +Host IP: 127.0.0.1 + +Host Port: 1022 + +Guest IP: <leave blank> + +Guest Port: 22 + +.. image:: ../images/Configure_ubuntu_SO_1.png + +. + +.. image:: ../images/Configure_ubuntu_SO_2.png + +Create Shared Folder +-------------------- +This is oriented to Windows users. If you're using a MAC or a Linux host computer, the details may be different. You can share any folder on the host computer with the Ubuntu VM. On Windows, a practical choice is to share the C:\Users folder, so that your Windows home directory will be accessible from the Ubuntu VM. + +Go to "Shared Folders" settings in VirtualBox, add a share: + +Folder Path: C:\Users + +Folder Name: Users + +Auto-mount: <checked> + +Read-only: <unchecked> + +.. image:: ../images/Configure_ubuntu_SO_3.png + +. + +.. image:: ../images/Configure_ubuntu_SO_4.png + +Install Ubuntu in the VM +------------------------ +On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image. + +.. image:: images/Configure_ubuntu_SO_5.png + +After selecting the ISO image, start the VM. + +Follow the prompts to install Ubuntu. + +Proxy Configuration (optional) +------------------------------ +If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here. +**Ubuntu system proxy setting:** + + System Settings → Network → Network proxy + + (Replace "proxyhost" and port with your actual proxy information) + +.. image:: images/Configure_ubuntu_SO_6.png + +**apt proxy setting:** + Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information): + + Acquire::http::Proxy "http://proxyhost:port"; + + Reboot the VM. + +Install SSH Server +------------------ + +.. code-block:: bash + + sudo apt update + sudo apt install openssh-server + +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 + +Install VirtualBox Guest Additions +---------------------------------- +On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image. + +.. image:: images/Configure_ubuntu_SO_8.png + +In a VM terminal window, mount the cdrom: + +.. code-block:: bash + + sudo mkdir -p /media/cdrom + sudo mount /dev/cdrom /media/cdrom + +Install necessary dependencies: + +.. code-block:: bash + + sudo apt update + sudo apt install gcc g++ dkms + +Install the guest additions. NOTE: look for errors in the command output! If you see an error that says you are missing kernel headers, the most likely cause is that you are using a VirtualBox version that is too old. The error message is misleading. + +.. code-block:: bash + + cd /media/cdrom + sudo ./VBoxLinuxAdditions.run + +.. image:: ../images/Configure_ubuntu_SO_9.png + +Add yourself to the vboxsf user group (replace "userid" with your user ID): + +.. code-block:: bash + + sudo usermod -a -G vboxsf userid + +Reboot the VM. + +In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here: + /media/sf_Users + +Further Reading +---------------------------------------- + +.. toctree:: + :maxdepth: 1 + + Install_Docker.rst + Configure_git_and_gerrit.rst + Workspace_and_Development_Tools.rst
\ No newline at end of file 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..2fca64e4ac --- /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 |