Discovery Deployment Hook In Deployer

Grixis
Grixis PartnerApplicant, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 72 ✭✭✭✭✭

Hey,

For those involved in CICD, industrialisation of use cases or, more specifically, DSS project deployment pipelines, I've just set up a service using hooks, which are configured in the deployer's infrastructure parameters. It's a real game changer that's helping to automate a lot of things !

You know when you deploy projects you want your service to be ideally end-to-end with as minimum human involvement in the loop as possible and to avoid having to go back so far in the deployer.

That's where I invite you to look in the "infras" section of your deployer, then in the settings you'll find sections on the different policies and the last one on "Deployment hooks".

And then, as the DSS docs state very briefly, you can simply : Deployment hooks allows you to execute your own set of actions written in Python, pre or post-deployment (available also for API Deployments). 🤫

thanks to this now, as soon as you deploy a project from a Design/Dev Node in your deployer, specifying the target infrastructure PreProd/Int/Test etc.

You can then define pre- and post-deployment rules.
In my case this means that in pre-deployment I can do all the control exercises that were managed on the other nodes or outsourced to the other services, for example,

  • Predeploy Hook for : Deployment validation policies
  • Predeploy Hook for : Permission reassignment
  • Predeploy : Trigger management and define the keys to externalise the ochestration or not.
  • Postdeploy : Launch build test on snapshot
  • Postdeploy : Internal alerting system

a small part of the CI pipe has been reorganised around this function ! :)

Now I'm trying to understand how it works with other elements of the deployer, in particular the bundles, to possibly tag those that are successful or not during pre-production testing. because if we stick to the logic of the CI, let's say that our project is a snapshot being deployed to a pre-prod automation node, after the test builds we could tag it as an eligible release so that it can continue its journey to the production automation node. Or just, the bundle tested, authorises the creation of a release of the project in question. (to keep it simple)

Consequently, I'm trying to run the python api functions inside a hook to find the bundle-id associated with the snapshot being tested, but we don't have a log to see what works…

This is what im trying to create, as Predeploy Hook:

  • Tag bundle in the deployer with the test result and the name of the infras

This is what it should be in theory, but KO actualy;

If anyone has been here before, please help me.🤗

Answers

  • Grixis
    Grixis PartnerApplicant, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 72 ✭✭✭✭✭
    edited July 2

    Hello guys,

    I'm back here to add some guesses that would explain the root cause:
    From dataiku's Deployer Node its not possible to update bundle tags or release notes. This can only be set from the Design Node. As a result, I'm going to explore an alternative way of identifying the deployer bundles that have been successful in the build tests.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,876 Neuron

    you could connect to the designer node using the API

  • Grixis
    Grixis PartnerApplicant, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 72 ✭✭✭✭✭

    In fact, I have to manage this from the design node using the python api to start a remote client api and do the tagging etc. operations.
    It's restrictive to have to start from an external node to operate in the deployer node but this is not specific of this use case but in generale with dataiku.

    Thanks

Setup Info
    Tags
      Help me…