#
2. Make a Compute Node
Setting up compute 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.
- Go to the EC2 instance setup page through marketplace.
- Find the Flight Solo image here or by searching the marketplace for "Flight Solo".
The image, along with this documentation is open-source, and freely available to use. However if more help is needed, the developers of Flight Solo offer paid additional support.
- Click "Continue to Subscribe"
- Read the terms and conditions, then click "Continue to Configuration"
- 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.
- Click on "Usage Instructions" to see some instructions on how to get started, and a link to this documentation.
- Select the "Launch from EC2" action
- Click "Launch" to go to the EC2 instance setup page.
#
Configuring Settings
- Set the instance name and number of instances.
- Confirm that the region(top right, next to username) is the same as the region the login node was created in.
- In the "Application and OS Images" section, confirm that Flight Solo is the selected AMI.
- In the "Instance type" section, choose the required instance size.
- In the "Keypair" section, select a keypair to use. It is good practice to use the same keypair for the login and compute nodes.
- 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.
- 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.
- 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.
- Back on the compute node creation page, click "Launch Instance".
Repeat this process for any other types of nodes that need to be added to the cluster.
- Go the EC2 instance console
- Click "Launch Instance" to go to the EC2 instance setup page.
#
Configuring Settings
- Set the instance name and number of instances.
- Confirm that the region(top right, next to username) is the same as the region the login node was created in.
- In the "Application and OS Images" section choose the "My AMIs" tab and select your imported solo AMI.
- In the "Instance type" section, choose the required instance size.
- In the "Keypair" section, select a keypair to use. It is good practice to use the same keypair for the login and compute nodes.
- 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.
- 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.
- 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.
- Back on the compute node creation page, click "Launch Instance".
Repeat this process for any other types of nodes that need to be added to the cluster.
- Go to the Openstack instances page.
Click "Launch Instance", and the instance creation window will pop up.
Fill in the instance name, and leave the number of instances as 2, then click next.
- Choose the desired image to use by clicking the up arrow at the end of its row. It will be displayed in the "Allocated" section when selected.
- Choose the desired instance size by clicking the up arrow at the end of its row. It will be displayed in the "Allocated" section when selected.
- Choose a network in the same way as an image or instance size. Note that this should be the same network as the login node.
- Choose a security group in the same way as an image or instance size. Note that this should be the same network as the login node.
- Choose the keypair in the same way as an image or instance size.
- In the "Configuration" section, there is a "Customisation Script" section with a text box. This will be used to set custom data.
a. Copy this cloud init script into the text box, 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 "Instances" page in the "Compute" section. The login node created on the previous page should be visible, use its private IP.
c. Log in to the login node.
d. Become the root user and open the file ~/.ssh/id_alcescluster.pub
, copy the contents to the cloud init script.
- When all options have been selected, press the "Launch Instance" button to launch. If the button is greyed out, then a mandatory setting has not been configured.
- Go to the Microsoft Azure portal.
- Go to Virtual Machines, and click "Create".
- Select "Azure virtual machine", which will load this page:
- On the Basics page:
- Set Subscription to your subscription type.
- Set Resource Group to your desired resource group (where the vm will be kept after creation).
- Set Virtual machine name to any suitable name.
- Set Image to the imported Flight Solo Image.
It may be necessary to open the dropdown and/or see all images in order to find the imported image.
- Set Size to your choice of size.
- Set Authentication type to
SSH public key
- Set Username to the same username as with the login node.
- Set SSH public key source to the same key that was used for the login node.
- Fill in the Key pair name/Stored key/Use existing key as appropriate to the chosen public key source.
- Allow traffic to selected ports, and select
SSH(22
,HTTP(80)
andHTTPS(443)
as the allowed ports. - Set the most appropriate license type.
- Continuing on to the next page, Disks, all necessary details should already be filled out, so this page can be skipped (unless you know what you want to change). However, it is recommended to select Delete with VM.
Go on to the networking tab and fill out the necessary options.
- Set Virtual Network to the same network that was used for the login node.
- Set Subnet to the same subnet that was used for the login node.
- Set Public IP to an existing public IP or create a new one by pressing "Create new" and setting a name.
- Set NIC network security group to "Advanced", and press "Create new" to create a new security group.
- Click on "Add an inbound rule" to open the inbound rule creator
- Create rules to allow
HTTP
,HTTPS
andSSH
traffic from your IP address to the security group.
- Click on "Add an inbound rule" to open the inbound rule creator
- When complete, press "OK" at the bottom left of the screen to return to image creation.
The Management and Monitoring tabs have more options that aren't necessary for setup. Skip to the Advanced tab.
- In the Custom data and cloud init section, there is a text box.
- Copy this cloud init script into the custom 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>
- To get the information necessary for the cloud init script. Go to Virtual Machines.
- Then click on the virtual machine of the login node to view it.
- Get the "Private IP" and put that in the cloud init data.
- Get the "Public IP" and use it to log in to the login node.
- Become the root user and open the file
~/.ssh/id_alcescluster.pub
, copy the contents to the cloud init script.
- Skip to the Review + Create section. Azure will take some time to review your settings. If there are no issues click "Create" to finish creation.
Repeat these steps to create more compute nodes. As long as they are part of the same cluster, they will use the same cloud init data.