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.usernameThe GitHub username of the account containing your repositorygit.repositoryThe GitHub repository containing this filegit.branchThe GitHub repository branch for this particular virtual machine. Also the AMI Description.
aws.name_tagTheNametag that will be attached to the various items created in AWSaws.region_nameThe EC2 region that will be hosting the virtual Machines. Full list under Amazon Elastic Compute Cloud (Amazon EC2)aws.vpc_cidrPrivate IP address range of the VPCaws.subnet_cidrAddress ranges of each subnetaws.rdp.bucketThe name of the S3 bucket where the RDP files will be stored.
ami.linuxSearch term used to find Linux AMIami.windowsSearch 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.ec2typeEC2 type. RecommendT3orT3aflexnet.ec2sizeEC2 size. Recommendnanoormicroflexnet.volumeSizeThe drive volume size in GB. Recommend8flexnet.securityGroupThe name of the security group used by the license server
These are for the FME Server machine
fmeserver.ec2typeEC2 type. RecommendT3orT3afmeserver.ec2sizeEC2 size. Recommendmediumorlargefmeserver.volumeSizeThe drive volume size in GB. Recommend40fmeserver.securityGroupName of the security group that will be createdfmeserver.docker-compose.yamlDocker yaml url. List can be found here
These are for the training virtual machines
-
fme.ec2typeEC2 type. RecommendT3orT3a -
fme.ec2sizeEC2 size. Recommendlargeorxlarge -
fme.volumeSizeThe drive volume size in GB. Recommend80 -
fme.securityGroupThe security group the virtual machines will belong to -
fme.timezoneThe desired Windows timezone for the virtual machine -
fme.portForwardingForwards additional ports to 3389 so they can be used for Remote Desktop -
fme.firewallPorts to be opened in the Widows Firewall -
fme.passwordThe desired password for the virtual machine -
fme.licenseThe IP address of the floating license server -
fme.installAppsApps to be installed by Chocolatey package manager -
fme.vm.instanceInitiatedShutdownBehaviourWhat happens to the virtual machine when it is turned off -
fme.vm.SubjectEmail subject line -
fme.vm.fromEmailEmail address the connection files will be sent from -
fme.vm.CCEmailAdditional email address used to report problems when VM is created -
fme.vm.BCCEmailBCC email address. Can be used to copy emails to a CRM
fme.vm.template.emailThe template used for the email containing the RDP connection filesfme.vm.template.rdpThe 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 Servicesweb 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.usernameandgit.repository, and add a webconnection for theGMAIL_NAMED_CONNECTIONprivate 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.
