seshukm | 888a1dc | 2019-07-24 15:37:40 +0530 | [diff] [blame^] | 1 | .. _onap_so_schema_version_2_0: |
| 2 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 3 | .. http://creativecommons.org/licenses/by/4.0 |
| 4 | .. Copyright 2018 Huawei Technologies Co., Ltd. |
| 5 | |
| 6 | Install and Configure Service Orchestrator |
| 7 | ========================================== |
| 8 | |
| 9 | Get Ubuntu |
| 10 | ---------- |
| 11 | Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition. |
| 12 | |
| 13 | Get VirtualBox and VirtualBox Guest Additions |
| 14 | --------------------------------------------- |
| 15 | Make sure you have the VirtualBox Guest Additions ISO for your version of |
| 16 | VirtualBox. I'm using VirtualBox 5.1.28. Save the Guest Additions ISO on your |
| 17 | host computer along with the Ubuntu ISO. Get the Guest Additions ISO from |
| 18 | here: http://download.virtualbox.org/virtualbox |
| 19 | |
| 20 | *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. |
| 21 | |
| 22 | Create a new VM in VirtualBox for Ubuntu |
| 23 | ---------------------------------------- |
| 24 | Type: Linux |
| 25 | Version: Ubuntu (64-bit) |
| 26 | At least 2048 MB memory |
| 27 | At least 40 GB VDI |
| 28 | Network: Attached to: NAT |
| 29 | |
| 30 | Create a port-forwarding rule for SSH |
| 31 | ------------------------------------- |
| 32 | Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM. |
| 33 | Go to "Network" settings in VirtualBox, add a port forwarding rule: |
| 34 | Name: SSH |
| 35 | Protocol: TCP |
| 36 | Host IP: 127.0.0.1 |
| 37 | Host Port: 1022 |
| 38 | Guest IP: <leave blank> |
| 39 | Guest Port: 22 |
| 40 | |
| 41 | Create Shared Folder |
| 42 | -------------------- |
| 43 | 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. |
| 44 | Go to "Shared Folders" settings in VirtualBox, add a share: |
| 45 | Folder Path: C:\Users |
| 46 | Folder Name: Users |
| 47 | Auto-mount: <checked> |
| 48 | Read-only: <unchecked> |
| 49 | |
| 50 | Install Ubuntu in the VM |
| 51 | ------------------------ |
| 52 | On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image. |
| 53 | |
| 54 | After selecting the ISO image, start the VM. |
| 55 | Follow the prompts to install Ubuntu. |
| 56 | |
| 57 | Proxy Configuration (optional) |
| 58 | ------------------------------ |
| 59 | If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here. |
| 60 | **Ubuntu system proxy setting**: |
| 61 | |
| 62 | - System Settings → Network → Network proxy |
| 63 | (Replace "proxyhost" and port with your actual proxy information) |
| 64 | |
| 65 | **apt proxy setting**: |
| 66 | |
| 67 | - Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information): |
| 68 | Acquire::http::Proxy "http://proxyhost:port"; |
| 69 | - Reboot the VM. |
| 70 | |
| 71 | Install SSH Server |
| 72 | ------------------ |
| 73 | sudo apt update |
| 74 | sudo apt install openssh-server |
| 75 | |
| 76 | Connect to the VM from your host computer |
| 77 | ----------------------------------------- |
| 78 | The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM. |
| 79 | |
| 80 | Install VirtualBox Guest Additions |
| 81 | ---------------------------------- |
| 82 | On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image. |
| 83 | |
| 84 | In a VM terminal window, mount the cdrom:: |
| 85 | |
| 86 | sudo mkdir -p /media/cdrom |
| 87 | sudo mount /dev/cdrom /media/cdrom |
| 88 | |
| 89 | Install necessary dependencies:: |
| 90 | |
| 91 | sudo apt update |
| 92 | sudo apt install gcc g++ dkms |
| 93 | |
| 94 | Install the guest additions. NOTE: look for errors in the command output! |
| 95 | If you see an error that says you are missing kernel headers, the most likely |
| 96 | cause is that you are using a VirtualBox version that is too old. |
| 97 | The error message is misleading.:: |
| 98 | |
| 99 | cd /media/cdrom |
| 100 | sudo ./VBoxLinuxAdditions.run |
| 101 | |
| 102 | Add yourself to the vboxsf user group (replace "userid" with your user ID):: |
| 103 | |
| 104 | sudo usermod -a -G vboxsf userid |
| 105 | |
| 106 | Reboot the VM. |
| 107 | In a VM terminal window, verify that you can access your home directory on the |
| 108 | host computer, which should be mounted under /media/sf_Users |
| 109 | |
| 110 | Further Reading |
| 111 | ---------------------------------------- |
| 112 | https://wiki.onap.org/display/DW/Development+Environment |