Update References to Ubuntu 18.04 to 20.04 (#2535)

* Update References to 18.04 to 20.04

* Fixing Ubuntu Image.

* Fix image.
This commit is contained in:
Noah McGregor Harper
2022-10-28 10:17:57 -07:00
committed by GitHub
parent 539861b573
commit c277cd1ec3
11 changed files with 35 additions and 37 deletions

View File

@ -27,9 +27,7 @@ jobs:
matrix: matrix:
os: os:
- [ self-hosted, "1ES.Pool=onefuzz-ci", "1ES.ImageOverride=github-runner-image-windows-2019" ] - [ self-hosted, "1ES.Pool=onefuzz-ci", "1ES.ImageOverride=github-runner-image-windows-2019" ]
- [ self-hosted, "1ES.Pool=onefuzz-ci", "1ES.ImageOverride=github-runner-image-ubuntu-18.04" ] - [ self-hosted, "1ES.Pool=onefuzz-ci", "1ES.ImageOverride=github-runner-image-ubuntu-20.04" ]
#- [ self-hosted, "1ES.Pool=onefuzz-ci", "1ES.ImageOverride=github-runner-image-ubuntu-20.04" ]
#- [ self-hosted, "1ES.Pool=onefuzz-ci", "1ES.ImageOverride=github-runner-image-ubuntu-22.04" ]
runs-on: "${{ matrix.os }}" runs-on: "${{ matrix.os }}"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -100,7 +98,7 @@ jobs:
name: build-artifacts name: build-artifacts
path: artifacts path: artifacts
azcopy: azcopy:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: src/ci/azcopy.sh - run: src/ci/azcopy.sh
@ -109,7 +107,7 @@ jobs:
name: build-artifacts name: build-artifacts
path: artifacts path: artifacts
check-pr: check-pr:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
@ -176,7 +174,7 @@ jobs:
# set a minimum confidence to ignore known false positives # set a minimum confidence to ignore known false positives
vulture --min-confidence 61 onefuzz vulture --min-confidence 61 onefuzz
contrib-webhook-teams-service: contrib-webhook-teams-service:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
@ -194,7 +192,7 @@ jobs:
isort --profile black webhook isort --profile black webhook
flake8 webhook flake8 webhook
deploy-onefuzz-via-azure-devops: deploy-onefuzz-via-azure-devops:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
@ -209,7 +207,7 @@ jobs:
python -m pip install tox pipenv python -m pip install tox pipenv
tox tox
onefuzztypes: onefuzztypes:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: src/ci/set-versions.sh - run: src/ci/set-versions.sh
@ -222,7 +220,7 @@ jobs:
name: build-artifacts name: build-artifacts
path: artifacts path: artifacts
proxy: proxy:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Rust Prereq Cache - name: Rust Prereq Cache
@ -256,7 +254,7 @@ jobs:
service: service:
needs: needs:
- onefuzztypes - onefuzztypes
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: src/ci/set-versions.sh - run: src/ci/set-versions.sh
@ -367,7 +365,7 @@ jobs:
name: build-artifacts name: build-artifacts
path: artifacts path: artifacts
afl: afl:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: src/ci/afl.sh - run: src/ci/afl.sh
@ -377,7 +375,7 @@ jobs:
path: artifacts path: artifacts
aflpp: aflpp:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: src/ci/aflpp.sh - run: src/ci/aflpp.sh
@ -386,7 +384,7 @@ jobs:
name: build-artifacts name: build-artifacts
path: artifacts path: artifacts
dotnet-fuzzing-tools-linux: dotnet-fuzzing-tools-linux:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: src/ci/dotnet-fuzzing-tools.sh - run: src/ci/dotnet-fuzzing-tools.sh
@ -406,7 +404,7 @@ jobs:
name: build-artifacts name: build-artifacts
path: artifacts path: artifacts
radamsa-linux: radamsa-linux:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/cache@v3 - uses: actions/cache@v3
@ -451,7 +449,7 @@ jobs:
- aflpp - aflpp
- radamsa-linux - radamsa-linux
- radamsa-win64 - radamsa-win64
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
@ -508,7 +506,7 @@ jobs:
name: release-artifacts name: release-artifacts
path: release-artifacts path: release-artifacts
build-integration-tests-linux: build-integration-tests-linux:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: | - run: |
@ -649,7 +647,7 @@ jobs:
name: integration-test-artifacts name: integration-test-artifacts
path: src/integration-tests/artifacts path: src/integration-tests/artifacts
integration-tests-linux: integration-tests-linux:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
needs: needs:
- build-integration-tests-linux - build-integration-tests-linux
- dotnet-fuzzing-tools-linux - dotnet-fuzzing-tools-linux

View File

@ -71,7 +71,7 @@ stages:
set -ex set -ex
unzip onefuzz-deployment-$(onefuzz_release.version).zip unzip onefuzz-deployment-$(onefuzz_release.version).zip
pip install -r requirements.txt pip install -r requirements.txt
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update sudo apt-get update
sudo apt-get install azure-functions-core-tools-4 sudo apt-get install azure-functions-core-tools-4

View File

@ -13,7 +13,7 @@ If you have a custom Windows VHD, you should follow the
[Guide to prepare a VHD for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image). [Guide to prepare a VHD for Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image).
From there, rather than using Image SKUs such as From there, rather than using Image SKUs such as
`Canonical:UbuntuServer:18.04-LTS:latest`, use the full resource ID to the `Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest`, use the full resource ID to the
shared image, such as shared image, such as
`/subscriptions/MYSUBSCRIPTION/resourceGroups/MYGROUP/providers/Microsoft.Compute/galleries/MYGALLERY/images/MYDEFINITION/versions/MYVERSION` `/subscriptions/MYSUBSCRIPTION/resourceGroups/MYGROUP/providers/Microsoft.Compute/galleries/MYGALLERY/images/MYDEFINITION/versions/MYVERSION`

View File

@ -88,14 +88,14 @@ $ onefuzz pools create my-pool linux --query pool_id
"9e779388-a9c2-4934-9fa2-6ed6f6a7792a" "9e779388-a9c2-4934-9fa2-6ed6f6a7792a"
``` ```
To create a managed scaleset of Ubuntu 18.04 VMs using a [general purpose To create a managed scaleset of Ubuntu 20.04 VMs using a [general purpose
Azure VM](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes) that Azure VM](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes) that
belongs to the pool: belongs to the pool:
```console ```console
$ onefuzz scalesets create my-pool $VM_COUNT $ onefuzz scalesets create my-pool $VM_COUNT
{ {
"image": "Canonical:UbuntuServer:18.04-LTS:latest", "image": "Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
"pool_name": "my-pool", "pool_name": "my-pool",
"region": "eastus", "region": "eastus",
"scaleset_id": "eb1e9602-4acf-40b8-9216-a5d598d27195", "scaleset_id": "eb1e9602-4acf-40b8-9216-a5d598d27195",

View File

@ -73,14 +73,14 @@ Let's fuzz the `Func` function of our example library named [problems](../../src
3. Build our [wrapper](../../src/integration-tests/libfuzzer-dotnet/wrapper/): 3. Build our [wrapper](../../src/integration-tests/libfuzzer-dotnet/wrapper/):
``` ```
dotnet publish ./wrapper/wrapper.csproj -c release -r ubuntu.18.04-x64 -o my-fuzzer dotnet publish ./wrapper/wrapper.csproj -c release -r ubuntu.20.04-x64 -o my-fuzzer
``` ```
> **Warning** > **Warning**
> This will generate a “self-contained” .NET binary. The runtime identifier (RID) specified > This will generate a “self-contained” .NET binary. The runtime identifier (RID) specified
> for the `-r` option should match the OS that your OneFuzz nodes are running. > for the `-r` option should match the OS that your OneFuzz nodes are running.
> If this is not correct, running your .NET binary on OneFuzz may fail due to missing shared libraries. > If this is not correct, running your .NET binary on OneFuzz may fail due to missing shared libraries.
> >
> The Linux node OS is currently Ubuntu 18.04 by default, so in that case use `ubuntu.18.04-x64`. > The Linux node OS is currently Ubuntu 20.04 by default, so in that case use `ubuntu.20.04-x64`.
> RIDs for other versions can be found in the [.NET Core RID Catalog](https://github.com/dotnet/docs/blob/main/docs/core/rid-catalog.md). > RIDs for other versions can be found in the [.NET Core RID Catalog](https://github.com/dotnet/docs/blob/main/docs/core/rid-catalog.md).
4. Then we need to ensure our [problems](../../src/integration-tests/libfuzzer-dotnet/problems/) library is instrumented: 4. Then we need to ensure our [problems](../../src/integration-tests/libfuzzer-dotnet/problems/) library is instrumented:

View File

@ -4,7 +4,7 @@ OneFuzz is cross-platform, and the actively-supported platforms vary by componen
### CLI ### CLI
We continuously test the CLI on Windows 10 Pro and Ubuntu 18.04 LTS, both on the We continuously test the CLI on Windows 10 Pro and Ubuntu 20.04 LTS, both on the
x64 architecture. The CLI client is written in Python 3, and targets Python 3.7 x64 architecture. The CLI client is written in Python 3, and targets Python 3.7
and up. We distribute a self-contained executable CLI build for Windows which and up. We distribute a self-contained executable CLI build for Windows which
bundles a Python interpreter. bundles a Python interpreter.
@ -15,8 +15,8 @@ OneFuzz deploys targets into Azure Virtual Machine Scale Sets for fuzzing (and
supporting tasks). OneFuzz permits arbitrary choice of VM SKU and OS Image, supporting tasks). OneFuzz permits arbitrary choice of VM SKU and OS Image,
including custom images. We continuously test on Window 10 Pro x64 (using the including custom images. We continuously test on Window 10 Pro x64 (using the
Azure OS image URN `MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest`) Azure OS image URN `MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest`)
and Ubuntu 18.04 LTS x64 (using the Azure OS image URN and Ubuntu 20.04 LTS x64 (using the Azure OS image URN
`Canonical:UbuntuServer:18.04-LTS:latest`). `Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest`).
### LibFuzzer Compilation ### LibFuzzer Compilation

View File

@ -696,7 +696,7 @@ If webhook is set to have Event Grid message format then the payload will look a
"allowed_aad_tenants": [ "allowed_aad_tenants": [
"00000000-0000-0000-0000-000000000000" "00000000-0000-0000-0000-000000000000"
], ],
"default_linux_vm_image": "Canonical:UbuntuServer:18.04-LTS:latest", "default_linux_vm_image": "Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
"default_windows_vm_image": "MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest", "default_windows_vm_image": "MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest",
"network_config": { "network_config": {
"address_space": "10.0.0.0/8", "address_space": "10.0.0.0/8",
@ -839,7 +839,7 @@ If webhook is set to have Event Grid message format then the payload will look a
"type": "object" "type": "object"
}, },
"default_linux_vm_image": { "default_linux_vm_image": {
"default": "Canonical:UbuntuServer:18.04-LTS:latest", "default": "Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
"title": "Default Linux Vm Image", "title": "Default Linux Vm Image",
"type": "string" "type": "string"
}, },
@ -2564,7 +2564,7 @@ If webhook is set to have Event Grid message format then the payload will look a
```json ```json
{ {
"image": "Canonical:UbuntuServer:18.04-LTS:latest", "image": "Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
"pool_name": "example", "pool_name": "example",
"region": "eastus", "region": "eastus",
"scaleset_id": "00000000-0000-0000-0000-000000000000", "scaleset_id": "00000000-0000-0000-0000-000000000000",
@ -6159,7 +6159,7 @@ If webhook is set to have Event Grid message format then the payload will look a
"type": "object" "type": "object"
}, },
"default_linux_vm_image": { "default_linux_vm_image": {
"default": "Canonical:UbuntuServer:18.04-LTS:latest", "default": "Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
"title": "Default Linux Vm Image", "title": "Default Linux Vm Image",
"type": "string" "type": "string"
}, },

View File

@ -339,7 +339,7 @@ public record InstanceConfig
[DefaultValue(InitMethod.DefaultConstructor)] NetworkSecurityGroupConfig ProxyNsgConfig, [DefaultValue(InitMethod.DefaultConstructor)] NetworkSecurityGroupConfig ProxyNsgConfig,
AzureVmExtensionConfig? Extensions, AzureVmExtensionConfig? Extensions,
string DefaultWindowsVmImage = "MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest", string DefaultWindowsVmImage = "MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest",
string DefaultLinuxVmImage = "Canonical:UbuntuServer:18.04-LTS:latest", string DefaultLinuxVmImage = "Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
string ProxyVmSku = "Standard_B2s", string ProxyVmSku = "Standard_B2s",
bool RequireAdminPrivileges = false, bool RequireAdminPrivileges = false,
IDictionary<Endpoint, ApiAccessRule>? ApiAccessRules = null, IDictionary<Endpoint, ApiAccessRule>? ApiAccessRules = null,
@ -355,7 +355,7 @@ public record InstanceConfig
new NetworkSecurityGroupConfig(), new NetworkSecurityGroupConfig(),
null, null,
"MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest", "MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest",
"Canonical:UbuntuServer:18.04-LTS:latest", "Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
"Standard_B2s", "Standard_B2s",
false false
) { } ) { }

View File

@ -189,7 +189,7 @@ def main() -> None:
scaleset_id=UUID(int=0), scaleset_id=UUID(int=0),
pool_name=PoolName("example"), pool_name=PoolName("example"),
vm_sku="Standard_D2s_v3", vm_sku="Standard_D2s_v3",
image="Canonical:UbuntuServer:18.04-LTS:latest", image="Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
region=Region("eastus"), region=Region("eastus"),
size=10, size=10,
), ),

View File

@ -890,7 +890,7 @@ class InstanceConfig(BaseModel):
default="MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest" default="MicrosoftWindowsDesktop:Windows-10:win10-21h2-pro:latest"
) )
default_linux_vm_image: str = Field( default_linux_vm_image: str = Field(
default="Canonical:UbuntuServer:18.04-LTS:latest" default="Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest"
) )
proxy_vm_sku: str = Field(default="Standard_B2s") proxy_vm_sku: str = Field(default="Standard_B2s")
api_access_rules: Optional[Dict[Endpoint, ApiAccessRule]] = None api_access_rules: Optional[Dict[Endpoint, ApiAccessRule]] = None

View File

@ -56,7 +56,7 @@ class TestScaleset(unittest.TestCase):
Scaleset( Scaleset(
pool_name=PoolName("test-pool"), pool_name=PoolName("test-pool"),
vm_sku="Standard_D2ds_v4", vm_sku="Standard_D2ds_v4",
image="Canonical:UbuntuServer:18.04-LTS:latest", image="Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
region=Region("westus2"), region=Region("westus2"),
size=-1, size=-1,
spot_instances=False, spot_instances=False,
@ -65,7 +65,7 @@ class TestScaleset(unittest.TestCase):
scaleset = Scaleset( scaleset = Scaleset(
pool_name=PoolName("test-pool"), pool_name=PoolName("test-pool"),
vm_sku="Standard_D2ds_v4", vm_sku="Standard_D2ds_v4",
image="Canonical:UbuntuServer:18.04-LTS:latest", image="Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
region=Region("westus2"), region=Region("westus2"),
size=0, size=0,
spot_instances=False, spot_instances=False,
@ -75,7 +75,7 @@ class TestScaleset(unittest.TestCase):
scaleset = Scaleset( scaleset = Scaleset(
pool_name=PoolName("test-pool"), pool_name=PoolName("test-pool"),
vm_sku="Standard_D2ds_v4", vm_sku="Standard_D2ds_v4",
image="Canonical:UbuntuServer:18.04-LTS:latest", image="Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest",
region=Region("westus2"), region=Region("westus2"),
size=80, size=80,
spot_instances=False, spot_instances=False,