Closed titou10titou10 closed 4 years ago
Right now the closest thing would be template + stage-only mode, where the image is built and deployed to a new service but no weight is shifted to it. You can also wire your own tekton pipelines. In the future we'll have a completely manual flow, and our pipelines will be expanded to allow for more custom flows. Can you expand on your use case ? If all you want is to build the image and push it to a registry without deploying than a standard pipeline provider might fit you better.
I discovered tektoncd recently and indeed it seems we can do exactly that with tektoncd
As for the use case, we have many applications where the "build" is decoupled from the "deploy" as we have to create other k8s artefacts (ConfiMaps, secrtes...) and synchronize the deployment with other systems and the build is done in a different cluster from the build etc.
Now the question are:
Please see that post as a (positive) way to help clarify what we can do or not with rio and what features should be included (or excluded..) in future versions of rio.
Rio is an app deployment engine, its goal is to take you from git+dockerfile+k8s to a live url, plus versioning and management after that, and making it all very simple. You can think of it as an abstraction layer on top of Kubernetes.
why should we deploy rio + tektoncd? rio proposes some facilities on the build/deploy front but not a "full pipeline" it seems
Rio actually installs and uses tektonCD internally for the build steps, you can see it (and reuse it in other ways) in the tekton-pipelines
namespace.
is rio complementary of tools like "tektoncd"? In what place rio is "better" or "different" from other tools on the build/deploy area?
Rio has a much larger scope than a CD tool, it uses CD as one part of its flow but there are many other parts ie: not having to deal with k8s service/deployment, installing a service mesh and handling traffic shifting, configuring lets-encrypt and DNS etc...
For your use case, if you need build and deployment in different clusters, or to handle multi-system deployment then Rio isn't ideal for that, at least not right now. Also in the future you will be able to manipulate the pipeline to do things like hooking into build steps, but for now you'd have to do it all by hand separately.
OK. thanks for your answer and clarification.
I will close this question and continue to follow the development of rio and regularly check if it meets our requirements.
Maybe adding an easy way to just "build+push" in rio (in the"rio build"
command with a reference to the target docker repo and a secret for the credentials?) would be a good addition like the OpenShiftBuildConfig
and Build
resources do.
@titou10titou10 I have the same need and I am able to do build + push only w/ v0.6.0. I create a Riofile (in my git project root w/ my Dockerfile) like:
services:
my-test:
image: ./
build:
pushRegistry: my.registry.com
pushRegistrySecretName: docker-config
imageName: my.registry.com/example/my-test
and then do: rio up
image gets built and pushed to registry. no idea yet if this will still work in v0.7.0.
@mbarlow thanks for the info, I'll give it a try
@titou10titou10 sorry, I meant do: rio build
Thats true, rio build
does build and push image to the registry with buildkit, no riofile needed. You can then see it with rio image
, and deploy that by hand rio run -n demo -p 8080 localhost:5442/default/demo:latest
. I should have this mentioned before, but its all manual. You can't integrate it into the rio pipeline yet, ie: track a repo with polling or webhook and when a new commit comes in build to registry but don't deploy it.
Thanks. I have my answer now.
This is not a bug, just a question
As said in the title, is it possible to just build/push an image from a Dockerfile or from another source, without deploying the image? This would be the equivalent of CRD BuildConfig/Build in OpenShift and it is very usefull...
Ref: