-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
261 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Runs the 'scanner' benchmark scenario on all cluster nodes. | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: tests-scanner-actions | ||
namespace: peerd-ns | ||
labels: | ||
app: tests-scanner | ||
data: | ||
wasm: | | ||
#!/usr/bin/env bash | ||
set -xe | ||
nerdctl run \ | ||
--hosts-dir "/etc/containerd/certs.d" \ | ||
--snapshotter=overlaybd \ | ||
--net host -i --rm $TESTS_SCANNER_IMAGE | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: &name tests-scanner | ||
namespace: peerd-ns | ||
labels: | ||
app: *name | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: *name | ||
template: | ||
metadata: | ||
labels: | ||
app: *name | ||
spec: | ||
hostNetwork: true | ||
hostPID: true | ||
containers: | ||
- image: docker.io/alexeldeib/nsenter:latest # https://github.com/alexeldeib/azbench/blob/main/images/nsenter/entrypoint.sh | ||
imagePullPolicy: Always | ||
name: *name | ||
args: ["wasm"] | ||
resources: | ||
# requests: | ||
# cpu: 0.5 | ||
# memory: 2000Mi | ||
# limits: | ||
# cpu: 0.5 | ||
# memory: 2000Mi | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: actions | ||
mountPath: "/opt/actions" | ||
- name: hostmount | ||
mountPath: "/mnt/actions" | ||
volumes: | ||
- name: hostmount | ||
hostPath: | ||
path: /opt/actions | ||
type: DirectoryOrCreate | ||
- name: actions | ||
configMap: | ||
name: tests-scanner-actions |
This file contains 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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Installs ACR mirror. | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: teleport-actions | ||
namespace: peerd-ns | ||
labels: | ||
app: teleport | ||
data: | ||
wasm: | | ||
#!/usr/bin/env bash | ||
set -xe | ||
sudo apt-get update | ||
pushd /tmp || exit 1 | ||
wget 'https://acrstreamingpackage.blob.core.windows.net/bin/latest/acr-mirror-2204.deb' | ||
sudo apt-get install './acr-mirror-2204.deb' -y --allow-downgrades | ||
rm './acr-mirror-2204.deb' | ||
popd | ||
systemctl enable --now acr-mirror | ||
# These libraries are needed for overlaybd-tcmu | ||
sudo /opt/acr/tools/overlaybd/install.sh | ||
sudo /opt/acr/tools/overlaybd/enable-http-auth.sh | ||
modprobe target_core_user | ||
# Enable overlaybd peer-to-peer | ||
jq '.p2pConfig.enable = true' /etc/overlaybd/overlaybd.json > tmp.json | ||
sudo mv tmp.json /etc/overlaybd/overlaybd.json | ||
jq '.p2pConfig.address = "http://peerd:5000/blobs"' /etc/overlaybd/overlaybd.json > tmp.json | ||
sudo mv tmp.json /etc/overlaybd/overlaybd.json | ||
cat /etc/overlaybd/overlaybd.json | ||
# Enabling mirror for teleportmetricstest | ||
curl -X PUT 'localhost:8578/config?ns=_default&enable_suffix=azurecr.io&stream_format=overlaybd&enable_containerd=true' | ||
# Enable overlaybd | ||
sudo /opt/acr/tools/overlaybd/enable.sh | ||
touch /opt/sentinel | ||
# Install nerdctl: https://github.com/containerd/nerdctl/releases | ||
wget https://github.com/containerd/nerdctl/releases/download/v1.6.0/nerdctl-1.6.0-linux-amd64.tar.gz | ||
tar Cxzvvf /usr/local/bin nerdctl-1.6.0-linux-amd64.tar.gz | ||
rm nerdctl-1.6.0-linux-amd64.tar.gz | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: &name teleport | ||
namespace: peerd-ns | ||
labels: | ||
app: *name | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: *name | ||
template: | ||
metadata: | ||
labels: | ||
app: *name | ||
spec: | ||
hostNetwork: true | ||
hostPID: true | ||
containers: | ||
- image: docker.io/alexeldeib/nsenter:latest # https://github.com/alexeldeib/azbench/blob/main/images/nsenter/entrypoint.sh | ||
imagePullPolicy: Always | ||
name: *name | ||
args: ["wasm"] | ||
resources: | ||
requests: | ||
cpu: 0.5 | ||
memory: 2000Mi | ||
limits: | ||
cpu: 0.5 | ||
memory: 2000Mi | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: actions | ||
mountPath: "/opt/actions" | ||
- name: hostmount | ||
mountPath: "/mnt/actions" | ||
volumes: | ||
- name: hostmount | ||
hostPath: | ||
path: /opt/actions | ||
type: DirectoryOrCreate | ||
- name: actions | ||
configMap: | ||
name: teleport-actions |
This file contains 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
This file contains 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