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

Terraform helm #13

Open
wants to merge 79 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
87a5a0f
Adding I-PoC example to veraqcruz-examples (squashed)
alexandref75 Nov 1, 2021
53d7ab3
Add headers and License information to source code files
alexandref75 Nov 1, 2021
785c2ba
Spell check on README, adding Python Docs for functions.
alexandref75 Nov 1, 2021
54e66df
Add support for instance_id and instance_hash to VaaS
alexandref75 Nov 2, 2021
11c520b
Change docker repository to veracruz
alexandref75 Nov 2, 2021
3fb8d4f
Fix stray code block
alexandref75 Nov 3, 2021
2a9adc3
Add better error handling and recovery
alexandref75 Nov 3, 2021
4dedfab
Fix erroneous code block
alexandref75 Nov 3, 2021
3e54b1f
Document Iotex-S3-app
alexandref75 Nov 3, 2021
5828dda
Add script to start iotex-user-app.sh with correct parameters
alexandref75 Nov 3, 2021
f9733ea
Fix support for single identity per certificate
alexandref75 Nov 5, 2021
89f8a29
Fix figure
alexandref75 Nov 5, 2021
c38a9e8
Add warning about multiple identities with same certificate
alexandref75 Nov 6, 2021
69c0d12
Add support for changing Veracruz Nitro size (hugepages size)
alexandref75 Nov 8, 2021
5d1341b
Add support for changing Veracruz pod memori size and CPU size
alexandref75 Nov 8, 2021
7205870
Add troubleshooting for S3 errors
alexandref75 Nov 8, 2021
54f92be
Add entry to future support of remote repositories
alexandref75 Nov 9, 2021
14d46d0
Fix make images before veracruz-client
alexandref75 Jan 4, 2022
f37861d
Fixes for running i-PoC on 22.04
Apr 8, 2022
59cdecc
First entry just show what are the veracruz instances running
Apr 8, 2022
bda0a1f
Fixes for veracruz runtime (nitro) WIP
alexandref75 Aug 1, 2022
9abcdb9
Add support for Veracruz runtime with mbed-TLS
alexandref75 Aug 12, 2022
70916cd
Dupplicated entry on vaas-server.py
alexandref75 Aug 12, 2022
554c2b4
Update CCFaaS to new policy format
gbryant-arm Aug 18, 2022
ebcb848
Adjust to new policy format
gbryant-arm Aug 23, 2022
b893a64
Update YAML deployment script
gbryant-arm Aug 23, 2022
43bdc9b
FIx CCFaaS for using v1.1.1 nitro image
alexandref75 Aug 25, 2022
bbfae2b
Add debugging messages
gbryant-arm Sep 9, 2022
4a9d619
Update image versions
gbryant-arm Sep 23, 2022
dfafac0
Fix config var
gbryant-arm Sep 23, 2022
08306e2
Don't restart veracruz-server pod after it dies
gbryant-arm Sep 23, 2022
0958e36
Demo updates and fixes
alexandref75 Oct 10, 2022
620961a
Fix ececution. explict compution step was added
alexandref75 Oct 10, 2022
580e13f
Small fixes on README
alexandref75 Oct 11, 2022
36afc68
Changes to user portion of the demo (adding crypto)
alexandref75 Oct 12, 2022
d1c3c28
Add function name to user app's arguments
gbryant-arm Oct 13, 2022
221a678
Documentation update
alexandref75 Oct 13, 2022
0431873
Fix command line of iotex-user-app
alexandref75 Oct 13, 2022
d6f5d78
Add cert.conf
gbryant-arm Oct 14, 2022
38fadeb
Add function registration scripts and partial policies
gbryant-arm Oct 14, 2022
f6e792f
Add hugepages reference
alexandref75 Oct 17, 2022
fb6bce9
Add reference to a tag on veracruz
alexandref75 Oct 20, 2022
b3c2991
small text corrections
alexandref75 Oct 20, 2022
63e83c2
Add reference to VoD on README
alexandref75 Oct 24, 2022
9ff8b86
Fixes fro veracruz-nitro (1.3.3) and miscelaneous changes
alexandref75 Jan 24, 2023
f4b7a43
Missing file.
alexandref75 Jan 24, 2023
751aafd
Updates for VOD tar and README fixes
alexandref75 Jan 25, 2023
02ad951
Add info about S3
alexandref75 Jan 25, 2023
7763e27
Fix info about S3
alexandref75 Jan 25, 2023
2920248
Fix tar incorrect file and register do not need veracruz-client
alexandref75 Jan 25, 2023
ef38efe
Spell check of README.md
alexandref75 Jan 25, 2023
88f2401
Fixes in markdown for README.md
alexandref75 Jan 25, 2023
d5e223a
Updated to VOD 1.3.3 and fixes on README
alexandref75 Jan 26, 2023
feb9d0b
Update outputs for the example run
alexandref75 Jan 26, 2023
6b47896
Fixes on README, presentation mostly.
alexandref75 Jan 27, 2023
179260c
Updated to veracruz/veracruz-example main
alexandref75 Jan 27, 2023
7aba0ef
Updated to veracruz/veracruz-examples main
alexandref75 Jan 27, 2023
a4ba2f7
Merge branch 'veracruz-main' into i-poc
alexandref75 Jan 27, 2023
f1827d8
Merge branch 'i-poc'
alexandref75 Jan 27, 2023
031c757
Polishing README
alexandref75 Jan 27, 2023
176faa2
Fix error Max instead of Min.
alexandref75 Jan 30, 2023
5e7b115
Revert commit that removed decryption key on execute_program
alexandref75 Feb 14, 2023
059f032
Revert "Updated to veracruz/veracruz-examples main"
alexandref75 Feb 14, 2023
379a8ce
Adding checks for decrytion key files
alexandref75 Feb 14, 2023
a2d3eb6
Some language changes on README
alexandref75 Feb 16, 2023
f5198b5
Describe options to install veracruz
alexandref75 Feb 23, 2023
9791b37
Clarify installing K3s on EC2
alexandref75 Feb 23, 2023
9e35597
Fix README for reference to main-k3s directory
alexandref75 Feb 28, 2023
4b365f5
Add documentation about variables in config.vars.template
alexandref75 Mar 6, 2023
8604de0
Add requirement of 2GB for YOLOv3 model
alexandref75 Mar 7, 2023
43255ca
Fix for newer versions of docker (require --output)
alexandref75 Mar 13, 2023
763e297
Change order on README for the example (Running)
alexandref75 Mar 27, 2023
b340242
Add some documentation on how to run the model
alexandref75 Mar 27, 2023
96128c7
Change configuration of README
alexandref75 Apr 14, 2023
bdede98
Add helm chart and terraform script
alexandref75 Apr 28, 2023
802e302
Use temp branch to test
alexandref75 Apr 28, 2023
03044f3
Add helm install to script
alexandref75 Apr 28, 2023
20ceff2
Update README
alexandref75 Apr 28, 2023
a806002
Update README to support terraform/helm
alexandref75 May 1, 2023
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
3 changes: 2 additions & 1 deletion i-poc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
#

IMAGE_SUBDIRS=vaas-server ccfaas-app iotex-s3-app
VERACRUZ_NITRO_IMAGE=veracruz/veracruz-nitro:v1.3.3

all: veracruz-client k8s-config

veracruz-client:
CONTAINERID=$(shell docker create veracruz/veracruz-nitro:v1.2.0); \
CONTAINERID=$(shell docker create $(VERACRUZ_NITRO_IMAGE)); \
docker cp $$CONTAINERID:/work/veracruz-client/veracruz-client veracruz-client; \
docker cp $$CONTAINERID:/work/veracruz-client/hash hash; \
docker rm $$CONTAINERID
Expand Down
774 changes: 618 additions & 156 deletions i-poc/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion i-poc/ccfaas-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# and copyright information.
#

FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update -y;apt-get upgrade -y;apt-get install -y netcat curl python3-pip;apt-get -y clean

Expand Down
4 changes: 2 additions & 2 deletions i-poc/ccfaas-app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
# example repository root directory for copyright and licensing information.
#
#
VERSION=0.87.26
VERSION=0.87.28

all: image

veracruz-client: ../veracruz-client
cp ../veracruz-client veracruz-client

veracruz-ccfaas-server.imageOK: Dockerfile ccfaas-server.py ccfaas-server.sh veracruz-client load_program.sh load_data.sh
docker build -t veracruz-ccfaas-server:$(VERSION) .
docker build --output type=docker -t veracruz-ccfaas-server:$(VERSION) .
touch veracruz-ccfaas-server.imageOK

image: veracruz-ccfaas-server.imageOK
Expand Down
42 changes: 42 additions & 0 deletions i-poc/charts/veracruz-nitro-demo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: v2
name: veracruz-nitro-demo
description: deploy veracruz nitro demo running nitro on aws

home: https://veracruz-project.github.io

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"
kubeVersion: ">=1.18.0-0"

sources:
- https://github.com/veracruz-project/veracruz-examples

annotations:
artifacthub.io/changes: |
- Initial release
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Alexandre Peixoto Ferreira
email: [email protected]
artifacthub.io/prerelease: "false"
artifacthub.io/signKey: |
fingerprint: 71EDA4E3D652DC73EB09E3A5387D298C169CF24E
url: https://smarter-project.github.io/documentation/pgp_keys.asc
29 changes: 29 additions & 0 deletions i-poc/charts/veracruz-nitro-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Veracruz Nitro Demo

This chart deploys Veracruz AWS nitro demo into a k8s/k3s cluster.

For more information on Veracruz go to https://github.com/veracruz-project or this example go to https://github.com/veracruz-project/veracruz-examples/tree/main/i-poc

## TL;DR

```console
helm install veracruz-nitro-demo charts/veracruz-nitro-demo
```

# Overview


# Prerequisites

This chart assumes a full deployment of k3s with traefik, etc.

* k3s 1.25+
* Helm 3.2.0+

# Uninstalling the Chart

```
$ helm delete veracruz-nitro-demo
```

# Parameters
15 changes: 15 additions & 0 deletions i-poc/charts/veracruz-nitro-demo/helm-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

export PUBLIC_HOSTNAME=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
export LOCAL_IP=$(curl http://169.254.169.254/latest/meta-data/local-ipv4)

#helm template \
helm install i-poc-example \
--set-file config.CACERT=../../main-k3s/CACert.pem \
--set-file config.CAKEY=../../main-k3s/CAKey.pem \
--set-file config.PROGCERT=../../main-k3s/PROGCert.pem \
--set-file config.PROGKEY=../../main-k3s/PROGKey.pem \
--set config.externalIPUse=${LOCAL_IP} \
--set-file config.nitroHash=../../hash \
--set config.veracruzEndpointHostname=${PUBLIC_HOSTNAME} \
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: iotex-s3-app
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
iotex-s3: app
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
iotex-s3: app
spec:
containers:
- name: iotex-s3-app
image: veracruz/iotex-s3-veracruz-app:{{ .Values.iotexS3Veracruz.image }}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
resources:
limits:
memory: 1Gi
requests:
cpu: 100m
memory: 100Mi
priorityClassName: system-cluster-critical
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: iotex-s3-app
spec:
selector:
iotex-s3: app
ports:
- protocol: TCP
port: 5020
targetPort: 5000
name: iotex-s3-app
externalIPs:
- {{ .Values.config.externalIPUse }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: smarter-device-manager-ec2-nitro
data:
conf.yaml: |
- devicematch: ^nitro_enclaves$
nummaxdevices: 1
- devicematch: ^vsock$
nummaxdevices: 1
- devicematch: ^rtc0$
nummaxdevices: 20
- devicematch: ^ttyUSB[0-9]*$
nummaxdevices: 1
- devicematch: ^ttyACM[0-9]*$
nummaxdevices: 1
- devicematch: ^ttyTHS[0-9]*$
nummaxdevices: 1
- devicematch: ^ttyS[0-9]*$
nummaxdevices: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: smarter-device-manager-ec2-nitro
labels:
name: smarter-device-manager-ec2-nitro
role: agent
spec:
selector:
matchLabels:
name: smarter-device-manager-ec2-nitro
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
name: smarter-device-manager-ec2-nitro
annotations:
node.kubernetes.io/bootstrap-checkpoint: "true"
spec:
nodeSelector:
smarter-device-manager: enabled
priorityClassName: "system-node-critical"
hostname: smarter-device-management-ec2-nitro
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: smarter-device-manager-ec2-nitro
image: registry.gitlab.com/arm-research/smarter/smarter-device-manager:{{ .Values.smarterDeviceManager.image }}
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
resources:
limits:
cpu: 100m
memory: 15Mi
requests:
cpu: 10m
memory: 15Mi
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
- name: dev-dir
mountPath: /dev
- name: sys-dir
mountPath: /sys
- name: config
mountPath: /root/config
volumes:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/device-plugins
- name: dev-dir
hostPath:
path: /dev
- name: sys-dir
hostPath:
path: /sys
- name: config
configMap:
name: smarter-device-manager-ec2-nitro
terminationGracePeriodSeconds: 30
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: veracruz-ccfaas-app
data:
PROGCert.pem: {{ toJson .Values.config.PROGCERT }}
PROGKey.pem: {{ toJson .Values.config.PROGKEY }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ccfaas-server-app
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
ccfaas-server: app
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
ccfaas-server: app
spec:
containers:
- name: ccfaas-server-app
image: veracruz/veracruz-ccfaas-server:{{ .Values.veracruzCCFaas.image }}
imagePullPolicy: IfNotPresent
env:
- name: VAAS_ACCESS_URL
value: "http://vaas-server-app:5000"
ports:
- containerPort: 5000
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
resources:
limits:
memory: 1Gi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: config
mountPath: /root/config
priorityClassName: system-cluster-critical
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- name: config
configMap:
name: veracruz-ccfaas-app
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: ccfaas-server-app
spec:
selector:
ccfaas-server: app
ports:
- protocol: TCP
port: 5010
targetPort: 5000
name: ccfaas-server-app
externalIPs:
- {{ .Values.config.externalIPUse }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: veracruz-nitro-proxy
data:
CACert.pem: {{ toJson .Values.config.CACERT }}
CAKey.pem: {{ toJson .Values.config.CAKEY }}
Loading