Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s: deploy (non-)worker pods in respective nodes #854

Merged
merged 4 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FAASM_VERSION=0.22.0
FAASM_CLI_IMAGE=faasm.azurecr.io/cli:0.22.0
FAASM_WORKER_IMAGE=faasm.azurecr.io/worker:0.22.0
FAASM_VERSION=0.23.0
FAASM_CLI_IMAGE=faasm.azurecr.io/cli:0.23.0
FAASM_WORKER_IMAGE=faasm.azurecr.io/worker:0.23.0

FAABRIC_VERSION=0.15.0
FAABRIC_PLANNER_IMAGE=faasm.azurecr.io/planner:0.15.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
env:
CLUSTER_NAME_BASE: gha-cluster
FAASM_INI_FILE: ./faasm.ini
FAASM_VERSION: 0.22.0
FAASM_VERSION: 0.23.0
FAASM_WASM_VM: ${{ matrix.wasm_vm }}
steps:
- name: "Check out the experiment-base code"
Expand All @@ -56,7 +56,7 @@ jobs:
./bin/inv_wrapper.sh cluster.credentials --name ${{ env.CLUSTER_NAME }}
working-directory: ${{ github.workspace }}/experiment-base
- name: "Install faasmctl"
run: source ./bin/workon.sh && pip3 install faasmctl==0.33.1
run: source ./bin/workon.sh && pip3 install faasmctl==0.34.0
working-directory: ${{ github.workspace }}/experiment-base
- name: "Deploy Faasm on k8s cluster"
run: source ./bin/workon.sh && faasmctl deploy.k8s --workers=4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sgx_hw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: self-hosted
env:
VM_BASE_NAME: gha-sgx-hw-vm
FAASM_VERSION: 0.22.0
FAASM_VERSION: 0.23.0
steps:
- name: "Check out the experiment-base code"
uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ env:
CONAN_CACHE_MOUNT_SOURCE: .conan
FAABRIC_VERSION: 0.15.0
FAASM_INI_FILE: ./faasm.ini
FAASM_VERSION: 0.22.0
FAASMCTL_VERSION: 0.33.1
FAASM_VERSION: 0.23.0
FAASMCTL_VERSION: 0.34.0

jobs:
checks:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm.azurecr.io/cli:0.22.0
image: faasm.azurecr.io/cli:0.23.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
Expand Down Expand Up @@ -395,18 +395,18 @@ jobs:
HOST_TYPE: ci
IS_SGX_CI: true
container:
image: faasm.azurecr.io/cli-sgx-sim:0.22.0
image: faasm.azurecr.io/cli-sgx-sim:0.23.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
services:
redis:
image: faasm.azurecr.io/redis:0.22.0
image: faasm.azurecr.io/redis:0.23.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
minio:
image: faasm.azurecr.io/minio:0.22.0
image: faasm.azurecr.io/minio:0.23.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.22.0
0.23.0
11 changes: 10 additions & 1 deletion deploy/k8s-common/minio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ metadata:
app: faasm
role: minio
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- control
containers:
- name: minio-main
image: faasm.azurecr.io/minio:0.22.0
image: faasm.azurecr.io/minio:0.23.0
env:
- name: MINIO_ROOT_USER
value: "minio"
Expand Down
9 changes: 9 additions & 0 deletions deploy/k8s-common/planner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ metadata:
app: faasm
role: planner
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- control
containers:
- name: planner
image: faasm.azurecr.io/planner:0.15.0
Expand Down
22 changes: 20 additions & 2 deletions deploy/k8s-common/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ metadata:
app: faasm
role: redis-queue
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- control
containers:
- name: master
image: faasm.azurecr.io/redis:0.22.0
image: faasm.azurecr.io/redis:0.23.0
ports:
- containerPort: 6379

Expand All @@ -26,9 +35,18 @@ metadata:
app: faasm
role: redis-state
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- control
containers:
- name: master
image: faasm.azurecr.io/redis:0.22.0
image: faasm.azurecr.io/redis:0.23.0
ports:
- containerPort: 6379

Expand Down
11 changes: 10 additions & 1 deletion deploy/k8s-sgx/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ metadata:
app: faasm
role: upload
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- control
containers:
- name: upload
image: faasm.azurecr.io/upload:0.22.0
image: faasm.azurecr.io/upload:0.23.0
ports:
- containerPort: 8002
- containerPort: 5000
Expand Down
12 changes: 11 additions & 1 deletion deploy/k8s-sgx/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ spec:
role: worker
spec:
affinity:
# Require all worker pods to be scheduled in worker nodes
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- worker
# If possible, give each pod a worker node in isolation
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
Expand All @@ -32,7 +42,7 @@ spec:
weight: 100

containers:
- image: faasm.azurecr.io/worker-sgx:0.22.0
- image: faasm.azurecr.io/worker-sgx:0.23.0
name: faasm-worker
ports:
- containerPort: 8080
Expand Down
11 changes: 10 additions & 1 deletion deploy/k8s-wamr/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ metadata:
app: faasm
role: upload
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- control
containers:
- name: upload
image: faasm.azurecr.io/upload:0.22.0
image: faasm.azurecr.io/upload:0.23.0
ports:
- containerPort: 8002
- containerPort: 5000
Expand Down
12 changes: 11 additions & 1 deletion deploy/k8s-wamr/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ spec:
role: worker
spec:
affinity:
# Require all worker pods to be scheduled in worker nodes
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- worker
# If possible, give each pod a worker node in isolation
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
Expand All @@ -32,7 +42,7 @@ spec:
weight: 100

containers:
- image: faasm.azurecr.io/worker:0.22.0
- image: faasm.azurecr.io/worker:0.23.0
name: faasm-worker
ports:
- containerPort: 8080
Expand Down
11 changes: 10 additions & 1 deletion deploy/k8s/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ metadata:
app: faasm
role: upload
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- control
containers:
- name: upload
image: faasm.azurecr.io/upload:0.22.0
image: faasm.azurecr.io/upload:0.23.0
ports:
- containerPort: 8002
- containerPort: 5000
Expand Down
12 changes: 11 additions & 1 deletion deploy/k8s/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ spec:
role: worker
spec:
affinity:
# Require all worker pods to be scheduled in worker nodes
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: faasm.io/role
operator: In
values:
- worker
# If possible, give each pod a worker node in isolation
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
Expand All @@ -32,7 +42,7 @@ spec:
weight: 100

containers:
- image: faasm.azurecr.io/worker:0.22.0
- image: faasm.azurecr.io/worker:0.23.0
name: faasm-worker
ports:
- containerPort: 8080
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black>=23.12.0
breathe>=4.35.0
faasmctl==0.33.1
faasmctl==0.34.0
flake8>=7.0.0
invoke>=2.0.0
myst_parser>=2.0.0
Expand Down
Loading