Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
jesse-codefresh merged 2 commits intomasterfromarm-builds
Jul 6, 2021
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions_docs/administration/codefresh-runner.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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:
##### 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.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp