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

Veilid Prototype Iteration 2 #8526

Merged
merged 68 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
d851e16
customized Veilid Installation by arguments
rasswanth-s Feb 24, 2024
f820db1
Optimized Veilid Docker Installation by installing pre-built packages
rasswanth-s Feb 24, 2024
b4235eb
added documentation for development
rasswanth-s Feb 24, 2024
dbc38f7
Revert "Optimized Veilid Docker Installation by installing pre-built …
rasswanth-s Feb 24, 2024
b982e79
revert generic docker file optimization:
rasswanth-s Feb 24, 2024
9df8500
added initial health check endpoint
rasswanth-s Feb 24, 2024
50c2359
Shifted to using a singleton for veilid connections
rasswanth-s Feb 24, 2024
45bd011
added generate and retrieve dht key endpoints
rasswanth-s Feb 24, 2024
6bfe9e4
added app_message endpoint
rasswanth-s Feb 24, 2024
3587751
added logging to Veilid Containers
rasswanth-s Feb 25, 2024
7c4b306
Added private route generation in DHT record
rasswanth-s Feb 25, 2024
b2f4547
Added context managers for async functions
rasswanth-s Feb 25, 2024
f5d1665
Added handler for app message
rasswanth-s Feb 25, 2024
bbb170c
Added bi-directional communication by app_message
rasswanth-s Feb 25, 2024
139bcdf
Added app call endpoint
rasswanth-s Feb 25, 2024
871db0f
added custom proxy methods
rasswanth-s Feb 25, 2024
67721e8
added async httpx library for request processing
rasswanth-s Feb 25, 2024
e9f8757
added Veilid to Kubernetes
rasswanth-s Feb 26, 2024
1887789
added veilid connection class
rasswanth-s Feb 26, 2024
8647345
added Veilid Connection to connect, login functions
rasswanth-s Feb 26, 2024
6cdffd3
working metadata endpoint
rasswanth-s Feb 26, 2024
fc62128
temporarily disabled numpy lib endpoint
rasswanth-s Feb 26, 2024
0e1011f
added lzma for compressions of message requests
rasswanth-s Feb 26, 2024
53b9c27
added new veilid service
rasswanth-s Feb 26, 2024
54473ca
added veilid node route
rasswanth-s Feb 27, 2024
10480ab
add todo comments
rasswanth-s Feb 27, 2024
beab07f
added veilid exchange route for connecting to gateway
rasswanth-s Feb 27, 2024
2d7dc23
Fixed Gateway Connection between nodes
rasswanth-s Feb 27, 2024
b6bce47
parametrize kubernetes deployments in devspace
rasswanth-s Feb 27, 2024
4138248
added devspace profiles
rasswanth-s Feb 27, 2024
6abe9d0
added a flag for Direct Connection
rasswanth-s Feb 27, 2024
80892b7
added veilid to syft candidate releaes and dev releases
rasswanth-s Feb 28, 2024
dce02b5
merge dev and fix conflicts in tox, client.py, enclave_client.py, dom…
rasswanth-s Mar 8, 2024
28de338
remove enclave metadata v1 migration and fix protocol version
rasswanth-s Mar 8, 2024
e76e09f
fix devspace.yaml and protocol version
rasswanth-s Mar 8, 2024
65b95b5
merge dev and fix values.yaml in helm
rasswanth-s Mar 8, 2024
f105421
modified veilid yaml files to the new yaml files structure
rasswanth-s Mar 8, 2024
0074140
fixed pydantic v2 types errors in Veilid Connection
rasswanth-s Mar 8, 2024
b4feb33
lint iter 1
rasswanth-s Mar 8, 2024
19b8258
lint iter 2
rasswanth-s Mar 8, 2024
b495cc7
lint iter 3
rasswanth-s Mar 8, 2024
48630f1
shift veilid service and fast api application to use pydantic models
rasswanth-s Mar 9, 2024
9a00d5d
re-transform the veilid health service
rasswanth-s Mar 9, 2024
ce81729
Revert "temporarily disabled numpy lib endpoint"
rasswanth-s Mar 9, 2024
36a2f37
shifted to enable veilid service only during when veilid sidecar cont…
rasswanth-s Mar 9, 2024
e663e83
disable lib endpoints selectively when veilid is enabled
rasswanth-s Mar 9, 2024
0619017
remove routes argument
rasswanth-s Mar 9, 2024
d1cffcb
add notes for launching multiple clusters
rasswanth-s Mar 9, 2024
f3cd183
removed seaweedfs building during gateway deployments
rasswanth-s Mar 9, 2024
6b26814
added a new action to create more free space in github
rasswanth-s Mar 9, 2024
6cfa516
prevent deleting large package to save on CI time
rasswanth-s Mar 9, 2024
b540221
modified type annotations of app message
rasswanth-s Mar 10, 2024
6ac2f4d
modified type annotations of app call
rasswanth-s Mar 10, 2024
5fec305
modularized the app call and app message endpoints further
rasswanth-s Mar 10, 2024
ece2696
minor refactor in comments of veilid core
rasswanth-s Mar 10, 2024
c3bcaf5
added convinient scripts for launching multiple stacks
rasswanth-s Mar 10, 2024
5b28443
modified permissions of scripts
rasswanth-s Mar 10, 2024
a711aa7
added separate scripts for launching nodes
rasswanth-s Mar 10, 2024
d7b3881
added gateway connection test for veilid
rasswanth-s Mar 10, 2024
5b49f06
Merge branch 'dev' into rasswanth/veilid-prototype
rasswanth-s Mar 11, 2024
e23cac6
lint with upgraded versions
rasswanth-s Mar 11, 2024
5645ba3
shifted veilid classes to object version 1
rasswanth-s Mar 11, 2024
73c5ca4
added arg version to veilid dockerfile
rasswanth-s Mar 11, 2024
bf3c3ac
Merge branch 'dev' into rasswanth/veilid-prototype
rasswanth-s Mar 12, 2024
3c16d60
address review comments
rasswanth-s Mar 12, 2024
a08616e
Merge branch 'dev' into rasswanth/veilid-prototype
rasswanth-s Mar 12, 2024
4178cf4
re-named default_factory to default
rasswanth-s Mar 12, 2024
2552ab1
Merge branch 'dev' into rasswanth/veilid-prototype
madhavajay Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/cd-syft-dev.yml
Expand Up @@ -121,6 +121,17 @@ jobs:
${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:dev-${{ github.sha }}
${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:${{ steps.grid.outputs.GRID_VERSION }}

- name: Build and push `grid-veilid` image to registry
uses: docker/build-push-action@v5
with:
context: ./packages/grid/veilid
file: ./packages/grid/veilid/veilid.dockerfile
push: true
tags: |
${{ secrets.ACR_SERVER }}/openmined/grid-veilid:dev
${{ secrets.ACR_SERVER }}/openmined/grid-veilid:dev-${{ github.sha }}
${{ secrets.ACR_SERVER }}/openmined/grid-veilid:${{ steps.grid.outputs.GRID_VERSION }}

- name: Build Helm Chart & Copy to infra
if: github.ref == 'refs/heads/dev' || github.event.inputs.deploy-helm == 'true'
shell: bash
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/cd-syft.yml
Expand Up @@ -246,7 +246,24 @@ jobs:
digest="${{ steps.grid-seaweedfs-build.outputs.digest }}"
touch "/tmp/digests/grid-seaweedfs/${digest#sha256:}"

- name: Upload digest for grid-backend, grid-frontend and grid-seaweedfs
- name: Build and push `grid-veilid` image to DockerHub
id: grid-veilid-build
uses: docker/build-push-action@v5
with:
context: ./packages/grid/veilid
file: ./packages/grid/veilid/veilid.dockerfile
platforms: ${{ steps.release_metadata.outputs.release_platform }}
outputs: type=image,name=openmined/grid-veilid,push-by-digest=true,name-canonical=true,push=true
cache-from: type=registry,ref=openmined/grid-veilid:cache-${{ steps.release_metadata.outputs.short_release_platform }}
cache-to: type=registry,ref=openmined/grid-veilid:cache-${{ steps.release_metadata.outputs.short_release_platform}},mode=max

- name: Export digest for grid-veilid
run: |
mkdir -p /tmp/digests/grid-veilid
digest="${{ steps.grid-veilid-build.outputs.digest }}"
touch "/tmp/digests/grid-veilid/${digest#sha256:}"

- name: Upload digest for grid-backend, grid-frontend and grid-seaweedfs, grid-veilid
uses: actions/upload-artifact@v4
with:
name: digests-${{ steps.release_metadata.outputs.grid_version }}-${{ steps.release_metadata.outputs.short_release_platform }}
Expand Down Expand Up @@ -305,6 +322,14 @@ jobs:
-t openmined/grid-seaweedfs:${{ needs.build-and-push-docker-images.outputs.release_tag }} \
$(printf 'openmined/grid-seaweedfs@sha256:%s ' *)

- name: Create manifest list and push for grid-veilid
working-directory: /tmp/digests/grid-veilid
run: |
docker buildx imagetools create \
-t openmined/grid-veilid:${{ needs.build-and-push-docker-images.outputs.grid_version }} \
-t openmined/grid-veilid:${{ needs.build-and-push-docker-images.outputs.release_tag }} \
$(printf 'openmined/grid-veilid@sha256:%s ' *)

deploy-syft:
needs: [merge-docker-images]
if: always() && needs.merge-docker-images.result == 'success'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr-tests-stack.yml
Expand Up @@ -547,6 +547,12 @@ jobs:
run: |
sudo python ./scripts/patch_hosts.py --add-k3d-registry

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
large-packages: false

# free 10GB of space
- name: Remove unnecessary files
if: matrix.os == 'ubuntu-latest'
Expand Down
232 changes: 232 additions & 0 deletions notebooks/Testing/Veilid/Alice-Python-Server.ipynb
@@ -0,0 +1,232 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "c74990eb-d769-4117-8c88-e9210136606e",
"metadata": {},
"source": [
"## Alice Python Server"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "20df98d8-de6c-496c-b30e-6421ac99401c",
"metadata": {},
"outputs": [],
"source": [
"# third party\n",
"import requests"
]
},
{
"cell_type": "markdown",
"id": "54885cd0-f803-4911-8423-e595dc4cd7c3",
"metadata": {},
"source": [
"### 1. Create DHT Key and Private Route"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "41d82ff3-ceda-4569-8178-8758ef635cb0",
"metadata": {},
"outputs": [],
"source": [
"host = \"localhost\"\n",
"port = 4000"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0d9f3cca-66a7-4e6c-a332-b38a8f5c02db",
"metadata": {},
"outputs": [],
"source": [
"res = requests.post(f\"http://{host}:{port}/generate_dht_key\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "81c6aa9d-26b4-4672-a059-643edfeeed95",
"metadata": {},
"outputs": [],
"source": [
"res.content"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4a9487e3-f5c8-468e-acd0-261e21bc3e14",
"metadata": {},
"outputs": [],
"source": [
"res = requests.get(f\"http://{host}:{port}/retrieve_dht_key\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5b87e9e6-244f-47f7-a31a-fa7cbce65b88",
"metadata": {},
"outputs": [],
"source": [
"self_dht_key = res.json()[\"message\"]\n",
"print(\"=\" * 30)\n",
"print(self_dht_key)\n",
"print(\"=\" * 30)"
]
},
{
"cell_type": "markdown",
"id": "a8c70d99-6814-453d-80bf-d141c40ba24e",
"metadata": {},
"source": [
"### Send AppMessage using DHT Key to Self"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "aca01ec6-1bbe-44b5-ad4a-053ba1edcfe6",
"metadata": {},
"outputs": [],
"source": [
"json_data = {\"dht_key\": self_dht_key, \"message\": \"Hello to me again\"}\n",
"app_message = requests.post(f\"http://{host}:{port}/app_message\", json=json_data)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ff09ab92-3423-483a-abf3-51e8c2448cf9",
"metadata": {},
"outputs": [],
"source": [
"app_message.content"
]
},
{
"cell_type": "markdown",
"id": "4d0d9e39-bf05-4ef3-b00a-2bb605f041ee",
"metadata": {},
"source": [
"### Send AppCall using DHT Key to Self"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b8bc9f54-b2f0-4f88-8897-f640866ba2ed",
"metadata": {},
"outputs": [],
"source": [
"json_data = {\"dht_key\": self_dht_key, \"message\": \"Hello to app call\"}\n",
"app_call = requests.post(f\"http://{host}:{port}/app_call\", json=json_data)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2c1c4148-461a-459e-846a-fad332a7ce3a",
"metadata": {},
"outputs": [],
"source": [
"app_call.json()"
]
},
{
"cell_type": "markdown",
"id": "fd824cca-2a7f-4ea9-9e67-1c06d1f8bec2",
"metadata": {},
"source": [
"### Send AppMessage using DHT Key to Peer"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "25cfb508-dd08-44b9-85c9-e6aa07e96a97",
"metadata": {},
"outputs": [],
"source": [
"peer_dht_key = input(\"Enter Peer DHT Key\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2e2c1341-d840-4429-b3e5-093d8e90365e",
"metadata": {},
"outputs": [],
"source": [
"json_data = {\"dht_key\": peer_dht_key, \"message\": \"How are you doing , Bob\"}\n",
"app_message = requests.post(f\"http://{host}:{port}/app_message\", json=json_data)"
]
},
{
"cell_type": "markdown",
"id": "153377f6-698e-4013-9be3-0833b71ee0c4",
"metadata": {},
"source": [
"### Send Proxy Message "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "271d7316-eaab-438c-9192-55a4e44b9dea",
"metadata": {},
"outputs": [],
"source": [
"res = requests.get(\n",
" f\"http://{host}:{port}/proxy\",\n",
" json={\"url\": \"https://www.google.com\", \"method\": \"GET\", \"dht_key\": self_dht_key},\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "77e1ad1d-379a-4899-8805-c703ad437c0d",
"metadata": {},
"outputs": [],
"source": [
"res.content"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "73c1f0b0-d240-4964-a88b-365ea89b1bdd",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}