Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi Team,
I am following the below link for implementing CI/CD in Dataiku.
https://knowledge.dataiku.com/latest/kb/o16n/ci-cd/index.html#what-s-next
It is mentioned here like Artifactory is used to store the Bundle.
I just want to confirm how we can maintain the version of the Bundle and roll it back when required (to PREPROD/PROD).
Thanks in Advance.
Hello,
In this sample, Artifactory is used for archiving. The actual bundles that are deployed to automation nodes are stored within the DSS node hosting the Deployer (the Design node in this case).
As for the rollback, there are many options:
Hope this helps
Hi,
This is really great.
But how can I do a rollback to the previous bundle based on my test results which I will run on TEST Node? I mean to say what if something is not working properly after deployment to TEST (test results failed) then how can I do a rollback in that case?
Thanks in Advance
Hello,
In a pure CI/CD logic, all versions that pass tests should be moved to prod and if any issue occur, the rollback to the previous version should be enough to get the last working bundle.
If, for any reason, you are not certain of this logic or want to base the rollback on the test result status, there is nothing out of the box for that, so you need to code it.
As a guideline and personal thoughts, I can suggest 2 ideas:
Note that those are 2 ideas, I have not tested them.
Hope this helps
You can use the same logic as in deploy_bundle.py from the deploy to prod stage, this is exactly what is done there:
With this, you always have the last working bundle on your TEST node (and you haven't touch the preprod/prod
Hi,
Thanks for the Solution. I was just looking into the link but could you please tell me about the arguments below, where can I find these values in the code deploy_bundle.py
Specially infra = sys.argv[5].
import dataikuapi
import sys
pdpl_host = sys.argv[1]
pdpl_apiKey = sys.argv[2]
project = sys.argv[3]
bundle_id = sys.argv[4]
infra = sys.argv[5]
auto_host = sys.argv[6]
auto_apiKey = sys.argv[7]
Hello,
Those are command-line arguments setup within Jenkins groovy pipeline file (sample here)
sh "python 4_deploy_prod/deploy_bundle.py '${DESIGN_URL}' '${DESIGN_API_KEY}' '${DSS_PROJECT}' '${bundle_name}' '${AUTO_PROD_ID}' ${AUTO_PROD_URL} ${AUTO_PROD_API_KEY}"
Those variables here are the one defined within Jenkins project.
In your case, sys.argv[5] is the fifth argument, which is '${AUTO_PROD_ID}'. In the example, this is the infrastructure ID as defined in DSS Project Deployer (as you can see in the main doc: auto-prod in the sample case)