This article covers the configuration and management of the license server and compute nodes using the Lumerical AWS integration Python module .
Requisites
- Lumerical-AWS integration configuration .
- Modify your PYTHONPATH variable and add the directory of Lumerical's AWS module and Python API to your system PATH. See our API section: Python integration for more information.
- The default installation directory are,
-
Windows
C:\Program Files\Lumerical\[[verpath]]\api\python
-
Linux
/opt/lumerical/[[verpath]]/api/python
-
macOS
/Applications/Lumerical\ [[verpath]].app/Contents/Applications/FDTD\ Solutions.app/Contents/API/Python
-
Windows
* The version ( highlighted ) might change depending on your installation.
Create VPC
Amazon Virtual Private Cloud (VPC) enables you to launch AWS resources into a specific virtual network. This virtual network closely resembles a traditional network that you'd operate in your local network or data center. On AWS, this is highly scalable.
Command: lumerical.aws.create_virtual_private_cloud
From python, ( e.g. using Windows )
>>> import sys
>>> sys.path.append('C:/Program Files/Lumerical/[[verpath]]/api/python') # (optional, if the PATH is already set in your environment)
>>> import lumerical.aws
>>> lumerical.aws.create_virtual_private_cloud(name='NAME', own_ip='IP_RANGE')
Where:
- NAME , is replaced with the VPC name you want to create .
-
IP_RANGE , is replaced with the IP Address/Range that is allowed access to your instances.
Typically, this is your local network's Internet IP Address ( My IP ), which can be found in the AWS Management console > Networks > Security Groups > Inbound rules for the security group you are using. - If IP_RANGE is omitted, the individual EC2 instances can be access from any computer using the correct Key_Pair or VNC_password created from the configuration section.
Example:
- Create a new VPC with the name, " aws-demo ", IP_Range, " 192.168.100.101/32 ".
>>> import lumerical.aws
>>> lumerical.aws.create_virtual_private_cloud(name='aws-demo', own_ip='192.168.100.101/32') - Once your VPC is created, The following information is generated.
AWS account number: 0123456789012
AWS availability zone: us-east-1
License server network adapter: 00:11:22:22:aa:bb
Please contact Lumerical with the above information to obtain the required license.
Notes
- FDTD cloud pack license is the recommended license model to use with Lumerical-AWS integration .
- With the cloud pack license, this can be activated anytime within the validity period and is typically good to use for the next 30 days. See: FDTD Cloud pack license activation for details.
- Save the License File provided in the same directory as where you saved your Key Pair .
More information on AWS:
Initialize VPC
Once we have the license file for our license server, we can now initialize our VPC, and create and launch the license server.
Command: lumerical.aws.initialize_virtual_private_cloud
- cd or change the working directory where the license file and the key pair are saved.
Windows:
cd c:\<saved_directory>\
Linux and macOS:
cd /$HOME/<saved_folder>/ - Then execute the following commands in Python. ( e.g. shown using python3 )
> python3
>>> import lumerical.aws
>>> lumerical.aws.initialize_virtual_private_cloud(name='NAME', license_file='LIC_FILE.lic', ami_id='AMI_ID', lic_ami_id='LIC_AMI_ID', key_pair_name='KEY_PAIR')
Where:
- NAME , VPC name created above .
- LIC_FILE.lic , is the filename of your license file, provided by Lumerical for your VPC.
- KEY_PAIR , the private key pair you created and stored into the same location as you license file.
- AMI_ID , Lumerical's Linux image (AMI) used in creating compute instances.
- LIC_AMI_ID , Lumerical's Linux image (AMI) used in creating license server instance.
Notes
- For the list of AMI IDs to use this JSON formatted list of AMI IDs or contact us.
- From the list choose the latest release; "latest-license-server" and "latest-products", AMI IDs or any of the previously released versions.
Example:
Shown using 2019b R2 AMIs
- VPC Name: aws-demo
- License File: aws-demo.lic
- Compute node AMI ID: ami-0732cb7539aabbefa (2019b R2 release)
- License node AMI ID: ami-05759a2085048df27 (2019b R2 release)
- Private Key: aws-demo-key
>>> import lumerical.aws
>>> lumerical.aws.initialize_virtual_private_cloud(name='aws-demo', licens_file='aws-demo.lic', ami_id='ami-0732cb7539aabbefa', lic_ami_id='ami-05759a2085048df27', key_pair_name='aws-demo-key')
- Initializing your VPC will create and launch the license server with these specs.
- Instance type: t2.micro
- Storage size: 50 GB of EBS storage capacity
- Instance is configured to Stop and Not to terminate on Shutdown .
- VPC and compute instances will be created based on the supported Lumerical AMIs on region; us-east-1 , " US-East (N. Virginia) "
- FlexNet license manager installed and license file included in the user-data startup script.
Managing the license server
After we have configured and launched the license server instance. We can check the ' State ', ' Start ' or ' Stop ' the license server, without affecting the active license.
Check server state
Command: lumerical.aws.license_server_status
Checking the status indicates the current state of the FlexNet license manager. If its running, it shows the following information;
- feature/products included in the license
- expiration date of the license
- license server port and hostname or IP address
- path and filename of the license file
- current state of the LUMERICL daemon
- number of available and used licenses
- user that checked out the license ( if any )
> python3
>>> import lumerical.aws
>>> lumerical.aws.license_server_status(name='aws-demo')
Start server
Starting the license server will launch the license server instance, startup FlexNet license manager if it is not running, read your licenses file and shows details of your license manager and active license.
Command: lumerical.aws. start_license_server
> python3
>>> import lumerical.aws
>>> lumerical.aws.start_license_server(name='aws-demo')
Stop server
Stopping the license server will Stop the license server instance but will not terminate the instance.
Command: lumerical.aws. stop_license_server
> python3
>>> import lumerical.aws
>>> lumerical.aws.stop_license_server(name='aws-demo')
Configure compute node
Once the license server instance has been configured we can now configure and check the status of our compute instances.
Command: lumerical.aws. configure_compute_instance
> python3
>>> import lumerical.aws
>>> lumerical.aws.configure_compute_instance(name='NAME', instance_type='TYPE', max_storage_in_gb='MAX_STORE')
Where:
- NAME , VPC name created above .
- TYPE , a valid EC2 instance type. if left blank, t2.micro, instance type is used.
- MAX_STORE , the hard drive capacity. Should be 60 GB or larger. If this is not specified, 60GB is used.
Check compute node status
Checking the compute nodes' instance reports the following,
- instance ID
- current state: " Running" , " Stopped" or " Teminated" .
- workgroup_ID
- private IP
- public IP
Command: lumerical.aws. compute_instance_status
> python3
>>> import lumerical.aws
>>> lumerical.aws.compute_instance_status(name='NAME')
Where:
- NAME , VPC name created above.