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

Single server #7

Merged
merged 5 commits into from
Oct 29, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/build-gradle-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
env:
ALIAS: andrew
KEYSTORE: andrew_keystore
KEYSTORE: keystore
PASSWORD: ${{ secrets.PASSWORD }}

steps:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build-push-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
ALIAS: andrew
KEYSTORE: andrew_keystore
PASSWORD: ${{ secrets.PASSWORD }}

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -27,7 +32,10 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}


- name: Create Key Store
run: sh create_keystore.sh

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ bin

# No attaching Kubernetes secrets
k8/level_sites/ppdt-secrets.yaml
k8/client/ppdt-secrets.yaml
k8/server/ppdt-secrets.yaml
k8/server-job/ppdt-secrets.yaml

# Outputs from PPDT creation
output
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ bash setup.sh

1. Check the `config.properties` file is set to your needs. Currently:
1. It assumes level-site 0 would use port 9000, level-site 1 would use port 9001, etc.
1. If you modify this, provide a comma separated string of all the ports for each level-site.
2. Currently, it assumes ports 9000 - 9009 will be used.
1. If you modify this, provide a comma-separated string of all the ports for each level-site.
2. Currently, it assumes ports 90009009 will be used.
2. key_size corresponds to the key size of both DGK and Paillier keys.
3. precision controls how accurate to measure thresholds that are decimals. If a value was 100.1, then a precision of
1 would set this value to 1001.
Expand Down Expand Up @@ -66,7 +66,7 @@ This would assume one execution rather than multiple executions.
In the `server_site_training_job.yaml` file, you need to change the first argument to point to the right ARFF file.

#### Creating a Kubernetes Secret
You should set up a Kubernetes secret file, called `ppdt-secrets.yaml` in the `k8/level-sites` folder.
You should set up a Kubernetes secret file, called `ppdt-secrets.yaml` in the `k8/level-sites`, `k8/client`, and `k8/server` folder.
In the yaml file, you will need to replace <SECRET_VALUE> with a random string encoded in Base64.
This secret is used in the AES encryption between level sites.
```yaml
Expand All @@ -76,7 +76,7 @@ metadata:
name: ppdt-secrets
type: Opaque
data:
aes-key: <SECRET_VALUE>>
keystore-pass: <SECRET_VALUE>>
```

or you can use the command:
Expand Down Expand Up @@ -144,7 +144,7 @@ To get the results, access the logs as described in the previous steps for both

#### Re-running with different experiments
- *Case 1: Re-run with different testing set*
As the job created the pod, you would connect to the pod and run the modified gradle command with the other VALUES file.
As the job created the pod, you would connect to the pod and run the modified Gradle command with the other VALUES file.
```bash
kubectl exec -i -t $(kubectl get pod -l "pod=ppdt-client-deploy" -o name) -- bash -c "gradle run -PchooseRole=weka.finito.client --args <VALUES-FILE>"
```
Expand Down
9 changes: 9 additions & 0 deletions k8/client/client_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ spec:

- name: GRADLE_USER_HOME
value: "gradle_user_home"

- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_01_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_02_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_03_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_04_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_05_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_06_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_07_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_08_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_09_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 6 additions & 3 deletions k8/level_sites/level_site_10_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ spec:
- name: PORT_NUM
value: "9000"

- name: AES_PASS
- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: aes-key
name: ppdt-secrets
key: keystore-pass
9 changes: 9 additions & 0 deletions k8/server-job/server_training_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ spec:
- name: GRADLE_USER_HOME
value: "gradle_user_home"

- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: keystore-pass

backoffLimit: 4
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ spec:

- name: GRADLE_USER_HOME
value: "gradle_user_home"

- name: KEYSTORE
value: "keystore"

- name: PASSWORD
valueFrom:
secretKeyRef:
name: ppdt-secrets
key: keystore-pass
File renamed without changes.
89 changes: 0 additions & 89 deletions src/main/java/weka/finito/AES.java

This file was deleted.

Loading