Skip to content

Commit 9dff5b1

Browse files
added arm builds
1 parent 04194c7 commit 9dff5b1

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed

_docs/administration/codefresh-runner.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,123 @@ Override environment variables for `dind-lv-monitor` daemonset if necessary:
16011601
- `KB_USAGE_THRESHOLD` - default 80 (percentage)
16021602
- `INODE_USAGE_THRESHOLD` - default 80
16031603

1604+
## ARM Builds
1605+
1606+
With hybrid runner it's possibe to run native ARM64v8 builds.
1607+
1608+
>**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
1609+
1610+
The following scenario is an example of how to set up ARM Runner on existing EKS cluster:
1611+
##### Step 1 - Preparing nodes
1612+
Create a new ARM nodegroup
1613+
1614+
```shell
1615+
eksctl utils update-coredns --cluster <cluster-name>
1616+
eksctl utils update-kube-proxy --cluster <cluster-name> --approve
1617+
eksctl utils update-aws-node --cluster <cluster-name> --approve
1618+
1619+
eksctl create nodegroup \
1620+
--cluster <cluster-name> \
1621+
--region <region> \
1622+
--name <arm-ng> \
1623+
--node-type <a1.2xlarge> \
1624+
--nodes <3>\
1625+
--nodes-min <2>\
1626+
--nodes-max <4>\
1627+
--managed
1628+
```
1629+
1630+
Check the status for your nodes:
1631+
1632+
```shell
1633+
kubectl get nodes -l kubernetes.io/arch=arm64
1634+
```
1635+
1636+
Also it's recommeded to label and taint the required ARM nodes:
1637+
1638+
```shell
1639+
kubectl taint nodes <node> arch=aarch64:NoSchedule
1640+
kubectl label nodes <node> arch=arm
1641+
```
1642+
1643+
##### Step 2 - Runner installation
1644+
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.
1645+
1646+
`values-arm.yaml`
1647+
1648+
{% highlight yaml %}
1649+
{% raw %}
1650+
...
1651+
Namespace: codefresh
1652+
1653+
### NodeSelector --kube-node-selector: controls runner and dind-volume-provisioner pods
1654+
NodeSelector: arch=arm
1655+
1656+
### Tolerations --tolerations: controls runner, dind-volume-provisioner and dind-lv-monitor
1657+
Tolerations:
1658+
- key: arch
1659+
operator: Equal
1660+
value: aarch64
1661+
effect: NoSchedule
1662+
...
1663+
########################################################
1664+
### Codefresh Runtime ###
1665+
### ###
1666+
### configure engine and dind pods ###
1667+
########################################################
1668+
Runtime:
1669+
### NodeSelector --build-node-selector: controls engine and dind pods
1670+
NodeSelector:
1671+
arch: arm
1672+
### Tolerations for engine and dind pods
1673+
tolerations:
1674+
- key: arch
1675+
operator: Equal
1676+
value: aarch64
1677+
effect: NoSchedule
1678+
...
1679+
{% endraw %}
1680+
{% endhighlight %}
1681+
1682+
Install the runner with:
1683+
```shell
1684+
codefresh runner init --values values-arm.yaml --exec-demo-pipeline false --skip-cluster-integration true
1685+
```
1686+
1687+
In case of local storage patch `dind-lv-monitor-runner` DaemonSet:
1688+
1689+
```shell
1690+
kubectl edit ds dind-lv-monitor-runner
1691+
```
1692+
1693+
And add `nodeSelector`:
1694+
{% highlight yaml %}
1695+
{% raw %}
1696+
spec:
1697+
nodeSelector:
1698+
arch: arm
1699+
{% endraw %}
1700+
{% endhighlight %}
1701+
1702+
##### Step 3 - Run Demo pipeline
1703+
1704+
Run a modified version of the CF_Runner_Demo pipeline:
1705+
{% highlight yaml %}
1706+
{% raw %}
1707+
version: '1.0'
1708+
stages:
1709+
- test
1710+
steps:
1711+
test:
1712+
stage: test
1713+
title: test
1714+
image: 'arm64v8/alpine'
1715+
commands:
1716+
- echo hello Codefresh Runner!
1717+
{% endraw %}
1718+
{% endhighlight %}
1719+
1720+
16041721
## Troubleshooting
16051722

16061723
- **Problem:** You receive an error regarding the provided token or CLI context used for this installation might not have enough permissions.

0 commit comments

Comments
 (0)