diff options
18 files changed, 217 insertions, 209 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java index f58382f53c..b86681ebfc 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -45,12 +47,13 @@ import org.springframework.stereotype.Component; @WebService(serviceName = "TenantAdapter", endpointInterface = "org.onap.so.adapters.tenant.MsoTenantAdapter", targetNamespace = "http://org.onap.so/tenant") @Component public class MsoTenantAdapterImpl implements MsoTenantAdapter { - public static final String CREATE_TENANT = "CreateTenant"; + public static final String CREATE_TENANT = "createTenant"; public static final String OPENSTACK = "OpenStack"; public static final String QUERY_TENANT = "QueryTenant"; public static final String DELETE_TENANT = "DeleteTenant"; public static final String ROLLBACK_TENANT = "RollbackTenant"; - + private static final String SUCCESS_RESPONSE_OPENSTACK="Successfully received response from Open Stack"; + private static final String OPENSTACK_COMMUNICATE_EXCEPTION_MSG="Exception while communicate with Open Stack"; @Resource private WebServiceContext wsContext; @@ -84,7 +87,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { Boolean backout, MsoRequest msoRequest, Holder <String> tenantId, - Holder <TenantRollback> rollback) throws TenantException, TenantAlreadyExists { + Holder <TenantRollback> rollback) throws TenantException { MsoLogger.setLogContext (msoRequest); MsoLogger.setServiceName (CREATE_TENANT); @@ -104,7 +107,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { try { tUtils = tFactory.getTenantUtils (cloudSiteId); } catch (MsoCloudSiteNotFound me) { - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); throw new TenantException (me); } @@ -113,11 +116,11 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { long queryTenantStartTime = System.currentTimeMillis (); try { newTenant = tUtils.queryTenantByName (tenantName, cloudSiteId); - logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, QUERY_TENANT, null); + logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, QUERY_TENANT, null); } catch (MsoException me) { - logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", OPENSTACK, QUERY_TENANT, null); + logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, OPENSTACK, QUERY_TENANT, null); String error = "Create Tenant " + tenantName + ": " + me; - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "Exception while communicate with Open Stack", me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, me); logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new TenantException (me); } @@ -127,11 +130,11 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { long createTenantStartTime = System.currentTimeMillis (); try { newTenantId = tUtils.createTenant (tenantName, cloudSiteId, metadata, backout.booleanValue ()); - logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, CREATE_TENANT, null); + logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, CREATE_TENANT, null); } catch (MsoException me) { - logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", OPENSTACK, CREATE_TENANT, null); + logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, OPENSTACK, CREATE_TENANT, null); String error = "Create Tenant " + tenantName + ": " + me; - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "Exception while communicate with Open Stack", me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, me); logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error); throw new TenantException (me); } @@ -176,7 +179,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { try { tUtils = tFactory.getTenantUtils (cloudSiteId); } catch (MsoCloudSiteNotFound me) { - logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); + logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me); throw new TenantException (me); } @@ -184,7 +187,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter { long subStartTime = System.currentTimeMillis (); try { qTenant = tUtils.queryTenant (tenantNameOrId, cloudSiteId); - logger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, QUERY_TENANT, null); + logger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, QUERY_TENANT, null); if (qTenant == null) { // Not found by ID, Try by name. qTenant = tUtils.queryTenantByName (tenantNameOrId, cloudSiteId); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java index f4bda4aaa0..3e3c6754dc 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -69,7 +71,9 @@ public class ValetClient { private static final String DEFAULT_BASE_URL = "http://localhost:8080/"; private static final String DEFAULT_BASE_PATH = "api/valet/placement/v1"; private static final String DEFAULT_AUTH_STRING = ""; - + private static final String REQUEST_ID="requestId"; + private static final String HEADERS=", headers="; + private static final String BODY=", body="; @Autowired private ObjectMapper mapper; @@ -100,7 +104,7 @@ public class ValetClient { GenericValetResponse<ValetCreateResponse> gvr = null; try { - UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId); + UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId); URI uri = builder.build(); ValetCreateRequest vcr = this.createValetCreateRequest(regionId, tenantId, serviceInstanceId, vnfId, vnfName, vfModuleId, vfModuleName, keystoneUrl, heatRequest); @@ -108,7 +112,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vcr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet create req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet create req: " + uri.toString() + HEADERS + headers.toString() + BODY + body.toString()); response = restTemplate.exchange(uri, HttpMethod.POST, entity, ValetCreateResponse.class); gvr = this.getGVRFromResponse(response); @@ -128,7 +132,7 @@ public class ValetClient { GenericValetResponse<ValetUpdateResponse> gvr = null; try { - UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId); + UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId); URI uri = builder.build(); ValetUpdateRequest vur = this.createValetUpdateRequest(regionId, tenantId, serviceInstanceId, vnfId, vnfName, vfModuleId, vfModuleName, keystoneUrl, heatRequest); @@ -136,7 +140,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vur); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet update req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet update req: " + uri.toString() + HEADERS + headers.toString() + ", body=" + body.toString()); response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetUpdateResponse.class); gvr = this.getGVRFromResponse(response); @@ -155,7 +159,7 @@ public class ValetClient { GenericValetResponse<ValetDeleteResponse> gvr = null; try { - UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId); + UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId); URI uri = builder.build(); ValetDeleteRequest vdr = this.createValetDeleteRequest(regionId, tenantId, vfModuleId, vfModuleName); @@ -163,7 +167,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vdr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet delete req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet delete req: " + uri.toString() + HEADERS + headers.toString() + ", body=" + body.toString()); response = restTemplate.exchange(uri, HttpMethod.DELETE, entity, ValetDeleteResponse.class); gvr = this.getGVRFromResponse(response); @@ -190,7 +194,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vcr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet confirm req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body); + LOGGER.debug("valet confirm req: " + uri.toString() + HEADERS + headers.toString() + BODY + body); response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetConfirmResponse.class); gvr = this.getGVRFromResponse(response); @@ -217,7 +221,7 @@ public class ValetClient { String body = mapper.writeValueAsString(vrr); HttpHeaders headers = generateHeaders(requestId); HttpEntity<String> entity = new HttpEntity<>(body, headers); - LOGGER.debug("valet rollback req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString()); + LOGGER.debug("valet rollback req: " + uri.toString() + HEADERS + headers.toString() + BODY + body.toString()); response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetRollbackResponse.class); gvr = this.getGVRFromResponse(response); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java index dfd257b06b..4f7afa2d5c 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -26,7 +28,6 @@ import java.util.Map; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; -import com.woorea.openstack.heat.model.CreateStackParam; /* * This class represents the heat request as sent to OpenStack as defined in the diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy index 808bbc1898..df4698de9d 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy @@ -311,8 +311,8 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { //Get Service Instance Info String serviceInstanceId = getVariableEnforced(execution, "DoCVNF_serviceInstanceId") - String globalCustId = execution.getVariable("global-customer-id") - String serviceType = execution.getVariable("service-type") + String globalCustId = execution.getVariable("globalCustomerId") + String serviceType = execution.getVariable("serviceType") Map<String, String> payload = new LinkedHashMap<>(); payload.put("vnf-id", vnfId); @@ -337,7 +337,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { resourceClient.connect(uri, siUri) }catch(Exception ex) { - msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process " + ex.getMessage()) + msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process ", ex) exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf CreateGenericVnf Process") } msoLogger.trace("COMPLETED DoCreateVnf CreateGenericVnf Process") diff --git a/docs/bpmn/BPMN_Main_Process_Flows.rst b/docs/developer_info/BPMN_Main_Process_Flows.rst index 43e08ffd9c..43e08ffd9c 100644 --- a/docs/bpmn/BPMN_Main_Process_Flows.rst +++ b/docs/developer_info/BPMN_Main_Process_Flows.rst diff --git a/docs/bpmn/BPMN_Project_Deployment_Strategy.rst b/docs/developer_info/BPMN_Project_Deployment_Strategy.rst index 50f48363ed..50f48363ed 100644 --- a/docs/bpmn/BPMN_Project_Deployment_Strategy.rst +++ b/docs/developer_info/BPMN_Project_Deployment_Strategy.rst diff --git a/docs/bpmn/BPMN_Project_Structure.rst b/docs/developer_info/BPMN_Project_Structure.rst index 209ec727c3..209ec727c3 100644 --- a/docs/bpmn/BPMN_Project_Structure.rst +++ b/docs/developer_info/BPMN_Project_Structure.rst diff --git a/docs/bpmn/BPMN_Subprocess_Process_Flows.rst b/docs/developer_info/BPMN_Subprocess_Process_Flows.rst index 098f38ff02..098f38ff02 100644 --- a/docs/bpmn/BPMN_Subprocess_Process_Flows.rst +++ b/docs/developer_info/BPMN_Subprocess_Process_Flows.rst diff --git a/docs/Building_SO.rst b/docs/developer_info/Building_SO.rst index 7d68e433cc..7d68e433cc 100644 --- a/docs/Building_SO.rst +++ b/docs/developer_info/Building_SO.rst diff --git a/docs/bpmn/Camunda_Cockpit_Community_Edition.rst b/docs/developer_info/Camunda_Cockpit_Community_Edition.rst index a9379decc9..a9379decc9 100644 --- a/docs/bpmn/Camunda_Cockpit_Community_Edition.rst +++ b/docs/developer_info/Camunda_Cockpit_Community_Edition.rst diff --git a/docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst b/docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst index 3e2d15bf15..3e2d15bf15 100644 --- a/docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst +++ b/docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst diff --git a/docs/bpmn/Camunda_Modeler.rst b/docs/developer_info/Camunda_Modeler.rst index 54f3534210..54f3534210 100644 --- a/docs/bpmn/Camunda_Modeler.rst +++ b/docs/developer_info/Camunda_Modeler.rst diff --git a/docs/ONAP_SO_Env_Setup_Guide.pdf b/docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf Binary files differindex 44b8d9cad6..44b8d9cad6 100644 --- a/docs/ONAP_SO_Env_Setup_Guide.pdf +++ b/docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf diff --git a/docs/Working_with_SO_Docker.rst b/docs/developer_info/Working_with_SO_Docker.rst index ee958efa41..ee958efa41 100644 --- a/docs/Working_with_SO_Docker.rst +++ b/docs/developer_info/Working_with_SO_Docker.rst diff --git a/docs/developer_info/developer_information.rst b/docs/developer_info/developer_information.rst new file mode 100644 index 0000000000..8613f2605c --- /dev/null +++ b/docs/developer_info/developer_information.rst @@ -0,0 +1,20 @@ +.. 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 Developer Information +======================== + +.. toctree:: + :maxdepth: 1 + +.. developer_info/developer_info_Project_Structure.rst + developer_info/Camunda_Modeler.rst +.. developer_info/developer_info_Main_Process_Flows.rst +.. developer_info/developer_info_Subprocess_Process_Flows.rst +.. developer_info/developer_info_Project_Deployment_Strategy.rst + developer_info/Building_SO.rst + developer_info/Working_with_SO_Docker.rst + developer_info/Camunda_Cockpit_Community_Edition.rst + developer_info/Camunda_Cockpit_Enterprise_Edition.rst +
\ No newline at end of file diff --git a/docs/developer_information.rst b/docs/developer_information.rst deleted file mode 100644 index 739a1f2050..0000000000 --- a/docs/developer_information.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. 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 Developer Information
-========================
-
-.. toctree::
- :maxdepth: 1
-
- BPMN_Project_Structure.rst
- Camunda_Modeler.rst
- BPMN_Main_Process_Flows.rst
- BPMN_Subprocess_Process_Flows.rst
- BPMN_Project_Deployment_Strategy.rst
- Building_SO.rst
- Working_with_SO_Docker.rst
- Camunda_Cockpit_Community_Edition.rst
- Camunda_Cockpit_Enterprise_Edition.rst
-
\ No newline at end of file diff --git a/docs/Install_Configure_SO.rst b/docs/installconfigure/Install_Configure_SO.rst index e06385e39b..bdfd328fc5 100644 --- a/docs/Install_Configure_SO.rst +++ b/docs/installconfigure/Install_Configure_SO.rst @@ -1,164 +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
-
- installconfigure/Install_Docker.rst
- installconfigure/Configure_git_and_gerrit.rst
- installconfigure/Workspace_and_Development_Tools.rst
\ No newline at end of file +.. 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/release-notes.rst b/docs/release_notes/release-notes.rst index b27b2a3eca..b27b2a3eca 100644 --- a/docs/release-notes.rst +++ b/docs/release_notes/release-notes.rst |