-
Notifications
You must be signed in to change notification settings - Fork 113
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
Deploy Aggregator on GCP #705
Conversation
adb965b
to
4998aa3
Compare
fi | ||
|
||
# Push Oak application server Docker image. | ||
docker load -i "./${IMAGES:1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the :1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that not needed now? What if IMAGES
returns more than one? I was just asking, not suggesting to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted it after checking that there is only one directory with this file.
Previously I had multiple - not I think I had them because I changed the output dir.
I think I'll just add a check+error that there a more that one aggregator.tar
files, since there can be only one.
readonly AGGREGATOR_DOCKER_IMAGE_NAME='gcr.io/oak-ci/oak-aggregator' | ||
readonly BACKEND_DOCKER_IMAGE_NAME='gcr.io/oak-ci/oak-aggregator-backend' | ||
|
||
readonly IMAGES="$(find ./bazel-cache -name aggregator_image.tar)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a very crude way to find those images. Can they not be found under a specific path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path depends on the username:
"./bazel-cache/_bazel_${USERNAME}/b6bc0828d5b43c7085b650e0698bf388/execroot/oak/bazel-out/k8-dbg/bin/examples/aggregator/server/aggregator_image.tar"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why are they not under bazel-out
or bazel-bin
or some other variation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ find . -name 'aggregator_*.tar' 1 ↵
./bazel-cache/_bazel_ivanpetrov/b6bc0828d5b43c7085b650e0698bf388/execroot/oak/bazel-out/k8-dbg/bin/examples/aggregator/server/aggregator_image.tar
./bazel-cache/_bazel_ivanpetrov/b6bc0828d5b43c7085b650e0698bf388/execroot/oak/bazel-out/k8-dbg/bin/examples/aggregator/server/aggregator_image-layer.tar
./bazel-cache/_bazel_ivanpetrov/b6bc0828d5b43c7085b650e0698bf388/execroot/oak/bazel-out/k8-fastbuild/bin/examples/aggregator/server/aggregator_backend_image-layer.tar
./bazel-cache/_bazel_ivanpetrov/b6bc0828d5b43c7085b650e0698bf388/execroot/oak/bazel-out/k8-fastbuild/bin/examples/aggregator/server/aggregator_backend_image.tar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bazel-bin
is only available inside Docker.
And it's now only possible to push Docker image outside the dev Docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be possible to copy things out from bazel-bin to another output directory, while running in Docker? That seems cleaner than just looking around in the bazel cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree
So we need a new temporary directory for this. And we probably need to always check that this directory is cleared, once something like bazel clean
is running.
Is it possible to use target
directory for this? Or it's better to keep it only for rust
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps go ahead with this PR as it is for now, but create a separate issue to track copying artefacts to an output directory (can just be called out
, and git-ignored). We can then copy Rust binaries, wasm files, Docker images, Oak applications and anything else in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created an issue #719
This change adds a
./examples/aggregator/scripts
directory that contains scripts for Google Cloud deployment using Kubernetes.Fixes #693
Checklist
cover any TODOs and/or unfinished work.
construction.