mirror of
https://github.com/actions/runner-images.git
synced 2025-12-10 10:58:13 +00:00
Cleanup ubuntu1804 image references (#7388)
This commit is contained in:
committed by
GitHub
parent
425daf97b4
commit
e72606ffb6
@@ -1,5 +1,5 @@
|
||||
# GitHub Actions Runner Images
|
||||
The runner-images project uses [Packer](https://www.packer.io/) to generate disk images for the following platforms: Windows 2019/2022, Ubuntu 18.04/20.04/22.04.
|
||||
The runner-images project uses [Packer](https://www.packer.io/) to generate disk images for the following platforms: Windows 2019/2022, Ubuntu 20.04/22.04.
|
||||
Each image is configured through a JSON template that Packer understands and which specifies where to build the image (Azure in this case), and what scripts to run to install software and prepare the disk.
|
||||
The Packer process initializes a connection to Azure subscription via Azure CLI, and automatically creates the temporary Azure resources required to build the source VM(temporary resource group, network interfaces, and VM from the "clean" image specified in the template).
|
||||
If the VM deployment succeeds, the build agent connects to the VM and starts to execute installation steps from the JSON template.
|
||||
@@ -60,13 +60,13 @@ Set-Location C:\runner-images
|
||||
|
||||
Import-Module .\helpers\GenerateResourcesAndImage.ps1
|
||||
|
||||
GenerateResourcesAndImage -SubscriptionId {YourSubscriptionId} -ResourceGroupName "myTestResourceGroup" -ImageGenerationRepositoryRoot "$pwd" -ImageType Ubuntu1804 -AzureLocation "East US"
|
||||
GenerateResourcesAndImage -SubscriptionId {YourSubscriptionId} -ResourceGroupName "myTestResourceGroup" -ImageGenerationRepositoryRoot "$pwd" -ImageType Ubuntu2004 -AzureLocation "East US"
|
||||
```
|
||||
Where:
|
||||
- `SubscriptionId` - The Azure subscription Id where resources will be created.
|
||||
- `ResourceGroupName` - The Azure resource group name where the Azure resources will be created.
|
||||
- `ImageGenerationRepositoryRoot` - The root path of the image generation repository source.
|
||||
- `ImageType` - The type of the image being generated. Valid options are: "Windows2019", "Windows2022", "Ubuntu1804", "Ubuntu2004", "Ubuntu2204".
|
||||
- `ImageType` - The type of the image being generated. Valid options are: "Windows2019", "Windows2022", "Ubuntu2004", "Ubuntu2204".
|
||||
- `AzureLocation` - The location of the resources being created in Azure. For example "East US".
|
||||
|
||||
The function automatically creates all required Azure resources and kicks off packer image generation for the selected image type.
|
||||
@@ -74,13 +74,13 @@ The function automatically creates all required Azure resources and kicks off pa
|
||||
For optional authentication via service principal make sure to provide the following params — `AzureClientId`, `AzureClientSecret`, `AzureTenantId`, so the whole command will be:
|
||||
|
||||
```
|
||||
GenerateResourcesAndImage -SubscriptionId {YourSubscriptionId} -ResourceGroupName "myTestResourceGroup" -ImageGenerationRepositoryRoot "$pwd" -ImageType Ubuntu1804 -AzureLocation "East US" -AzureClientId {AADApplicationID} -AzureClientSecret {AADApplicationSecret} -AzureTenantId {AADTenantID}
|
||||
GenerateResourcesAndImage -SubscriptionId {YourSubscriptionId} -ResourceGroupName "myTestResourceGroup" -ImageGenerationRepositoryRoot "$pwd" -ImageType Ubuntu2004 -AzureLocation "East US" -AzureClientId {AADApplicationID} -AzureClientSecret {AADApplicationSecret} -AzureTenantId {AADTenantID}
|
||||
```
|
||||
|
||||
As extra options, you can add more params for permit to add Azure Tags on resources and enable https for Storage Account. It could be helpful on some tenants with hardenning policy. Params are — `EnableHttpsTrafficOnly` (Boolean) and `tags` (HashTable), so the whole command will be:
|
||||
|
||||
```
|
||||
GenerateResourcesAndImage -SubscriptionId {YourSubscriptionId} -ResourceGroupName "myTestResourceGroup" -ImageGenerationRepositoryRoot "$pwd" -ImageType Ubuntu1804 -AzureLocation "East US" -EnableHttpsTrafficOnly $true -tags @{dept="devops";env="prod"}
|
||||
GenerateResourcesAndImage -SubscriptionId {YourSubscriptionId} -ResourceGroupName "myTestResourceGroup" -ImageGenerationRepositoryRoot "$pwd" -ImageType Ubuntu2004 -AzureLocation "East US" -EnableHttpsTrafficOnly $true -tags @{dept="devops";env="prod"}
|
||||
```
|
||||
|
||||
*Please, check synopsis of `GenerateResourcesAndImage` for details about non-mandatory parameters.*
|
||||
|
||||
Reference in New Issue
Block a user