The files in this repository are used to create virtual machines for FME training courses, and to allow students to request virtual machines on-demand. The virtual machines are Amazon AWS EC2 machines. The webpage used for requesting the virtual machines is a static page hosted on AWS S3.
A basic understanding of GitHub, Amazon AWS, FME Desktop, and FME Server is required. You will also require an AWS account and a GitHub account.
On your local machine, you will need an installation of GitHub Desktop and FME Desktop. You may also need Boto3 for Python installed on your local machine.
On AWS, you will need to create an S3 bucket to store the RDP files that are created, and set the Permissions to allow public access. You may also want to set a Lifecycle policy to delete the RDP files after 2 weeks.
Be aware that the default VPC limit per region is 5. If you currently have 5 VPCs in your desired region, you will have to request an increase in the VPC limit.
- Fork this Repository to your own account
- Edit settings.json
- Run QuickSetup.fmw
- Create and tag AMI
- Publish VMCreator.fmw to FME Server/Cloud
- Create FME Server App to allow virtual machine creation
There are two files in the repository that need to be edited, and two workspaces that need to be edited and published to FME Server. The two files you will eventually edit are:
- settings.json
- InitialConfiguration.bat
Create a new IAM user for Programatic Access. Select Attach existing policies to user directly and select the AmazonEC2FullAccess policy. This creates an access key and secret key. Make note of those somewhere safe; you'll need them later in the FME Virtual Machines IAM Amazon Web Services
web connection
Click Fork. Once forked into your own account, click Settings. Change the repository name if desired. Create a branch that will be the name of the course.
git.username
The GitHub username of the account containing your repositorygit.repository
The GitHub repository containing this filegit.branch
The GitHub repository branch for this particular virtual machine. Also the AMI Description.
aws.name_tag
TheName
tag that will be attached to the various items created in AWSaws.region_name
The EC2 region that will be hosting the virtual Machines. Full list under Amazon Elastic Compute Cloud (Amazon EC2)aws.vpc_cidr
Private IP address range of the VPCaws.subnet_cidr
Address ranges of each subnetaws.rdp.bucket
The name of the S3 bucket where the RDP files will be stored.
ami.linux
Search term used to find Linux AMIami.windows
Search term used to find Windows AMI. Use"Microsoft Windows Server 2016 with Desktop Experience Locale English AMI provided by Amazon"
or"Microsoft Windows Server 2019 with Desktop Experience Locale English AMI provided by Amazon"
These are used for the FlexNet license server.
flexnet.ec2type
EC2 type. RecommendT3
orT3a
flexnet.ec2size
EC2 size. Recommendnano
ormicro
flexnet.volumeSize
The drive volume size in GB. Recommend8
flexnet.securityGroup
The name of the security group used by the license server
These are for the FME Server machine
fmeserver.ec2type
EC2 type. RecommendT3
orT3a
fmeserver.ec2size
EC2 size. Recommendmedium
orlarge
fmeserver.volumeSize
The drive volume size in GB. Recommend40
fmeserver.securityGroup
Name of the security group that will be createdfmeserver.docker-compose.yaml
Docker yaml url. List can be found here
These are for the training virtual machines
-
fme.ec2type
EC2 type. RecommendT3
orT3a
-
fme.ec2size
EC2 size. Recommendlarge
orxlarge
-
fme.volumeSize
The drive volume size in GB. Recommend80
-
fme.securityGroup
The security group the virtual machines will belong to -
fme.timezone
The desired Windows timezone for the virtual machine -
fme.portForwarding
Forwards additional ports to 3389 so they can be used for Remote Desktop -
fme.firewall
Ports to be opened in the Widows Firewall -
fme.password
The desired password for the virtual machine -
fme.license
The IP address of the floating license server -
fme.installApps
Apps to be installed by Chocolatey package manager -
fme.vm.instanceInitiatedShutdownBehaviour
What happens to the virtual machine when it is turned off -
fme.vm.Subject
Email subject line -
fme.vm.fromEmail
Email address the connection files will be sent from -
fme.vm.CCEmail
Additional email address used to report problems when VM is created -
fme.vm.BCCEmail
BCC email address. Can be used to copy emails to a CRM
fme.vm.template.email
The template used for the email containing the RDP connection filesfme.vm.template.rdp
The settings for the RDP files; watch out for the domain value
This step creates your AWS EC2 Environment
- Open QuickSetup.fmw
- Right-Click on the
FME Virtual Machines IAM Amazon Web Services
web connection and selectEdit Connection
- Set your AWS Access Key ID and AWS Secret Access Key values in the Web Connection Parameters.
- Run Quicksetup.fmw
- Follow the instructions in LicenseServerInfo.txt file to request a license.
- Edit the safe.lic file so that the serial number is removed.
- Save the safe.lic file into your GitHub repository and push any updates.
- Reboot the license server machine.
OnstartConfiguration.bat is run by the Task Scheduler on the virtual machines every time the virtual machine starts (or restarts). This allows you to perform additional configuration steps at startup.
A "Template" instance was created by the QuickStart workspace. Once it is finished setting up, it should automatically stop. This should only take an hour to accomplish. If the machine is still running after an hour, log in and check to see if some of the installation has failed, or start another instance by running the WorkspaceRunner_InitialMachineCreator transformer in the QuickStart workspace again. When the "Template" machine has stopped, start it, log in, and do the steps in the PostCreationSteps.md file.
Once the machine is configured, create an image (AMI) where the Description value is the same as the Git Branch name. This Description value is used by the VMCreator.fmw file to launch virtual machines on demand.
- Using the public IP address, log into FME Server. Username and password are
admin
- Change the admin password
- Activate FME Server
- Open VMCreator.fmw, set the private parameters
git.username
andgit.repository
, and add a webconnection for theGMAIL_NAMED_CONNECTION
private parameter. Publish to the FMETraining repository (or a repository of your choice) on FME Server.
You can unselect the course name. That way you can re-use the same workspace for multiple courses, and just create a new FME Server App for each course after forking the GitHub repository.
Fork the current GitHub branch, and give it a name that matches the Description tag on the AMI.
If you are not using a permanent license for FME Server, you'll have to re-license it on occasion.