# 2. Setting Up Compute Nodes

Setting up computes nodes is done slightly differently than a login node. In this example 2 compute nodes are setup, but it could be any non-zero number of compute nodes.

  1. Go to the EC2 instance setup page through marketplace.
  1. Find the Flight Solo image here or by searching the marketplace for "Flight Solo".
  1. Click "Continue to Subscribe"

  1. Read the terms and conditions, then click "Continue to Configuration"

  1. Configure region, software version (if unsure use the latest), and fulfillment option (if unsure use the default). Then click "Continue to Launch". Make sure the region is the same for all nodes to be used in a cluster.

  1. Click on "Usage Instructions" to see some instructions on how to get started, and a link to this documentation.

  1. Select the "Launch from EC2" action

  1. Click "Launch" to go to the EC2 instance setup page.
  1. Go the EC2 instance console

  1. Click "Launch Instance" to go to the EC2 instance setup page.

# Configuring Settings

  1. Set the instance name and number of instances.

  1. Confirm that the region(top right, next to username) is the same as the region the login node was created in.

  1. In the "Application and OS Images" section, confirm that Flight Solo is the selected AMI.

  1. In the "Application and OS Images" section choose the "My AMIs" tab and select your imported solo AMI.

  1. In the "Instance type" section, choose the required instance size.

  1. In the "Keypair" section, select a keypair to use. It is good practice to use the same keypair for the login and compute nodes.

  1. In the "Network settings" section, select the same network, subnet, and security group as the login node.

    a. To change the network and subnet, click the "Edit" button, and then use the drop downs to find the correct network and subnet.

  1. In the "Configure Storage" section, allocate as much memory as needed. 8GB is the minimum required for Flight Solo, so it is likely the compute nodes will not need much more than that, as the login node hosts most data.

  1. In the "Advanced details" section there are many settings, but at the bottom is a text box labeled "User data".

    a. Copy this cloud init script into the user data section, making sure to change the parts in <> brackets:

#cloud-config
write_files:
  - content: |
      SERVER=<private ip of login node>
    path: /opt/flight/cloudinit.in
    permissions: '0644'
    owner: root:root
users:
  - default    
  - name: root
    ssh_authorized_keys:
      - <Content of ~/.ssh/id_alcescluster.pub from root user on login node>

    b. To get the information necessary for the cloud init script. Go to the EC2 console. Make sure your region is set to the one used for login and compute nodes.

    c. Select the created login node to see more details about it, including the private ip.

    d. Log in to the login node.

    e. Become the root user and open the file ~/.ssh/id_alcescluster.pub, copy the contents to the cloud init script.

  1. Back on the compute node creation page, click "Launch Instance".