Skip to content
Snippets Groups Projects
Commit 6c0847b6 authored by Zygmunt Krynicki's avatar Zygmunt Krynicki
Browse files

.oniro-ci: route jobs to specific instance sizes


Zephyr and FreeRTOS jobs do not require 16GB of RAM to build and
constitute the bulk of our CI (by number) quota usage. By moving them to
smaller instances, with 4GB of RAM, we can use the remaining quota
better.

On the infrastructure side we now have a new auto-scaling pool, with
s3.large.2 instances. Those join the existing s3.xlarge.4 (formerly
known as "heavy") and s3.large.8 (formerly known as "light").

The .workspace job uses the s2.large.8 by default, making a safe (but
expensive) default. Specific jobs deviate as follows:

 - zephyr and freertos jobs use s3.large.2
 - two blueprint jobs with more recipes use s3.xlarge.4

Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 04c7571c
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
interruptible: true interruptible: true
image: image:
name: registry.ostc-eu.org/ostc/containers/ostc-builder:latest name: registry.ostc-eu.org/ostc/containers/ostc-builder:latest
tags: [large-disk, $CI_ONIRO_RUNNER_TAG] tags: [large-disk, $CI_ONIRO_RUNNER_TAG, $CI_ONIRO_INSTANCE_SIZE]
variables: variables:
CI_ONIRO_RUNNER_TAG : "" CI_ONIRO_RUNNER_TAG : ""
CI_ONIRO_MANIFEST_URL: https://git.ostc-eu.org/distro/oniro CI_ONIRO_MANIFEST_URL: https://git.ostc-eu.org/distro/oniro
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
CI_ONIRO_MANIFEST_NAME: default.xml CI_ONIRO_MANIFEST_NAME: default.xml
CI_ONIRO_MANIFEST_MIRROR: ostc-develop CI_ONIRO_MANIFEST_MIRROR: ostc-develop
CI_ONIRO_GIT_REPO_PATH: "" CI_ONIRO_GIT_REPO_PATH: ""
CI_ONIRO_INSTANCE_SIZE: s3.large.8
before_script: before_script:
- test ! -e "$CI_PROJECT_DIR"/.scratch-dir-name || ( - test ! -e "$CI_PROJECT_DIR"/.scratch-dir-name || (
echo "precondition failed - concurrent modification of $CI_PROJECT_DIR" echo "precondition failed - concurrent modification of $CI_PROJECT_DIR"
...@@ -218,6 +219,7 @@ ...@@ -218,6 +219,7 @@
variables: variables:
CI_ONIRO_BUILD_FLAVOUR: zephyr CI_ONIRO_BUILD_FLAVOUR: zephyr
CI_ONIRO_BITBAKE_TARGETS: "zephyr-philosophers" CI_ONIRO_BITBAKE_TARGETS: "zephyr-philosophers"
CI_ONIRO_INSTANCE_SIZE: s3.large.2
script: script:
- test -n "$CI_ONIRO_BITBAKE_TARGETS" || ( - test -n "$CI_ONIRO_BITBAKE_TARGETS" || (
echo "nothing to build - CI_ONIRO_BITBAKE_TARGETS is empty" echo "nothing to build - CI_ONIRO_BITBAKE_TARGETS is empty"
...@@ -233,6 +235,7 @@ ...@@ -233,6 +235,7 @@
extends: .bitbake-workspace extends: .bitbake-workspace
variables: variables:
CI_ONIRO_BUILD_FLAVOUR: freertos CI_ONIRO_BUILD_FLAVOUR: freertos
CI_ONIRO_INSTANCE_SIZE: s3.large.2
script: script:
- !reference [.bitbake-workspace, script] - !reference [.bitbake-workspace, script]
- time bitbake freertos-demo - time bitbake freertos-demo
......
...@@ -86,6 +86,7 @@ zephyr-96b-nitrogen: ...@@ -86,6 +86,7 @@ zephyr-96b-nitrogen:
MACHINE: 96b-nitrogen MACHINE: 96b-nitrogen
CI_ONIRO_RECIPE_NAME: zephyr-philosophers CI_ONIRO_RECIPE_NAME: zephyr-philosophers
CI_ONIRO_BUILD_FLAVOUR: zephyr CI_ONIRO_BUILD_FLAVOUR: zephyr
CI_ONIRO_INSTANCE_SIZE: s3.large.2
zephyr-96b-nitrogen-tests: zephyr-96b-nitrogen-tests:
extends: .build-image extends: .build-image
...@@ -93,6 +94,7 @@ zephyr-96b-nitrogen-tests: ...@@ -93,6 +94,7 @@ zephyr-96b-nitrogen-tests:
MACHINE: 96b-nitrogen MACHINE: 96b-nitrogen
CI_ONIRO_RECIPE_NAME: zephyr-kernel-test-all CI_ONIRO_RECIPE_NAME: zephyr-kernel-test-all
CI_ONIRO_BUILD_FLAVOUR: zephyr CI_ONIRO_BUILD_FLAVOUR: zephyr
CI_ONIRO_INSTANCE_SIZE: s3.large.2
zephyr-96b-avenger: zephyr-96b-avenger:
extends: .build-zephyr extends: .build-zephyr
...@@ -126,16 +128,16 @@ blueprint-smartpanel-zephyr: ...@@ -126,16 +128,16 @@ blueprint-smartpanel-zephyr:
blueprint-smartpanel-linux: blueprint-smartpanel-linux:
extends: .build-linux extends: .build-linux
tags: [large-disk, bitbake-friendly, heavy, $CI_ONIRO_RUNNER_TAG]
variables: variables:
MACHINE: stm32mp1-av96 MACHINE: stm32mp1-av96
DISTRO: oniro-linux-blueprint-dashboard DISTRO: oniro-linux-blueprint-dashboard
CI_ONIRO_BITBAKE_TARGETS: "blueprint-dashboard-gateway-image" CI_ONIRO_BITBAKE_TARGETS: "blueprint-dashboard-gateway-image"
CI_ONIRO_INSTANCE_SIZE: s3.xlarge.4
blueprint-gateway-linux: blueprint-gateway-linux:
extends: .build-linux extends: .build-linux
tags: [large-disk, bitbake-friendly, heavy, $CI_ONIRO_RUNNER_TAG]
variables: variables:
MACHINE: raspberrypi4-64 MACHINE: raspberrypi4-64
DISTRO: oniro-linux-blueprint-gateway DISTRO: oniro-linux-blueprint-gateway
CI_ONIRO_BITBAKE_TARGETS: "blueprint-gateway-image" CI_ONIRO_BITBAKE_TARGETS: "blueprint-gateway-image"
CI_ONIRO_INSTANCE_SIZE: s3.xlarge.4
...@@ -30,6 +30,16 @@ process of constructing the workspace from scratch. ...@@ -30,6 +30,16 @@ process of constructing the workspace from scratch.
Variables Variables
========= =========
CI_ONIRO_INSTANCE_SIZE
----------------------
An arbitrary GitLab Runner tag selecting the size of a system instance which
processes the .workspace job, or its derivative. This defaults to s3.large.8
which translates to two cores and 16GB of memory.
This can be used to route specific jobs to specific instance sizes using
easy-to-use variable map, rather than more painful to use tag list.
CI_ONIRO_RUNNER_TAG CI_ONIRO_RUNNER_TAG
------------------- -------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment