Skip to content

Commit

Permalink
Feature/arm arch (robusta-dev#508)
Browse files Browse the repository at this point in the history
* Add ARM arch build
* Change to supported arm images
  • Loading branch information
anFatum authored Sep 5, 2022
1 parent 29c70a0 commit 0fa6289
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 6 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ jobs:
sed -i 's/0.0.0/${{env.RELEASE_VER}}/g' src/robusta/_version.py pyproject.toml helm/robusta/Chart.yaml helm/robusta/values.yaml
sed -i 's/0.0.1/${{env.RELEASE_VER}}/g' helm/robusta/Chart.yaml
# Set up the buildx to run build for multiple platforms
- name: Set up QEMU
uses: docker/setup-qemu-action@c5ffa2a61740d9877bd1f40899a87c8ec93b0d9f

- name: Docker Setup Buildx
uses: docker/setup-buildx-action@bea6a01aa40b4d58b0382d47e1c4a70137af67b1
with:
config-inline: |
[worker.oci]
enabled = true
platforms = [ "linux/amd64", "linux/arm64" ]
# see https://github.com/GoogleContainerTools/skaffold/issues/4842
- name: Cache skaffold image builds & config
uses: actions/cache@v2
Expand All @@ -54,7 +66,7 @@ jobs:
fixed-
- name: Build with skaffold
run: ./skaffold build --file-output=container-ids.json --tag='${{env.RELEASE_VER}}'
run: ./skaffold build --prodile arm --file-output=container-ids.json --tag='${{env.RELEASE_VER}}'

- name: Save artifact with tags of built containers
uses: actions/upload-artifact@v2
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/test_robusta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ jobs:
run: |
kubectl config get-contexts
# Set up the buildx to run build for multiple platforms
- name: Set up QEMU
uses: docker/setup-qemu-action@c5ffa2a61740d9877bd1f40899a87c8ec93b0d9f

- name: Docker Setup Buildx
uses: docker/setup-buildx-action@bea6a01aa40b4d58b0382d47e1c4a70137af67b1
with:
config-inline: |
[worker.oci]
enabled = true
platforms = [ "linux/amd64", "linux/arm64" ]
# install robusta so that we can run tests on it
- name: Install Robusta
run: |
Expand All @@ -43,7 +55,7 @@ jobs:
- name: Build with skaffold
run: |
echo 'building with tag test-${{ github.sha }}'
./skaffold build --push=false --file-output=container-ids.json --tag='test-${{ github.sha }}'
./skaffold build --profile arm --push=false --file-output=container-ids.json --tag='test-${{ github.sha }}'
kind load docker-image --name chart-testing 'us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner:test-${{ github.sha }}'
# update helm chart to use the image we just built
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# see https://pythonspeed.com/articles/alpine-docker-python/ for the reason we don't use alpine
FROM python:3.9-slim
RUN apt-get update \
&& dpkg --add-architecture arm64 \
&& apt-get install -y --no-install-recommends git ssh socat wget curl libcairo2 python3-dev libffi-dev socat \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
5 changes: 5 additions & 0 deletions build_with_arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker buildx build \
--platform linux/arm64,linux/amd64 \
--tag $IMAGE \
--push \
$BUILD_CONTEXT
4 changes: 2 additions & 2 deletions helm/robusta/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ platformPlaybooks:

# parameters for the robusta forwarder deployment
kubewatch:
image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/kubewatch:v1.12
image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/kubewatch:v1.13
imagePullPolicy: IfNotPresent
pprof: True
resources:
Expand All @@ -196,7 +196,7 @@ kubewatch:
# parameters for the renderer service used in robusta runner to render grafana graphs
grafanaRenderer:
enableContainer: false
image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/grafana-renderer:6
image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/grafana-renderer:7
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down
7 changes: 7 additions & 0 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ profiles:
buildCommand: ./build_on_apple_m1.sh
local:
concurrency: 0
- name: arm
build:
artifacts:
- image: us-central1-docker.pkg.dev/genuine-flight-317411/devel/robusta-runner
context: .
custom:
buildCommand: ./build_with_arm.sh
- name: gcloud-build
build:
googleCloudBuild:
Expand Down
4 changes: 2 additions & 2 deletions src/robusta/integrations/kubernetes/custom_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
S = TypeVar("S")
T = TypeVar("T")
PYTHON_DEBUGGER_IMAGE = (
"us-central1-docker.pkg.dev/genuine-flight-317411/devel/debug-toolkit:v4.4"
"us-central1-docker.pkg.dev/genuine-flight-317411/devel/debug-toolkit:v4.5"
)
JAVA_DEBUGGER_IMAGE = (
"us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit-11:v1"
"us-central1-docker.pkg.dev/genuine-flight-317411/devel/java-toolkit-11:v1.1"
)

# TODO: import these from the python-tools project
Expand Down

0 comments on commit 0fa6289

Please sign in to comment.