machinabio / limbforge-service

Single-purpose microservice to generate STLs from parametric CAD designs.
Apache License 2.0
3 stars 1 forks source link

Make image for Fusion360 worker #6

Closed kaitlynhova closed 7 years ago

kaitlynhova commented 7 years ago

Include all dependancies and configs to start a new Fusion360 worker.

luzlab commented 7 years ago

Here's a quick rundown of the commands I ran to generate the image:

  1. Create EC2 instance, 100GB provisioned storage, Win2016 Base AMI.
  2. Log in and run as admin:
    • command winrm set winrm/config/Service/Auth @{Basic="true"}
    • command winrm set winrm/config/Service @{AllowUnencrypted="true”}
    • powershell Enable-PSRemoting -force
    • powershell iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    • powershell Set-Item wsman:\localhost\client\trustedhosts *
    • powershell Restart-Service WinRM
    • powershell winrm quickconfig interactive to open up firewall - find alternative!
    • powershell wget https://dl.appstreaming.autodesk.com/production/installers/Fusion%20360%20Admin%20Install.exe -OutFile fusion360Installer.exe
    • powershell .\fusion360Installer.exe --quiet
    • powershell .\fusion360Installer.exe --update --quiet
    • powershell choco install -y autodesk-fusion360 (instead of the preceeding 3 commands)
    • powershell choice install googlechrome
  3. Copied the plugin to the Fusion360 API plugins folder
  4. Opened Fusion360
    1. Logged in with valid Autodesk credentials
    2. In API/Plugins, set "shift-io-agent" plugin to run at startup
luzlab commented 7 years ago

Done, ami-df3954bf is tested.

luzlab commented 7 years ago

Check this documentation for using SysPrep to create image. https://docs.aws.amazon.com/es_es/AWSEC2/latest/WindowsGuide/ec2launch.html#ec2launch-download

luzlab commented 7 years ago

I ran C:\ProgramData\Amazon\EC2-Windows\Launch\Settings\EC2 Launch Settings.exe on the Windows instance before shutting down and re-imaging. The app resets the initial boot behavior of the image. This allows us to use the resulting AMI to launch additional instances.

luzlab commented 7 years ago

New AMI is ami-ce7815ae.

luzlab commented 7 years ago

Tested logging in via RDP. Also successfully executed a remote command.

$pass = convertto-securestring "<PASSWORD>" -asplaintext -force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist "Administrator",$pass
Invoke-Command -ComputerName 34.208.13.94 -Credential $cred -Authentication basic -scriptBlock {echo 0}
# returns '0'