Unlike the License Server AMI, the Product AMI requires that you create your own AMI with a few additions before they can be used as nodes in a pseudo-cluster (for a cluster on AWS with a job scheduler see our guide for AWS ParallelCluster). These changes are:
- SSH configuration (for MPI job-launching and communication)
- License server configuration
- Any additional changes you wish to make
Prerequisites
- Access to Lumerical Amazon Linux AMI
- Create and configure your VPC and Security Group
- Create a key-pair and IAM Role
Pricing
This guide only involves creating an AMI that will be used to run simulations later. Therefore we recommend that you use a relatively small (cheap) instance, that will only be running long enough to configure the instance and run some basic tests. For example, running a c5.large instance for 2 hours will cost $0.17 USD.
Once your AMI is created, you will be charged for storing it. An AMI is backed by an EBS Snapshot, which costs $0.05 per GB-month (or around USD $1/month for a 20GB AMI).
For a more accurate cost estimate for configuring your instance, or if you want to see how much it will cost to run your final compute instances, see AWS Pricing Calculator.
Product AMI Custom Configuration
- Launch an instance of the Lumerical product AMI in the same way as was done with license manager. Use a small instance like c5.large since we are not running any simulations yet.
- Login with SSH
- Edit the aws-fdtd-config.json file and specify your S3 bucket and bucket region
- Create a configuration file to set your license manager using this command and substituting the PRIVATE IP address of your license manager server.
mkdir -p ~/.config/Lumerical; printf "[license]\nflexserver\host=27011@<server_privat_ip>\n" > ~/.config/Lumerical/License.ini
OR for a system-wide configuration:
sudo su; mkdir -p /opt/lumerical/[[verpath]]/Lumerical; printf "[license]\nflexserver\host=27011@<server_privat_ip>\n" > /opt/lumerical/[[verpath]]/Lumerical/License.ini
- Setup an SSH key so all instances with this AMI can communicate with one another over MPI.
ssh-keygen -N "" -f ~/.ssh/cluster_key
cat .ssh/cluster_key.pub >> .ssh/authorized_keys
printf "Host *\n StrictHostKeyChecking no\nIdentityFile ~/.ssh/cluster_key\n" >.ssh/config
chmod 600 .ssh/config - Test your connection by starting an ssh session from the instance to itself, you should not be prompted for a password when you run the following command:
[ec2-user@ip-<Private IP> ~]$ ssh <Private IP>
- You are now ready to create your own snapshot/AMI (see below)
Creating your AMI
- From the EC2 management console dashboard, go to your Instances and select the compute node you have created.
TIP: Add a name tag to this instance for quick identification . - Ensure that the selected instance is in the STOPPED state.
- Otherwise, Stop the instance.
- Create Image from this instance.
- Provide a unique image name and short description of your AMI.
- Use the default or current settings.
- Create the image
- This might take some time to finish.
- Once created and available, you can use this AMI to launch more compute nodes.
- Take note of the AMI ID for your image. This will be used later for your Launch Template.
- This might take a few minutes to finish and get the AMI running and ready.