Is it possible to mix kubeflow components with tensorflow extended components? - kubeflow

It looks like Kubeflow has deprecated all of their TFX components. I currently have some custom Kubeflow components that help launch some of my data pipelines and I was hoping I could use some TFX components in the same kubeflow pipeline. Is there a recommended approach to mix Kubeflow and Tfx components together?
I saw an older PR from Kubeflow deprecating their TFX components:
https://github.com/kubeflow/pipelines/issues/3853
It states:
These components were created to allow the users to use TFX components
in their KFP pipelines, to be able to mix KFP and TFX components. If
your pipeline uses only TFX components, please use the official TFX
SDK.
But I actually do need to mix KFP and TFX components, is there a way to do this?

The simple answer is no, the long answer is you could, if you hack it. The experience wouldn't be great though.
When you look at an example TFX pipeline, it has it's own Python DSL. As a user, you define the pipeline components the way you want it to run, and at the very end you can change the target runner (Airflow, Beam, and KFP). TFX will compile it's intermediate representation before submitting that to the runner of your choice.
The question then is how can you mix that with other tools. TFX compiles an Argo workflow DAG, similar to if you use the KFP SDK or Couler. When you use the KubeflowDAG runner, you can find the output Argo YAML for the pipeline. If you repeat the same compilation process with your KFP native pipeline, you'll have two Argo YAMLs you can merge together for the specific workload you want.
If you are using MLMD, you may need to do some input/output manipulation to make it all work.

Related

Equivalent of TFX Standard Components in KubeFlow

I have an existing TFX pipeline here that I want to rewrite using the KubeFlow Pipelines SDK.
The existing pipeline is using many TFX Standard Components such as ExampleValidator. When checking the KubeFlow SDK, I see a kfp.components.package but no existing prebuilt components like TFX provides.
Does the KubeFlow SDK have an equivalent to the TFX Standard Components?
You don’t have to rewrite the components, there is no mapping of components of tfx in kfp, as they are not competitive tools.
With tfx you create the components and then you use an orchestrator to run them. Kubeflow pipelines is one of the orchestrators.
The tfx.orchestration.pipeline will wrap your tfx components and create your pipeline.
We have two schedulers behind kubeflow pipelines: Argo (used by gcp) and Tekton (used by openshift). There are examples for tfx with kubeflow pipelines using tekton and tfx with kubeflow pipelines using argo in the respective repositories.
Actually Kubeflow does have a notion of reusable components that they reference in the docs. They can be python-based or YAML-based and so on. However, there is no 'standard' ones like TFX has them. You can just see a bunch of them in the examples repo, and create your own reusable ones.
You can sort of treat TFX components and Kubeflow components somewhat interchangeably though, as TFX components do get compiled into the Kubeflow representation via the orchestrator logic. Simply use the KubeflowDagRunner with your TFX pipelines. However I might be missing something: What is your motivation to re-write in Kubeflow?

What is difference between Jenkins Shared Libraries and Jenkins pipeline templates

I am trying to understand what is exact difference between Jenkins Shared Libraries and Jenkins pipeline templates.
Shared libraries as I understand is used for keeping common code and making it accessible to multiple pipelines.
I am not able to understand then what is difference between Jenkins pipeline template. Also what is the use of Jenkins templates created using template engine. Is it somehow similar to shared library
maintainer of the Jenkins Templating Engine here.
Shared Libraries
Focused on reusing pipeline code. A Jenkinsfile is still required for each individual application and those individual pipelines have to import the libraries.
Jenkins Templating Engine
A pipeline development framework that enables tool-agnostic pipeline templates.
Rather than creating individual Jenkinsfiles, you can create a centralized set of pipeline templates.
These templates invoke steps such as:
build()
unit_test()
deploy_to dev
This common template can be applied across teams, regardless of the technology they're using.
The build, unit_test, and deploy_to steps would come from libraries.
There may be multiple libraries that implement the build step, such as npm, gradle, maven, etc.
Rather than have each team define an entire pipeline, they can now just declare the tools that should be used to "hydrate" the template via a pipeline configuration file:
libraries{
npm // contributes the build step
}
Feel free to check out this CDF Webinar: Pipeline Templating with the Jenkins Templating Engine.

How to develop groovy script effectively for Jenkins pipeline?

I'm very new to Jenkins pipeline and trying to write some Groovy scripts in pipeline. Now, I'm using declarative pipeline and writing Groovy code in Jenkins UI itself which is not helping with auto-population of methods on objects, auto-import etc.
Generally when we use IDE like eclipse, Intellij Idea for Java programming, we can see respective imports are automatically added in the code and also autosuggestion is supported.
How can I groovy code effectively for Jenkins pipeline which would save my time and help with autom-suggestion of methods, imports, compilation error etc?
I have achieved auto-import, auto-completion (and somewhat unit-testing) in IntelliJ using this setup.
The caveat is that I'm using scripted pipeline and the setup is also used for Groovy scripts for Jenkins hooks and Jenkins shared library.

Jenkins CI/CD pipeline tools and stages

I am trying to understand the CI/CD pipeline.
I know that there are different stages like getting the requirement (using JIRA), fetching the source code from SCM, building it (Maven, Ant, Gradle, NPM), Artifact archival (Nexus, JFrog, Artifactory), unit testing (JUnit), other testings and deployment.
I am missing some advanced steps like integrating tools like Code Quality check (SonarQube), Configuration Managment (Chef/Ansible), Deployment tools (Docker) and maybe more.
What would be a good example of a full Continuous Integration, Continuous Deployment and Continuous Delivery pipeline including the popular tools and plugins used with Jenkins for a Java, PHP, JavaScript or Node based project?
Thanks in advance.

Multiconfiguration and Jenkins pipeline Jenkinsfile

I have an application which needs to be tested for several architectures (Centos5, Centos6, Centos7);
I implemented a Jenkinsfile in which I run the set of tests for the chosen a architecture target.
Now I want to somehow run these tests for all target architectures. How can I achieve this?
I was told that I need to investigate about Jenkins multi-configuration projects, but all the examples I could find are about Java based projects only. And if this is the approach to be used, how can I call my Jenkins script with different input parameter values?
I will appreciate if someone could provide me some hints on where to start and with which Jenkins plugins.
thanks
Now, I want to achieve a matrix based approach, namely build
I have written a Jenkins pipeline which builds an application.

Resources