Skip to content

Production Deployment

To deploy to production please got to the Bitbucket DPS Pipelines and click "Run Pipeline", pick the branch you wish to deploy (usually development or an rc-YYYY) then select the pipeline you would like to run. The 2 main pipelines are custom: prod-segmenter and custom: prod-visscore.

Both services deploy in a similar way. First the pipelines will build an "artifact", which then gets copied (rysnc) to Positive Internet, and finally the "deployment script" runs. This script makes sure each box gets the latest copy of the code and waits for success until moving on to the next box. If you check the pipelines and click the 3rd step "Run positive deployment script", and scroll to the bottom you should get a summar similar to this output:

PLAY RECAP *********************************************************************

cubed-[service-name]-a          : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

cubed-[service-name]-b          : ok=4    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

Note

It is possible to have a successful pipeline (all green), but there be a failed=1 in this output. If that has happened you will want to contact Positive Internet and provide them with the output from this pipeline's log. Chances are it couldnt connect to the server, or something has gone wrong while running the playbook on their system.

Segmenter

Once deployed you can check in grafana and see that we're still processing and inserting.

Prediction

Once deployed you can check in grafana and see that we're still processing and inserting.

Post Deploy Checks

Once the deploys have finished and you can see if we're getting hits for both Segments/Advanced Patterns and Predictions by running the following queries:

-- check Prediction is still running
select max(a.updated) from attrib_visit_propensity a;

-- check Segments are still being processed
select max(a.updated) from segmenter_visitor a;

-- check Advanced Patterns are still running
select max(a.updated) from segmenter_pattern_visit a;

Each of these should return a datetime stamp that is post deploy and very close to "now".

Note

All accounts have Propensity being calculated, but not all accounts will have Segments and/or Advanced Patterns setup. This means you're not gauranteed to get a value back from the bottom 2 queries.