-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for windows instances #104
base: main
Are you sure you want to change the base?
Conversation
Also fixes config not working by adding unattended flag
…current Linux only version
@machulav @crunchy234 I love this PR! While I can't speak to the goodness of the code, i really would love this functionality. I've really loved this Github action with my linux github runners, and I would love to use it with my Windows runners. |
Thanks @rsmall-apira. We are already using it as part of our CI workflow, and it is working well so far. |
Awesome work @crunchy234 ! Hope this gets merged, will be using your version in the mean time. |
@crunchy234 You switched around the cases for Windows when |
@mhriemers Thank you very much for this fix! This has now been merged and released as windows-support-7 |
# Conflicts: # README.md # action.yml # dist/index.js # src/aws.js # src/config.js
I think there are syntax errors where backticks were replaced by single quote, in linux user-data section, the vars substitution doesn't work so runner won't start. i'm trying the windows now, but it never connects, wonder why it might be.. the 30 seconds timeout seems short, is it all the time allowed for windows to get reachable, or it's just the interval it checks once in 30 seconds?
|
For a Windows server instance, it looks like the following: | ||
|
||
Note: This must be done over RDP since `choco install git` doesn't seem to install correctly over a session manager | ||
connection | ||
|
||
```.ps1 | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | ||
choco install git | ||
|
||
# Remove existing user data run once file (this is so that the user-data being set on instance start actually runs). | ||
rm C:\ProgramData\Amazon\EC2Launch\state\.run-once | ||
``` | ||
Note: The `.run-once` file needs to be deleted with every start of the instance you are snapshotting. | ||
If you stop and reboot the instance a few times please make sure you delete the `.run-once` file before creating the | ||
AMI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dmitry1987 This is what you need to do to get the Windows instance to start correctly and run the passed-in user commands.
Looks good thanks 🙏
…On Fri, May 24, 2024, 4:43 AM Joshua Cranch ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In README.md
<#104 (comment)>
:
> + For a Windows server instance, it looks like the following:
+
+ Note: This must be done over RDP since `choco install git` doesn't seem to install correctly over a session manager
+ connection
+
+ ```.ps1
+ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
+ choco install git
+
+ # Remove existing user data run once file (this is so that the user-data being set on instance start actually runs).
+ rm C:\ProgramData\Amazon\EC2Launch\state\.run-once
+ ```
+ Note: The `.run-once` file needs to be deleted with every start of the instance you are snapshotting.
+ If you stop and reboot the instance a few times please make sure you delete the `.run-once` file before creating the
+ AMI.
@Dmitry1987 <https://github.com/Dmitry1987> This is what you need to do
to get the Windows instance to start correctly and run the passed-in user
commands.
—
Reply to this email directly, view it on GitHub
<#104 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHPL6AMMYNYUXYSG7MBIV3ZDZPGRAVCNFSM5V2CRBCKU5DIOJSWCZC7NNSXTPCQOVWGYUTFOF2WK43UKJSXM2LFO45TEMBXGUYTIMJYHA2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
# Conflicts: # .github/workflows/package.yml # dist/index.js # package-lock.json # package.json # src/aws.js
I also needed functionality to spin up multiple ec2 instances with the same label. This is so I can run a matrix strategy with multiple python-versions in parallel like in normal GH actions. So this functionality has also been added to this fork now too |
This change allows windows instances to be launched and used in the same way as Linux instances.