acammies
2018-04-23 e0074d08c1205649d23c574bbc614bf462698c5e
commit | author | age
20d6cb 1 # Return of the Application Monitoring
43f2f2 2
20d6cb 3 > In this exercise we will create a build monitor to radiate vital build information and statistics
43f2f2 4 _____
D 5
6 ## Learning Outcomes
7 As a learner you will be able to
20d6cb 8 - Create dashboards in Jenkins to display build status
D 9
43f2f2 10
D 11 ## Tools and Frameworks
12 > Name of tool - short description and link to docs or website
13
20d6cb 14 1. [Build Monitor plugin](https://wiki.jenkins.io/display/JENKINS/Build+Monitor+Plugin) - Build Monitor Plugin provides a highly visible view of the status of selected Jenkins jobs. It easily accommodates different computer screen sizes and is ideal as an Extreme Feedback Device to be displayed on a screen on your office wall. (Inspired by the no longer maintained RadiatorView plugin).
9be9e8 15 1. [Build Fail Analyser](https://wiki.jenkins.io/display/JENKINS/Build+Failure+Analyzer) - This plugin analyses the causes of failed builds and presents the causes on the build page. It does this by using a knowledge base of build failure causes that is built up from scratch. Saving statistics about failure causes is also possible.
94cbda 16 1. [Pipeline Aggregator View](https://wiki.jenkins.io/display/JENKINS/Pipeline+Aggregator+View) - Allows the users to view the history of their pipelines with stage information (failed/In Progress/Passed) and the changes monitored)
43f2f2 17
D 18 ## Big Picture
19 This exercise begins cluster containing blah blah
20
21 _____
22
23 ## 10,000 Ft View
20d6cb 24 > The goal of this exercise is to introduce Build Monitors to radiate teams progress on Dashboards.
43f2f2 25
20d6cb 26 2. Create a new Dashboard for our Builds using the plugin above. Use Regex to add jobs to it. Use the BuildFail Analyser to add meaningful data to the reason for failures.
43f2f2 27
20d6cb 28 2. Use the pipeline views in OpenShift and Jenkins to produce dashboards that teams can use. 
43f2f2 29
D 30 ## Step by Step Instructions
31 > This is a fairly structured guide with references to exact filenames and sections of text to be added. Include pictures and code snippets where appropriate. Rule of thumb is learners are dumb.... so over describe _why_ we're doing things
32
20d6cb 33 ### Part 1 - Create a build monitor
94cbda 34 > _In this exercise we will create a new build monitor to show key information about our builds_
43f2f2 35
94cbda 36 2. On Jenkins home page; create a new view by hitting the plus icon on the home screen (should be beside the `all` above the jobs list)
20d6cb 37
94cbda 38 2. Give the job a sensible name such as `todolist-monitor` and select `Build Monitor View` 
D 39 ![new-monitor](../images/exercise6/new-monitor.png)
20d6cb 40
94cbda 41 2. On the configuration page; select `Recurse in subfolders`
D 42 ![config-recursive](../images/exercise6/config-recursive.png)
43
44 2. Check the box to use Regular Expression and set the value to be something that should scrape our apps such as `.*todolist.*` 
45 ![config-regex](../images/exercise6/config-regex.png)
46
994c1c 47 2. Finally; select `Display committers` and set the Failure Analyser to `Description`. This allows us to write regex for when fails occur in Jenkins and have the reasons plotted on the graph. For example; number of test scores or common compilation errors. 
94cbda 48 ![config-commiters](../images/exercise6/config-commiters.png)
D 49
50 2. Save your configuration to see your Build Monitor! 
51 ![](../images/exercise6/.png)
52
994c1c 53 2. Let's create another view for Jenkins using the `Pipeline Aggregator View` plugin. This view is great because it shows lots of valuable information in a clean; easy to visualise way. Create a new view called `todolist-pipelines` and select `Pipeline Aggregator View`
D 54 ![config-pipeline-view](../images/exercise6/config-pipeline-view.png)
55
56 2. On the configure page; set the regex to `todolist.*`
57 ![config-pipeline-regex](../images/exercise6/config-pipeline-regex.png)
58
59 2. Set the view to `Only display last build` for simplicity of the view.
60 ![config-pipeline-ui-settings](../images/exercise6/config-pipeline-ui-settings.png)
61
62 2. Save your configuration to see your Build Monitor! 
63 ![pipeline-monitor](../images/exercise6/pipeline-monitor.png)
94cbda 64
1c8123 65 2. Explore the Jenkins Blue Ocean view for some additional monitors and views that make Jenkins look pretty!
D 66 ![blue-ocean](../images/exercise6/blue-ocean.png)
67
94cbda 68 ### Part 2 - Seed Jenkins Dashboards
D 69 > _TODO - Add instructions for creating dashboards as part of s2i in Jenkins setup using DSL_
70
71 2. Open the s2i in `enablement-ci-cd` .....
43f2f2 72
D 73 _____
74
75 ## Extension Tasks
76 > _Ideas for go-getters. Advanced topic for doers to get on with if they finish early. These will usually not have a solution and are provided for additional scope._
77
20d6cb 78 Additional Alerting
D 79  - Add `Slack` integration to the Pipeline by setting up a WebHook to call the slack endpoint with Build Stats
80  - Add `Twillio` text integration to send you text messages when the build fails.
81 Additional Monitoring
82  - Explore the Application's FEK stack inside OpenShift
43f2f2 83
D 84 ## Additional Reading
85 > List of links or other reading that might be of use / reference for the exercise
86
87 ## Slide links
88 > link back to the deck for the supporting material