Open rsmets opened 3 years ago
Thanks for the bug report.
Are you on Mac OS X? It looks like mac os x's find
does not support printf
option.
Thanks for the prompt reply Nicolas.
That is indeed the case. Upon using the suggestion in the supplied link I was able to continue with the terraforming.
However, curious why one would opt to have effectively a shell script in a terraform file in order to build an image when one could just have it hosted publicly for no cost? Feels a little counterintuitive unless I am missing something?
Upon letting the apply run I hit another snag in the similar shell script spot.
Error: Error running command 'set -x
build_container () {
set -x
cd $1
container=$(basename $1)
cp Dockerfile.template Dockerfile
sed -i "s/((tezos_sentry_version))/latest-release/" Dockerfile
sed -i "s/((tezos_private_version))/latest-release/" Dockerfile
cat << EOY > cloudbuild.yaml
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', "gcr.io/solo-tezos-baker/$container:tezos-latest", '.']
images: ["gcr.io/solo-tezos-baker/$container:tezos-latest"]
EOY
gcloud builds submit --project solo-tezos-baker --config cloudbuild.yaml .
rm -v Dockerfile
rm cloudbuild.yaml
}
export -f build_container
find ./../docker -mindepth 1 -maxdepth 1 -type d -exec bash -c 'build_container "$0"' {} \; -print0 | xargs -0 stat -f '%i\n'
': exit status 1. Output: he end of D command
+ cat
+ gcloud builds submit --project solo-tezos-baker --config cloudbuild.yaml .
Creating temporary tarball archive of 4 file(s) totalling 1.4 KiB before compression.
Uploading tarball of [.] to [gs://solo-tezos-baker_cloudbuild/source/1614058707.159403-e3d6bb8e20234fdd900e72e42aa0b551.tgz]
Created [https://cloudbuild.googleapis.com/v1/projects/solo-tezos-baker/locations/global/builds/16a6c80c-0469-4f3e-9261-77c8a26c4033].
Logs are available at [https://console.cloud.google.com/cloud-build/builds/16a6c80c-0469-4f3e-9261-77c8a26c4033?project=662272710037].
ERROR: (gcloud.builds.submit) build 16a6c80c-0469-4f3e-9261-77c8a26c4033 completed with status "FAILURE"
...
Creating temporary tarball archive of 6 file(s) totalling 2.6 KiB before compression.
Uploading tarball of [.] to [gs://solo-tezos-baker_cloudbuild/source/1614058865.801133-78091a7a4b41485090e7e01162f4d2f2.tgz]
Created [https://cloudbuild.googleapis.com/v1/projects/solo-tezos-baker/locations/global/builds/7b73ee68-e58c-4572-8ec1-15e6820a91ab].
Logs are available at [https://console.cloud.google.com/cloud-build/builds/7b73ee68-e58c-4572-8ec1-15e6820a91ab?project=662272710037].
ERROR: (gcloud.builds.submit) build 7b73ee68-e58c-4572-8ec1-15e6820a91ab completed with status "FAILURE"
+ rm -v Dockerfile
+ rm cloudbuild.yaml
stat: illegal option -- -
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
Public images makes coordination of releases harder. I often deploy from my working dir and the current model suits that.
There is another project that I am working on which is releasing containers on docker hub. https://github.com/tqtezos/tezos-k8s
But, it does not support public baking yet.
I am not quite sure what exactly runs stat
in the build command above. It looks like you are the first person trying tezos-on-gke on mac os.
Huh, I guess I don't really understand why you feel "coordinating of [the] releases" is harder with public images, certainly sidesteps OS dependant shell scripts for one. Also ensures that everyone is using the same image instead of what was built locally. Creates a more dependable, repeatable deployment.
If the issue is the time to build and push to an image repo a CI job (github actions and ciricleci have generous free tiers) ought to solve that. Anyways just some suggestions.
Thanks again for your responsiveness. I suppose I could just run this from Ubuntu. I'll take a look at tezos-k8
. Curious why you went with a totally new project?
tezos-k8s was launched by the broader tezos dev ecosystem and has more use cases such as private chains.
It seems when running
terraform apply
from the/terraform
dir that theresource "null_resource" "push_containers"
in k8s.tf is causing the following error:I simply running apply with a few variables set:
Curious if anyone else has run into this or what I may be doing wrong? Thanks!