O'Reilly logo

The DevOps 2.2 Toolkit by Viktor Farcic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating scaling job

Let's try to translate the commands we executed manually into a Jenkins job. If we manage to do that, we can go further and let Alertmanager trigger that job whenever certain thresholds are reached in Prometheus.

We'll start by downloading Jenkins stack from the vfarcic/docker-flow-monitor (https://github.com/vfarcic/docker-flow-monitor) repository.

curl -o jenkins.yml \    https://raw.githubusercontent.com/vfarcic/docker-\flow-monitor/master/stacks/jenkins-aws-secret.ymlcat jenkins.yml

The stack definition we just downloaded is almost identical to the one we used before so we'll comment only the differences.

version: "3.2"services:  ...  agent:    image: vfarcic/jenkins-swarm-agent    ...    secrets:      - aws      ...secrets:  aws:    external: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required