Skip to content

Deploy a stack that hosts a compute node that is configured for GUI interaction with a motorbike model in 3D virtual space via Resource Manager or CLI.

Notifications You must be signed in to change notification settings

oci-hpc/oci-openfoam-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

OCI OpenFOAM Workshop

Total Time: 45-60 minutes

Motorbike Simulation on Oracle Cloud Infrastructure (OCI)

Overview

Deploy a stack that hosts a compute node that is configured for GUI interaction with a motorbike model in 3D virtual space.

Here is what gets installed on the compute node:

  • VNCServer for providing GUI access to the remote machine
  • a copy of a motorbike model that was assembled using OpenFOAM, a computational fluid dynamics software.
  • ParaView for provising GUI access to the motorbike model

Table of Contents

  • Phase 1: Deploy the stack using Resource Manager or Command Line
  • Phase 2: Visualize the motorbike model on the compute node
  • Phase 3: Deprovision the stack using Resource Manager or Command Line

Prerequisites

  • Access to an OCI Tenancy (account)
  • VNC Viewer installed on your local machine as a client application for VNCServer.
  • Permissions to manage the following resources in some Compartment: Virtual Cloud Network, Subnet, Route Table, Security List, Internet Gateway, Compute Instance. (See Identity and Access Management Policies)
  • Sufficient availability to provision 1 x each of the aformentioned resources. You can check resource availability:
Hamburger Menu > Governance > Limits, Quotas and Usage
Check resource availability

Phase 1. Deploy the stack

🕒   30 or 40 minutes

You can deploy the stack via Resource Manager or Command Line. Click into one of these methods to be directed to the section where you deploy the stack. You will be directed back to this page for Phase 2 when it is time to visualize the motorbike model.

  • Resource Manager, a stack manager that is accessible as a GUI on the OCI portal.

🕒   30 minutes

  • Command Line using ocihpc, an HPC stack deployment tool for the CLI.

🕒   40 minutes

Phase 2. Visualize the motorbike model on OCI

🕒   15 minutes

Step 1. Connect to your remote host via VNC.

🕒   5 minutes

  1. Find the public IP address of your remote host after the deployment job has finished:
Resource Manager

If you deployed your stack via Resource Manager, find the public IP address of the compute node at the bottom of the CLI console logs.

Command Line

If you deployed your stack via Command Line, find the public IP address of the compute node at the bottom of the console logs on the Logs page, or on the Outputs page.

  1. Establish a port mapping from port 5901 on your local machine to port 5901 on the remote host.
Unix-based OS

Establish the port mapping using the following command:

	ssh -i SSH_PRIVATE_KEY_PATH -L 5901:localhost:5901 opc@REMOTE_HOST_IP_ADDRESS
	
Windows

a. Establish the port mapping

b. Encrypt the SSH tunnel

  1. Execute the following command on your remote machine to launch a VNCServer instance on port 5901 on the remote host:

vncserver
Port mapping from localhost to remote host. Note that the user in this example is using Mac OS as a local machine.
  1. On your local machine, open VNC Viewer.

  2. Enter localhost:5901 into the search bar and press return.

VNC Viewer
  1. Enter the password HPC_oci1 when prompted.
Enter VNC password
  1. Click through the default options (Next, Skip) to get to the end with the VNC setup wizard:

language options > keyboard layout options > location services options > connect online accounts options
GUI desktop options - choose language

Step 2. Visualize the simulation using ParaView.

🕒   5 minutes

  1. Open Files from your VNC Viewer window:

click Applications > hover over Accessories > click Files > on the left side of the window, click Home
  1. Open ParaView:

double-click ParaView > double-click bin > double-click paraview
3. In ParaView, open the motorbike.foam file:

File > Open > choose /home/opc/work/motorbike.foam
Open motorbike.foam in ParaView
  1. Under the Properties pane on the left side of Paraview, select Mesh Regions to select everything, and then deselect the options that do not start with the string motorBike_. You can adjust the windows to make this section of the GUI easier to access e.g. by closing PipeLine Browser section by clicking X.
Before selection of motorBike_ options
After selection of motorBike_ options
  1. Click the green Apply button to render the motorbike image. If a window with a list of errors appears, titled Output Messages, you may close it.

  1. The motorbike model should appear in the large window titled RenderView1. Use your mouse and its left-click button to manipulate it in virtual 3D space!
Motorbike model

Phase 3. Deprovision the stack

🕒   5 minutes

Deprovision the stack with the same tool you used to deploy the stack:

Resource Manager

If you used Resource Manager to deploy the stack, continue to the final step in the Resource Manager section.

Command Line

If you used Command Line to deploy the stack, continue to the final step in the Command Line section.

About

Deploy a stack that hosts a compute node that is configured for GUI interaction with a motorbike model in 3D virtual space via Resource Manager or CLI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published