diff --git a/README.md b/README.md index 6290881..a21d68c 100644 --- a/README.md +++ b/README.md @@ -91,12 +91,6 @@ but feel free to modify the arguments that fit your computer's specs. eval $(minikube docker-env) #### Running Kubernetes Commands -After starting minikube you will need to build the necessary Docker image using -the docker build command. The resulting image needs to have a specific label, -ppdt:experiment. You can build this image using the following command. - - docker build -t ppdt:experiment . - The next step is to deploy the level sites. The level sites need to be deployed before any other portion of the system. This can be done by using the following command. @@ -182,43 +176,8 @@ If you want to re-build everything in the experiment, run the following #### Installation - First install [eksctl](https://eksctl.io/introduction/#installation) -- Create a user. Using Access analyzer, the customer inline policy needed is listed here: -* still undergoing more testing -```json -{ - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "VisualEditor0", - "Effect": "Allow", - "Action": [ - "iam:GetRole", - "ec2:AuthorizeSecurityGroupIngress", - "iam:CreateRole", - "iam:DeleteRole", - "cloudformation:*", - "ec2:RunInstances", - "iam:AttachRolePolicy", - "iam:PutRolePolicy", - "ec2:DescribeSecurityGroups", - "ec2:AssociateRouteTable", - "iam:DetachRolePolicy", - "ec2:CreateLaunchTemplate", - "ec2:DescribeInstanceTypeOfferings", - "iam:DeleteRolePolicy", - "iam:ListAttachedRolePolicies", - "ec2:DescribeVpcs", - "ec2:CreateRoute", - "iam:GetOpenIDConnectProvider", - "ec2:DescribeSubnets", - "ec2:DescribeKeyPairs", - "iam:GetRolePolicy" - ], - "Resource": "*" - } - ] -} -``` +- Create a user with sufficient permissions + - Obtain AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY of the user account. [See the documentation provided here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) - run `aws configure` to input the access id and credential. @@ -243,10 +202,12 @@ aws eks update-kubeconfig --name ppdt --region us-east-2 ```bash # Make sure you aren't running these too early! kubectl apply -f eks-config/k8/level_sites -kubectl apply -f eks-config/k8/server -l role=server +kubectl apply -f eks-config/k8/server -kubectl apply -f eks-config/k8/client -l role=client +kubectl apply -f eks-config/k8/client kubectl exec -- bash -c "gradle run -PchooseRole=weka.finito.client --args " + +kubectl exec ppdt-client-deploy-5795dcd946-bctkd -- bash -c "gradle run -PchooseRole=weka.finito.client --args /data/hypothyroid.values" ``` - Obtain the results of the classification using `kubectl logs` to the pods deployed on EKS. diff --git a/config.properties b/config.properties index 5beb2d5..b329509 100644 --- a/config.properties +++ b/config.properties @@ -1,5 +1,5 @@ level-site-ports = "9000,9001,9002,9003,9004,9005,9006,9007,9008,9009" -key_size = 1024 +key_size = 2048 precision = 2 data_directory = data server-port=10000 diff --git a/eks-config/config.yaml b/eks-config/config.yaml index 28a2aac..cbdd745 100644 --- a/eks-config/config.yaml +++ b/eks-config/config.yaml @@ -6,14 +6,43 @@ metadata: region: us-east-2 version: "1.27" -# Managed Node Groups show up on AWS console +# Node Groups show up on AWS console # Label is necessary so I can target where the pods go with kubectl apply # For best performance, I am isolating each level-site pod to its own node. managedNodeGroups: -# Currently I have 10 level-sites - name: level-sites - instanceType: t2.large - labels: { role: level-site } + instanceType: t2.medium + # Create 10 EC2 Instances, 1 pod per instance minSize: 12 maxSize: 15 desiredCapacity: 12 + maxPodsPerNode: 1 + + # Allow to communicate with other node groups. + # If you have multiple node groups you need this to be true + privateNetworking: true + + # Information to tag this specific node group for tasks + labels: { role: level-site } + tags: + nodegroup-role: level-site + +# You should only need 1 client to run evaluations +#- name: client +# labels: { role: client } +# instanceType: t2.medium +# minSize: 1 +# maxSize: 1 +# desiredCapacity: 1 +# maxPodsPerNode: 1 +# privateNetworking: true + +# You should only need 1 server to run training job +#- name: server +# labels: { role: server } +# instanceType: t2.medium +# minSize: 1 +# maxSize: 1 +# desiredCapacity: 1 +# maxPodsPerNode: 1 +# privateNetworking: true diff --git a/eks-config/k8/client/client_deployment.yaml b/eks-config/k8/client/client_deployment.yaml deleted file mode 100644 index ed881ee..0000000 --- a/eks-config/k8/client/client_deployment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-client-deploy - labels: - app: ppdt-client-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-client-deploy - template: - metadata: - labels: - pod: ppdt-client-deploy - spec: - containers: - - name: ppdt-client-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "CLIENT" - - - name: PRECISION - value: "2" - - - name: PORT_NUM - value: "9000" - - - name: LEVEL_SITE_DOMAINS - value: "ppdt-level-site-01-service,ppdt-level-site-02-service,ppdt-level-site-03-service,ppdt-level-site-04-service,ppdt-level-site-05-service,ppdt-level-site-06-service,ppdt-level-site-07-service,ppdt-level-site-08-service,ppdt-level-site-09-service,ppdt-level-site-10-service" - - - name: PPDT_KEY_SIZE - value: "1024" - - - name: SERVER - value: "ppdt-server-service" - - - name: GRADLE_USER_HOME - value: "gradle_user_home" diff --git a/eks-config/k8/client/client_service.yaml b/eks-config/k8/client/client_service.yaml deleted file mode 100644 index 49ab992..0000000 --- a/eks-config/k8/client/client_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-client-service -spec: - selector: - pod: ppdt-client-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_01_deployment.yaml b/eks-config/k8/level_sites/level_site_01_deployment.yaml deleted file mode 100644 index 5892e00..0000000 --- a/eks-config/k8/level_sites/level_site_01_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-01-deploy - labels: - app: ppdt-level-site-01-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-01-deploy - template: - metadata: - labels: - pod: ppdt-level-site-01-deploy - spec: - containers: - - name: ppdt-level-site-01-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file diff --git a/eks-config/k8/level_sites/level_site_01_service.yaml b/eks-config/k8/level_sites/level_site_01_service.yaml deleted file mode 100644 index bf5b25c..0000000 --- a/eks-config/k8/level_sites/level_site_01_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-01-service -spec: - selector: - pod: ppdt-level-site-01-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_02_deployment.yaml b/eks-config/k8/level_sites/level_site_02_deployment.yaml deleted file mode 100644 index 8ca6ff3..0000000 --- a/eks-config/k8/level_sites/level_site_02_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-02-deploy - labels: - app: ppdt-level-site-02-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-02-deploy - template: - metadata: - labels: - pod: ppdt-level-site-02-deploy - spec: - containers: - - name: ppdt-level-site-02-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key diff --git a/eks-config/k8/level_sites/level_site_02_service.yaml b/eks-config/k8/level_sites/level_site_02_service.yaml deleted file mode 100644 index 5a1f32c..0000000 --- a/eks-config/k8/level_sites/level_site_02_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-02-service -spec: - selector: - pod: ppdt-level-site-02-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_03_deployment.yaml b/eks-config/k8/level_sites/level_site_03_deployment.yaml deleted file mode 100644 index c383b2f..0000000 --- a/eks-config/k8/level_sites/level_site_03_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-03-deploy - labels: - app: ppdt-level-site-03-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-03-deploy - template: - metadata: - labels: - pod: ppdt-level-site-03-deploy - spec: - containers: - - name: ppdt-level-site-03-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key diff --git a/eks-config/k8/level_sites/level_site_03_service.yaml b/eks-config/k8/level_sites/level_site_03_service.yaml deleted file mode 100644 index 24999f6..0000000 --- a/eks-config/k8/level_sites/level_site_03_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-03-service -spec: - selector: - pod: ppdt-level-site-03-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_04_deployment.yaml b/eks-config/k8/level_sites/level_site_04_deployment.yaml deleted file mode 100644 index 1f01ac0..0000000 --- a/eks-config/k8/level_sites/level_site_04_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-04-deploy - labels: - app: ppdt-level-site-04-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-04-deploy - template: - metadata: - labels: - pod: ppdt-level-site-04-deploy - spec: - containers: - - name: ppdt-level-site-04-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key diff --git a/eks-config/k8/level_sites/level_site_04_service.yaml b/eks-config/k8/level_sites/level_site_04_service.yaml deleted file mode 100644 index 70fdeff..0000000 --- a/eks-config/k8/level_sites/level_site_04_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-04-service -spec: - selector: - pod: ppdt-level-site-04-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_05_deployment.yaml b/eks-config/k8/level_sites/level_site_05_deployment.yaml deleted file mode 100644 index c5d4f6b..0000000 --- a/eks-config/k8/level_sites/level_site_05_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-05-deploy - labels: - app: ppdt-level-site-05-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-05-deploy - template: - metadata: - labels: - pod: ppdt-level-site-05-deploy - spec: - containers: - - name: ppdt-level-site-05-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key diff --git a/eks-config/k8/level_sites/level_site_05_service.yaml b/eks-config/k8/level_sites/level_site_05_service.yaml deleted file mode 100644 index 5cab531..0000000 --- a/eks-config/k8/level_sites/level_site_05_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-05-service -spec: - selector: - pod: ppdt-level-site-05-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_06_deployment.yaml b/eks-config/k8/level_sites/level_site_06_deployment.yaml deleted file mode 100644 index 3ad1362..0000000 --- a/eks-config/k8/level_sites/level_site_06_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-06-deploy - labels: - app: ppdt-level-site-06-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-06-deploy - template: - metadata: - labels: - pod: ppdt-level-site-06-deploy - spec: - containers: - - name: ppdt-level-site-06-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key diff --git a/eks-config/k8/level_sites/level_site_06_service.yaml b/eks-config/k8/level_sites/level_site_06_service.yaml deleted file mode 100644 index 964cb00..0000000 --- a/eks-config/k8/level_sites/level_site_06_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-06-service -spec: - selector: - pod: ppdt-level-site-06-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_07_deployment.yaml b/eks-config/k8/level_sites/level_site_07_deployment.yaml deleted file mode 100644 index c82ab18..0000000 --- a/eks-config/k8/level_sites/level_site_07_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-07-deploy - labels: - app: ppdt-level-site-07-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-07-deploy - template: - metadata: - labels: - pod: ppdt-level-site-07-deploy - spec: - containers: - - name: ppdt-level-site-07-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file diff --git a/eks-config/k8/level_sites/level_site_07_service.yaml b/eks-config/k8/level_sites/level_site_07_service.yaml deleted file mode 100644 index 6afedfa..0000000 --- a/eks-config/k8/level_sites/level_site_07_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-07-service -spec: - selector: - pod: ppdt-level-site-07-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_08_deployment.yaml b/eks-config/k8/level_sites/level_site_08_deployment.yaml deleted file mode 100644 index ea00d48..0000000 --- a/eks-config/k8/level_sites/level_site_08_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-08-deploy - labels: - app: ppdt-level-site-08-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-08-deploy - template: - metadata: - labels: - pod: ppdt-level-site-08-deploy - spec: - containers: - - name: ppdt-level-site-08-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file diff --git a/eks-config/k8/level_sites/level_site_08_service.yaml b/eks-config/k8/level_sites/level_site_08_service.yaml deleted file mode 100644 index f43ef2e..0000000 --- a/eks-config/k8/level_sites/level_site_08_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-08-service -spec: - selector: - pod: ppdt-level-site-08-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_09_deployment.yaml b/eks-config/k8/level_sites/level_site_09_deployment.yaml deleted file mode 100644 index 1b21365..0000000 --- a/eks-config/k8/level_sites/level_site_09_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-09-deploy - labels: - app: ppdt-level-site-09-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-09-deploy - template: - metadata: - labels: - pod: ppdt-level-site-09-deploy - spec: - containers: - - name: ppdt-level-site-09-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file diff --git a/eks-config/k8/level_sites/level_site_09_service.yaml b/eks-config/k8/level_sites/level_site_09_service.yaml deleted file mode 100644 index 6b924d1..0000000 --- a/eks-config/k8/level_sites/level_site_09_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-09-service -spec: - selector: - pod: ppdt-level-site-09-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/level_site_10_deployment.yaml b/eks-config/k8/level_sites/level_site_10_deployment.yaml deleted file mode 100644 index a37c4a6..0000000 --- a/eks-config/k8/level_sites/level_site_10_deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ppdt-level-site-10-deploy - labels: - app: ppdt-level-site-10-deploy -spec: - replicas: 1 - selector: - matchLabels: - pod: ppdt-level-site-10-deploy - template: - metadata: - labels: - pod: ppdt-level-site-10-deploy - spec: - containers: - - name: ppdt-level-site-10-deploy - image: andrewquijano92/ppdt - ports: - - containerPort: 9000 - env: - - name: TREE_ROLE - value: "LEVEL_SITE" - - - name: PORT_NUM - value: "9000" - - - name: AES_PASS - valueFrom: - secretKeyRef: - name: ppdt-secrets - key: aes-key \ No newline at end of file diff --git a/eks-config/k8/level_sites/level_site_10_service.yaml b/eks-config/k8/level_sites/level_site_10_service.yaml deleted file mode 100644 index 9adb87e..0000000 --- a/eks-config/k8/level_sites/level_site_10_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-level-site-10-service -spec: - selector: - pod: ppdt-level-site-10-deploy - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 - type: NodePort diff --git a/eks-config/k8/level_sites/ppdt-secrets.yaml b/eks-config/k8/level_sites/ppdt-secrets.yaml deleted file mode 100644 index 8ca5dc5..0000000 --- a/eks-config/k8/level_sites/ppdt-secrets.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: ppdt-secrets -type: Opaque -data: - aes-key: c3VwZXJsZWV0c2VjcmV0c3RvcHdu \ No newline at end of file diff --git a/eks-config/k8/server/server_service.yaml b/eks-config/k8/server/server_service.yaml deleted file mode 100644 index 757d7cd..0000000 --- a/eks-config/k8/server/server_service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ppdt-server-service -spec: - clusterIP: None # clusterIP must be None to create a headless service - selector: - job-name: ppdt-server-deploy # must match Job name - ports: - - protocol: TCP - port: 9000 - targetPort: 9000 diff --git a/eks-config/k8/server/server_training_job.yaml b/eks-config/k8/server/server_training_job.yaml deleted file mode 100644 index 9b2f093..0000000 --- a/eks-config/k8/server/server_training_job.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: ppdt-server-deploy -spec: - template: - spec: - subdomain: ppdt-server-service # has to match Service name - restartPolicy: OnFailure - - containers: - - name: ppdt-server-deploy - image: andrewquijano92/ppdt - command: ["/bin/sh"] - args: ["-c", "gradle run -PchooseRole=weka.finito.server --args /data/hypothyroid.arff"] - env: - - name: TREE_ROLE - value: "SERVER" - - - name: PRECISION - value: "2" - - - name: PORT_NUM - value: "9000" - - - name: LEVEL_SITE_DOMAINS - value: "ppdt-level-site-01-service,ppdt-level-site-02-service,ppdt-level-site-03-service,ppdt-level-site-04-service,ppdt-level-site-05-service,ppdt-level-site-06-service,ppdt-level-site-07-service,ppdt-level-site-08-service,ppdt-level-site-09-service,ppdt-level-site-10-service" - - - name: GRADLE_USER_HOME - value: "gradle_user_home" - - backoffLimit: 4 \ No newline at end of file diff --git a/env.sh b/env.sh index edefb76..a8d6644 100644 --- a/env.sh +++ b/env.sh @@ -1,6 +1,8 @@ #!/bin/bash +export TREE_ROLE="CLIENT" export PRECISION=2 -export PPDT_KEY_SIZE=1024 export PORT_NUM=9000 export LEVEL_SITE_DOMAINS="ppdt-level-site-01-service,ppdt-level-site-02-service,ppdt-level-site-03-service,ppdt-level-site-04-service,ppdt-level-site-05-service,ppdt-level-site-06-service,ppdt-level-site-07-service,ppdt-level-site-08-service,ppdt-level-site-09-service,ppdt-level-site-10-service" -export TREE_ROLE="SERVER" \ No newline at end of file +export PPDT_KEY_SIZE=2048 +export SERVER="ppdt-server-service" +export GRADLE_USER_HOME="gradle_user_home" \ No newline at end of file diff --git a/k8/client/client_deployment.yaml b/k8/client/client_deployment.yaml index da3081d..2b23f37 100644 --- a/k8/client/client_deployment.yaml +++ b/k8/client/client_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-client-deploy labels: app: ppdt-client-deploy + role: client spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-client-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: @@ -34,7 +34,7 @@ spec: value: "ppdt-level-site-01-service,ppdt-level-site-02-service,ppdt-level-site-03-service,ppdt-level-site-04-service,ppdt-level-site-05-service,ppdt-level-site-06-service,ppdt-level-site-07-service,ppdt-level-site-08-service,ppdt-level-site-09-service,ppdt-level-site-10-service" - name: PPDT_KEY_SIZE - value: "1024" + value: "2048" - name: SERVER value: "ppdt-server-service" diff --git a/k8/level_sites/level_site_01_deployment.yaml b/k8/level_sites/level_site_01_deployment.yaml index d028941..5892e00 100644 --- a/k8/level_sites/level_site_01_deployment.yaml +++ b/k8/level_sites/level_site_01_deployment.yaml @@ -16,8 +16,7 @@ spec: spec: containers: - name: ppdt-level-site-01-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: @@ -31,4 +30,4 @@ spec: valueFrom: secretKeyRef: name: ppdt-secrets - key: aes-key + key: aes-key \ No newline at end of file diff --git a/k8/level_sites/level_site_02_deployment.yaml b/k8/level_sites/level_site_02_deployment.yaml index da5ee28..8ca6ff3 100644 --- a/k8/level_sites/level_site_02_deployment.yaml +++ b/k8/level_sites/level_site_02_deployment.yaml @@ -16,8 +16,7 @@ spec: spec: containers: - name: ppdt-level-site-02-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: @@ -31,4 +30,4 @@ spec: valueFrom: secretKeyRef: name: ppdt-secrets - key: aes-key \ No newline at end of file + key: aes-key diff --git a/k8/level_sites/level_site_03_deployment.yaml b/k8/level_sites/level_site_03_deployment.yaml index 839fa70..c383b2f 100644 --- a/k8/level_sites/level_site_03_deployment.yaml +++ b/k8/level_sites/level_site_03_deployment.yaml @@ -16,8 +16,7 @@ spec: spec: containers: - name: ppdt-level-site-03-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: diff --git a/k8/level_sites/level_site_04_deployment.yaml b/k8/level_sites/level_site_04_deployment.yaml index d7e9773..4befe39 100644 --- a/k8/level_sites/level_site_04_deployment.yaml +++ b/k8/level_sites/level_site_04_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-level-site-04-deploy labels: app: ppdt-level-site-04-deploy + role: level-site spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-level-site-04-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: @@ -31,4 +31,4 @@ spec: valueFrom: secretKeyRef: name: ppdt-secrets - key: aes-key \ No newline at end of file + key: aes-key diff --git a/k8/level_sites/level_site_05_deployment.yaml b/k8/level_sites/level_site_05_deployment.yaml index 0440ea7..26d9051 100644 --- a/k8/level_sites/level_site_05_deployment.yaml +++ b/k8/level_sites/level_site_05_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-level-site-05-deploy labels: app: ppdt-level-site-05-deploy + role: level-site spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-level-site-05-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: diff --git a/k8/level_sites/level_site_06_deployment.yaml b/k8/level_sites/level_site_06_deployment.yaml index e1bcf88..cce66b0 100644 --- a/k8/level_sites/level_site_06_deployment.yaml +++ b/k8/level_sites/level_site_06_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-level-site-06-deploy labels: app: ppdt-level-site-06-deploy + role: level-site spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-level-site-06-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: @@ -31,4 +31,4 @@ spec: valueFrom: secretKeyRef: name: ppdt-secrets - key: aes-key \ No newline at end of file + key: aes-key diff --git a/k8/level_sites/level_site_07_deployment.yaml b/k8/level_sites/level_site_07_deployment.yaml index 65b4756..44f16ec 100644 --- a/k8/level_sites/level_site_07_deployment.yaml +++ b/k8/level_sites/level_site_07_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-level-site-07-deploy labels: app: ppdt-level-site-07-deploy + role: level-site spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-level-site-07-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: @@ -31,4 +31,4 @@ spec: valueFrom: secretKeyRef: name: ppdt-secrets - key: aes-key + key: aes-key \ No newline at end of file diff --git a/k8/level_sites/level_site_08_deployment.yaml b/k8/level_sites/level_site_08_deployment.yaml index 0a34f28..1aa4323 100644 --- a/k8/level_sites/level_site_08_deployment.yaml +++ b/k8/level_sites/level_site_08_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-level-site-08-deploy labels: app: ppdt-level-site-08-deploy + role: level-site spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-level-site-08-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: @@ -31,4 +31,4 @@ spec: valueFrom: secretKeyRef: name: ppdt-secrets - key: aes-key + key: aes-key \ No newline at end of file diff --git a/k8/level_sites/level_site_09_deployment.yaml b/k8/level_sites/level_site_09_deployment.yaml index 2dd2b9b..6cbac3b 100644 --- a/k8/level_sites/level_site_09_deployment.yaml +++ b/k8/level_sites/level_site_09_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-level-site-09-deploy labels: app: ppdt-level-site-09-deploy + role: level-site spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-level-site-09-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: diff --git a/k8/level_sites/level_site_10_deployment.yaml b/k8/level_sites/level_site_10_deployment.yaml index cbf9ff1..4b69272 100644 --- a/k8/level_sites/level_site_10_deployment.yaml +++ b/k8/level_sites/level_site_10_deployment.yaml @@ -4,6 +4,7 @@ metadata: name: ppdt-level-site-10-deploy labels: app: ppdt-level-site-10-deploy + role: level-site spec: replicas: 1 selector: @@ -16,8 +17,7 @@ spec: spec: containers: - name: ppdt-level-site-10-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt ports: - containerPort: 9000 env: diff --git a/k8/server/server_training_job.yaml b/k8/server/server_training_job.yaml index 14510e2..9fd3980 100644 --- a/k8/server/server_training_job.yaml +++ b/k8/server/server_training_job.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: name: ppdt-server-deploy + role: server spec: template: spec: @@ -10,8 +11,7 @@ spec: containers: - name: ppdt-server-deploy - image: ppdt:experiment - imagePullPolicy: IfNotPresent + image: andrewquijano92/ppdt command: ["/bin/sh"] args: ["-c", "gradle run -PchooseRole=weka.finito.server --args /data/hypothyroid.arff"] env: