Managing projects

Last updated 18 April, 2019

About projects

A project is an abstract grouping of members (users) that is used to control access to cloud services and compute resources in HPE OneSphere. You can also think of a project as the set of resources that is assigned to a group of members. Projects can be accessed by a single member, or they can be assigned to multiple members for collaboration across teams.

Members are always working in the context of a project in HPE OneSphere.

A member can be assigned to more than one project. When logged in to HPE OneSphere, they can see and access only the services and resources available in the projects to which they are assigned. See User Roles for more information about what users have what permissions related to projects.

The Service project is created by default. Any virtual machines in a VMware vCenter cluster that existed before HPE OneSphere was connected to the VMware environment are automatically added to the Service project.

NOTE:

Any resources added to the Service project cannot currently be moved to a different project.

From the Projects screen in HPE OneSphere, you can add a new project or view and manage existing projects. When you select an existing project, you can:

  • View the details about the project's deployments

  • Add a new deployment by selecting from the Catalog screen

See also Viewing tags and resources.

Adding a project

Add a project to control member access to virtual machine deployments and cloud providers.

Prerequisites
  • You are an administrator or a Project Creator

Procedure
  1. From the HPE OneSphere main menu, select Projects.
  2. From the top right corner, click the plus sign.
  3. Enter a name for your project.
  4. Click Add Member and enter the name of the member you want to assign to the project.

    NOTE:

    The project creator is automatically added as the project owner when the project is created. If you try to add a member who was already added as a member, a "User not found" message is displayed.

  5. Click the three dots next to the member name and select Make Project Owner or Make Project Member.

    To remove the member, click Remove.

  6. Repeat steps 4 and 5 for each new member.
  7. (Optional): The HPE OneSphere administrator can enable project owners to add public providers and regions to a project.
  8. Click Create Project.

Editing a project

Edit a project to change the project's name and any related tags.

Procedure

  1. From the HPE OneSphere main menu, select Projects.
  2. Click the Update Project link under the project name. 

    NOTE:

    You cannot update the Service project.

  3. From the Update Project panel, update all fields you want to edit.
  4. Click Update Project when finished.

Deleting a project

Deleting a project removes all services, settings, and members associated with the project. Resources removed from a project are not permanently deleted, and there is currently no way to move resources from one project to another.

Prerequisites

The administrator removed all members associated with the project.

Procedure

  1. From the HPE OneSphere main menu, select Projects.
  2. Click the Update Project link under the project name.
  3. In the Update Project panel, click Delete Project

    IMPORTANT:

    Deleting a project is not reversible.

  4. Confirm the deletion by clicking Yes, Delete Project.

Assigning and managing members in a project

Administrators can assign members to a project to allow those members access to cloud services and cloud providers deployed to the project. A member is a user assigned to any role (administrator, analyst, or consumer.) Administrators can promote any member to be a project owner, which reduces the day-to-day tasks of the administrator. Administrators and project owners can manage the members added and removed from a project.

To add a member to HPE OneSphere, select Settings from the main menu. Then, select People.

Prerequisites

The administrator added a project.

Procedure

  1. From the HPE OneSphere main menu, select Projects.
  2. Click the Update Project link under the project name.
  3. In the Update Project panel, click the plus sign next to Members and enter the email address of the member you want to add to the project.
  4. To assign a member as a project owner, click the three dots next to the member name and select Make Project Owner.
  5. To remove project-owner status from a member, click the three dots next to the member name and select Make Project Member.
  6. To remove a member from a project, click the three dots next to the member name and select Remove.
  7. When you are finished adding new members and updating any existing ones, click Update Project.

    Each new member will receive an email inviting him or her to the project.

    Members currently assigned to the project are displayed.

  8. (Optional) Find the email addresses of members available to assign to the project.
    1. From the main menu, select Settings, then People.
    2. Select the name of a member and note or copy the email address.

Enabling project owners to add public providers and regions 

HPE OneSphere administrators can enable project owners to onboard public providers (Amazon Web Services and Microsoft Azure) and regions.

Prerequisites
  • You are an administrator

Procedure
  1. From the HPE OneSphere main menu, click Settings.
  2. From the Settings screen, click Policies.

    NOTE:

    Only administrators will be able to see and access the Policies link.

  3. From the Policies screen, enable or disable the Project Owner slider button  to allow or disallow project owners to add providers and regions.

Moving virtual machines from the Service project to another project 

When you create a new VMware ESXi zone in HPE OneSphere and connect to an existing VMware vCenter environment, all existing virtual machines are discovered and imported into the Service project in HPE OneSphere.

HPE OneSphere provides a Python script (transfer_vms_from_service_proj.py) to move the imported virtual machines from the Service project to other HPE OneSphere projects. You can download the script from this web page or by using the HPE OneSphere API.

Prerequisites
Procedure
  1. Download the script called transfer_vms_from_service_proj.py to the on-prem node either from this web page or using the HPE OneSphere API to $HOME.
    1.   Download HPE OneSphere transfer VMs from service project.zip  (File updated 11 January 2019)

      OR

    2. (Optional) Obtain the script using the HPE OneSphere API.

    1. Get a security token from the HPE OneSphere API server.
      POST https://<your-account>.hpeonesphere.com/rest/session 
       
      Input_body:
      {
        "userName": "<admin_username>",
        "password": "<admin_password>"
      }
    2. Obtain the script using the API or using a CURL command, and use the security token obtained in the previous step.

      Using the API:

      GET /rest/zones/{id}/node-recipes/transfer_vms_from_service_proj.py

      Using a CURL command:

      curl -X GET https://<your-account>.hpeonesphere.com/rest/zones/ 
      <zoneID>/node-recipes/transfer_vms_from_service_proj.py 
      -H "Content-Type: application/json" 
      -H "Authorization: $TOKEN" > transfer_vms_from_service_proj.py
      
  2. Prepare the project to virtual machines mapping input.json file to be used as input to the script.
    1. Prepare an OpenStack RC file and source it.
      vi $HOME/openrc 
       
      export OS_AUTH_URL=https://<your-account>.hpeonesphere.com/keystone/v3
      export OS_IDENTITY_API_VERSION=3
      export OS_REGION_NAME="<region_name>"
      export OS_USERNAME="<admin_username>"
      export OS_PASSWORD="<admin_password>"
      export OS_PROJECT_NAME="service" 
       
      source $HOME/openrc
    2. Obtain the IDs of the virtual machines in the Service project. You will need these IDs in step 2c.

      Using the OpenStack CLI:

      openstack server list

      (Optional) Using the API. The session/token to obtain the VM list should be scoped to the Service project.

      GET https://<your-account>.hpeonesphere.com/rest/deployments
    3. Create an input.json file in the following format.

      Replace <vm_id1>, <vm_id2>, and so on with the IDs you obtained in step 2b.

      vi $HOME/input.json 
      
      {
          "project_vms_mapping": [
              {
                  "project_name": "project1",
                  "user_name": "<admin_username@your_company.com>",
                  "vm_ids": ["<vm_id1>", "<vm_id2>"]
              },
              {
                  "project_name": "project2",
                  "user_name": "<admin_username@your_company.com>",
                  "vm_ids": ["<vm_id1>", "<vm_id2>"]
              }
          ]
      }
  3. Execute the Python script.
    python transfer_vms_from_service_proj.py -f $HOME/input.json
  4. Check the log file for any errors.
    tail /tmp/transfer_vms_from_service_proj.log

Viewing project costs

You can view the total monthly costs associated with individual projects from the Projects screen. For information about viewing cost analytics associated with all active projects, see Viewing cloud analytics: cost and resource usage.

Prerequisites

Procedure

  1. From the HPE OneSphere main menu, select Projects.
  2. From the Projects screen, click the project you want to view.
  3. Select Spending.
  4. The total monthly cost to date associated with that project will be displayed in the top right of the screen. 

    NOTE:

    It may take a few moments for this information to update and appear on screen.

Viewing project utilization 

The Quota Utilization screen shows information about project quotas in enabled zones. Data is shown in the format used / allocated.

  • Used reflects the amount of resources currently used by a given project.

  • Allocated reflects the default project quota, or the custom project quota set by the administrator. Project quotas are used to define the maximum amount of resources that each project is allowed to consume in a given zone.

Procedure
  1. From the HPE OneSphere main menu, click Projects.
  2. Click the project you want to view.
  3. From the resulting screen, click Quota Utilization.
  4. From the Quota Utilization screen, click the drop-down icon next to the private zone for which you want to view Quota Utilization.
  5. The quota utilization data is displayed in four categories.
    1. CPU (measured in number of cores)
    2. Storage (measured in gigabytes)
    3. Memory (measured in gigabytes)
    4. Virtual Machines (measured in number of virtual machine instances)

Exposing a project network to a project

When creating or updating a project, administrators can add networks from a set of available pre-defined VMware networks that will be made visible within that project space. When launching a deployment from a project, users can select from the set of networks made visible by the administrator. By default, projects do not initially have access to any networks.

Prerequisites
  • The administrator created a private zone.

  • Port groups have unique names. 

Procedure
  1. From the HPE OneSphere main menu, click Providers.
  2. On the Providers screen, click Private Zones.
  3. Click the VMware zone to which you want to launch deployments from your project.
  4. From the resulting screen, scroll down and click Project Networks next to the network icon. 

    NOTE:

    All pre-created networks, including DV uplink port groups and infrastructure networks (for example, ESXi Management and VSAN networks) will appear in the list of available Networks. Do not select or associate any infrastructure network or DV uplink port group for a project.

    The portgroup part of DVs, which was used while connecting HPE OneSphere, will be imported as project networks in HPE OneSphere.

  5. From the Project Networks page, click the project network you want to expose to your project.
  6. From the resulting screen, click Update Network under the project network name.
  7. On the Update Network screen, click the IP Address Assignment drop-down list and select the type of IP address (static or Provider DHCP).

    NOTE:

    Ensure that the name of the port group in the vCenter is unique. If there are similarities in port group names, edit the names in vCenter before deploying virtual machines.

  8. On the Update Network screen under Project Exposure, you can choose to share the network to all available projects or to a specific project.  

    1. To expose the network to all existing projects and any newly created projects, enable the Expose Network to All Projects toggle button.
      NOTE:

      Ensure that VMs are not present in that network before disabling the Expose Network to All Projects toggle button.

    2. To share a network to a specific project, type in the name of the project you want to expose to the project network in the search box for Expose Network to Specific Projects. The search is case sensitive. 
      If the network is already enabled, then this option will not appear for the user who logs in the second time. 

    The project name will appear below the search box. Any additional projects exposed to this project network are also listed.

  9. Click Update Network.

Updating project network IP address assignments

Prerequisites


  • The administrator created a private zone

Procedure

  1. From the HPE OneSphere main menu, click Providers.
  2. On the Providers screen, click Private Zones.
  3. Click the VMware zone to which you want to launch deployments from your project.
  4. From the resulting screen, scroll down and click Project Networks next to the network icon. 
  5. From the Project Networks page, click the project network you want to update.
  6. From the resulting screen, click Update Network under the project network name.
  7. From the Update Network screen:
    1. Click IP Address Assignment drop-down list and select Static.
    2. Enter Subnet CIDR of the Static IP address. Only IPv4 is supported. For example : 10.10.10.0/24
    3. (Optional) In Address Range Starting IP, define the starting IP range for the respective Static IP address. For example: 10.10.10.50
    4. (Optional) In Address Range Ending IP, define the ending IP range for the respective Static IP address. The maximum supported range of IP address is 255. For example: 10.10.10.200
    5. (Optional) In Gateway, enter the gateway details. 

      NOTE:

      If you specify the starting IP address range, then you must also specify the ending IP address range and the gateway.

    6. ( Optional ) Click Add DNS Server if you want to add a DNS server to the network. A maximum of two DNS servers can be added to the network.
  8. Click Update Network.