ocihpc
is a tool for simplifying deployments of HPC applications in Oracle Cloud Infrastructure (OCI).
The OCI user account you use in ocihpc
should have the necessary policies configured for OCI Resource Manager. Please check this link for information on required policies.
- Download the latest release with the following command and extract it:
curl -LO https://github.com/oracle-quickstart/oci-ocihpc/releases/download/v1.0.1/ocihpc_v1.0.1_linux_x86_64.tar.gz
- Make the ocihpc binary executable.
chmod +x ./ocihpc
- Move the ocihpc binary to your PATH.
sudo mv ./ocihpc /usr/local/bin/ocihpc
- Test that it works.
ocihpc version
- Download the latest release with the following command and extract it:
curl -LO https://github.com/oracle-quickstart/oci-ocihpc/releases/download/v1.0.1/ocihpc_v1.0.1_darwin_x86_64.tar.gz
- Make the ocihpc binary executable.
chmod +x ./ocihpc
- Move the ocihpc binary to your PATH.
sudo mv ./ocihpc /usr/local/bin/ocihpc
- Test that it works.
ocihpc version
-
Download the latest release from this link and extract it.
-
Add the ocihpc binary to your PATH.
-
Test that it works.
ocihpc.exe version
Run ocihpc configure
to check if you have a valid configuration to access OCI. The tool will walk you through creating a configuration.
You can get the list of available stacks by running ocihpc list
.
Example:
$ ocihpc list
List of available stacks:
ClusterNetwork
Gromacs
OpenFOAM
Create a folder that you will use as the deployment source.
IMPORTANT: Use a different folder per stack. Do not initialize more than one stack in the same folder. Otherwise, the tool will overwrite the previous one.
Change to that folder and run ocihpc init <stack name>
. ocihpc
will download the necessary files to that folder.
$ mkdir ocihpc-test
$ cd ocihpc-test
$ ocihpc init --stack ClusterNetwork
Downloading stack: ClusterNetwork
ClusterNetwork downloaded to /Users/opastirm/ocihpc-test/
IMPORTANT: Edit the contents of the /Users/opastirm/ocihpc-test/config.json file before running ocihpc deploy command
Before deploying, you need to change the values in config.json
file. The variables depend on the stack you deploy. An example config.json
for Cluster Network would look like this:
{
"variables": {
"ad": "kWVD:PHX-AD-1",
"bastion_ad": "kWVD:PHX-AD-2",
"bastion_shape": "VM.Standard2.1",
"node_count": "2",
"ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAA......W6 opastirm@opastirm-mac"
}
}
After you change the values in config.json
, you can deploy the stack with ocihpc deploy <arguments>
. This command will create a Stack on Oracle Cloud Resource Manager and deploy the stack using it.
For supported stacks, you can set the number of nodes you want to deploy by adding it to the ocihpc deploy
command. If the stack does not support it or if you don't provide a value, the tool will deploy with the default numbers.
For example, the following command will deploy a Cluster Network with 5 nodes:
$ ocihpc deploy --stack ClusterNetwork --node-count 5 --region us-ashburn-1 --compartment-id ocid1.compartment.oc1..6zvhnus3q
INFO: The tool will generate a deployment name that consists of <stack name>-<current directory>-<random-number>
.
Example:
$ ocihpc deploy --stack ClusterNetwork --node-count 5 --region us-ashburn-1 --compartment-id ocid1.compartment.oc1..6zvhnus3q
Deploying ClusterNetwork-ocihpc-test-7355 [0min 0sec]
Deploying ClusterNetwork-ocihpc-test-7355 [0min 17sec]
Deploying ClusterNetwork-ocihpc-test-7355 [0min 35sec]
...
When deployment is completed, you will see the the bastion/headnode IP that you can connect to:
Successfully deployed ClusterNetwork-ocihpc-test-7355
You can connect to your head node using the command: ssh opc@$123.221.10.8 -i <location of the private key you used>
You can also get the connection details by running ocihpc get ip
command.
When you are done with your deployment, you can delete it by changing to the stack folder and running ocihpc delete --stack <stack name>
.
Example:
$ ocihpc delete --stack ClusterNetwork
Deleting ClusterNetwork-ocihpc-test-7355 [0min 0sec]
Deleting ClusterNetwork-ocihpc-test-7355 [0min 17sec]
Deleting ClusterNetwork-ocihpc-test-7355 [0min 35sec]
...
Succesfully deleted ClusterNetwork-ocihpc-test-7355