- Notifications
You must be signed in to change notification settings - Fork165
added arm builds#289
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
added arm builds#289
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1601,6 +1601,150 @@ Override environment variables for `dind-lv-monitor` daemonset if necessary: | ||
| - `KB_USAGE_THRESHOLD` - default 80 (percentage) | ||
| - `INODE_USAGE_THRESHOLD` - default 80 | ||
| ## ARM Builds | ||
| With hybrid runner it's possibe to run native ARM64v8 builds. | ||
| >**Note:** Running both amd64 and arm64 images within the same pipeline - it is not possible. We do not support multi-architecture builds. One runtime configuration - one architecture. Considering one pipeline can map only to one runtime, it is possible to run either amd64 or arm64, but not both within a one pipeline | ||
| The following scenario is an example of how to set up ARM Runner on existing EKS cluster: | ||
jesse-codefresh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| ##### Step 1 - Preparing nodes | ||
| Create new ARM nodegroup: | ||
| ```shell | ||
| eksctl utils update-coredns --cluster <cluster-name> | ||
| eksctl utils update-kube-proxy --cluster <cluster-name> --approve | ||
| eksctl utils update-aws-node --cluster <cluster-name> --approve | ||
| eksctl create nodegroup \ | ||
| --cluster <cluster-name> \ | ||
| --region <region> \ | ||
| --name <arm-ng> \ | ||
| --node-type <a1.2xlarge> \ | ||
| --nodes <3>\ | ||
| --nodes-min <2>\ | ||
| --nodes-max <4>\ | ||
| --managed | ||
| ``` | ||
| Check nodes status: | ||
| ```shell | ||
| kubectl get nodes -l kubernetes.io/arch=arm64 | ||
| ``` | ||
| Also it's recommeded to label and taint the required ARM nodes: | ||
| ```shell | ||
| kubectl taint nodes <node> arch=aarch64:NoSchedule | ||
| kubectl label nodes <node> arch=arm | ||
| ``` | ||
| ##### Step 2 - Runner installation | ||
| Use [values.yaml](https://github.com/codefresh-io/venona/blob/release-1.0/venonactl/example/values-example.yaml) to inject `tolerations`, `kube-node-selector`, `build-node-selector` into the Runtime Environment spec. | ||
| `values-arm.yaml` | ||
| {% highlight yaml %} | ||
| {% raw %} | ||
| ... | ||
| Namespace: codefresh | ||
| ### NodeSelector --kube-node-selector: controls runner and dind-volume-provisioner pods | ||
| NodeSelector: arch=arm | ||
| ### Tolerations --tolerations: controls runner, dind-volume-provisioner and dind-lv-monitor | ||
| Tolerations: | ||
| - key: arch | ||
| operator: Equal | ||
| value: aarch64 | ||
| effect: NoSchedule | ||
| ... | ||
| ######################################################## | ||
| ### Codefresh Runtime ### | ||
| ### ### | ||
| ### configure engine and dind pods ### | ||
| ######################################################## | ||
| Runtime: | ||
| ### NodeSelector --build-node-selector: controls engine and dind pods | ||
| NodeSelector: | ||
| arch: arm | ||
| ### Tolerations for engine and dind pods | ||
| tolerations: | ||
| - key: arch | ||
| operator: Equal | ||
| value: aarch64 | ||
| effect: NoSchedule | ||
| ... | ||
| {% endraw %} | ||
| {% endhighlight %} | ||
| Install the Runner with: | ||
| ```shell | ||
| codefresh runner init --values values-arm.yaml --exec-demo-pipeline false --skip-cluster-integration true | ||
| ``` | ||
| ##### Step 3 - Post-installation fixes | ||
| Change `engine` image version in Runtime Environment specification: | ||
| ```shell | ||
| # get the latest engine ARM64 tag | ||
| curl -X GET "https://quay.io/api/v1/repository/codefresh/engine/tag/?limit=100" --silent | jq -r '.tags[].name' | grep "^1.*arm64$" | ||
| 1.136.1-arm64 | ||
| ``` | ||
| ```shell | ||
| # get runtime spec | ||
| codefresh get re $RUNTIME_NAME -o yaml > runtime.yaml | ||
| ``` | ||
| under `runtimeScheduler.image` change image tag: | ||
| {% highlight yaml %} | ||
| {% raw %} | ||
| runtimeScheduler: | ||
| image: 'quay.io/codefresh/engine:1.136.1-arm64' | ||
| {% endraw %} | ||
| {% endhighlight %} | ||
| ```shell | ||
| # patch runtime spec | ||
| codefresh patch re -f runtime.yaml | ||
| ``` | ||
| For `local` storage patch `dind-lv-monitor-runner` DaemonSet and add `nodeSelector`: | ||
| ```shell | ||
| kubectl edit ds dind-lv-monitor-runner | ||
| ``` | ||
| {% highlight yaml %} | ||
| {% raw %} | ||
| spec: | ||
| nodeSelector: | ||
| arch: arm | ||
| {% endraw %} | ||
| {% endhighlight %} | ||
| ##### Step 4 - Run Demo pipeline | ||
| Run a modified version of the *CF_Runner_Demo* pipeline: | ||
| {% highlight yaml %} | ||
| {% raw %} | ||
| version: '1.0' | ||
| stages: | ||
| - test | ||
| steps: | ||
| test: | ||
| stage: test | ||
| title: test | ||
| image: 'arm64v8/alpine' | ||
| commands: | ||
| - echo hello Codefresh Runner! | ||
| {% endraw %} | ||
| {% endhighlight %} | ||
| ## Troubleshooting | ||
| - **Problem:** You receive an error regarding the provided token or CLI context used for this installation might not have enough permissions. | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.