Issue with Hubot

33 views
Skip to first unread message

jer...@saasindustries.com

unread,
Nov 26, 2016, 7:13:12 AM11/26/16
to fabric8
I have started working on the ChatOps component of the platform. The default one-click install does not work so well as the UI updates do not work, so I am using a yaml from the default one provided to put in the necessary information to get it to work.

I have Hubot connected to my Slack instance.

Running hubot help shows that it is connected.

Also, when a jenkins build job starts, hubot announces in my #devops_app channel that the kubernetes pod worker has been launched, and also that it has terminated after the build happens.

However, that is all the functionality I am getting out of Hubot for Devops.

I am actually getting an error which is output as part of the build process:

[Pipeline] hubotApprove
Hubot sending to room fabric8_default => Version 1.0.14 has now been deployed to the Staging environment at:
/kubernetes/pods?environment=Staging
Would you like to promote version 1.0.14 to the Production namespace?
to Proceed reply: fabric8 jenkins proceed job ms-app build 14
to Abort reply: fabric8 jenkins abort job ms-app build 14
No service hubot is running!!!
No service found!
[Pipeline] approveRequestedEvent


There are a couple of problems with this error:

  1. It should not be attempting to send the room "fabric8_default" because I changed the yaml to support everything with the "#devops" prefix. I did go and create a "#fabric8_default" channel just in case though, but there is no output. As I mentioned in this message above, I have #devops_app which is the namespace that I am getting pod creation notices.
  2. I also have a "devops_staging" and a "devops_production" channels setup as I am not sure where additional messages will go, but nothing is being sent.
  3. It is indicating there is no service hubot running, but it is running and working for announcing the kubernetes worker pods are being created.

Here is my YAML definition:

---
apiVersion
: "v1"
kind
: "List"
items
:
- apiVersion: "v1"
 kind
: "Service"
 metadata
:
 annotations
:
 fabric8
.io/app-menu: "development"
 fabric8
.io/git-commit: "0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/hubot-slack/src/main/fabric8/icon.png"
 fabric8
.io/git-branch: "release-v2.2.297"
 fabric8
.io/build-id: "4"
 fabric8
.io/git-url: "http://gogs.ux.fabric8.io/gogsadmin/oss-parent/commit/0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/build-url: "http://jenkins.ux.fabric8.io/job/oss-parent/4"
 finalizers
: []
 labels
:
 provider
: "fabric8"
 expose
: "true"
 project
: "hubot-slack"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 name
: "hubot"
 ownerReferences
: []
 spec
:
 deprecatedPublicIPs
: []
 externalIPs
: []
 loadBalancerSourceRanges
: []
 ports
:
 
- port: 80
 targetPort
: 8080
 selector
:
 name
: "hubot-slack"
 project
: "hubot-slack"
 provider
: "fabric8"
 
group: "io.fabric8.devops.apps"
- apiVersion: "v1"
 kind
: "Service"
 metadata
:
 annotations
:
 fabric8
.io/git-commit: "0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/hubot-notifier/src/main/fabric8/icon.png"
 fabric8
.io/git-branch: "release-v2.2.297"
 fabric8
.io/build-id: "4"
 fabric8
.io/git-url: "http://gogs.ux.fabric8.io/gogsadmin/oss-parent/commit/0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/build-url: "http://jenkins.ux.fabric8.io/job/oss-parent/4"
 finalizers
: []
 labels
:
 provider
: "fabric8"
 project
: "hubot-notifier"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 name
: "hubot-notifier"
 ownerReferences
: []
 spec
:
 deprecatedPublicIPs
: []
 externalIPs
: []
 loadBalancerSourceRanges
: []
 ports
:
 
- name: "jolokia"
 port
: 8778
 protocol
: "TCP"
 targetPort
: 8778
 selector
:
 project
: "hubot-notifier"
 provider
: "fabric8"
 
group: "io.fabric8.devops.apps"
 type
: "LoadBalancer"
- apiVersion: "v1"
 kind
: "ConfigMap"
 metadata
:
 annotations
:
 fabric8
.hubot-notifier/summary: "Watches the OpenShift environment and notifies\
 \ Hubot of events such as builds completing or failing"

 description
: "Watches the OpenShift environment and notifies Hubot of events\
 \ such as builds completing or failing."

 fabric8
.hubot-notifier/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/hubot-notifier/src/main/fabric8/icon.png"
 fabric8
.io/json-schema: "{\n \"type\" : \"object\",\n \"properties\" : {\n\
 \ \"HUBOT_USERNAME\" : {\n \"type\" : \"string\",\n \"description\"\
 \ : \"The username for Hubot to login to the chat service\",\n \"default\"\
 \ : \"hubot\"\n },\n \"KUBERNETES_DNS_DOMAIN\" : {\n \"type\"\
 \ : \"string\",\n \"description\" : \"The DNS domain added to the serviceName.namespace.svc.\
 \ to make the DNS name\",\n \"default\" : \"cluster.local\"\n },\n\
 \ \"HUBOT_PASSWORD\" : {\n \"type\" : \"string\",\n \"description\"\
 \ : \"The password for Hubot to login to the chat service\",\n \"default\"\
 \ : \"RedHat$1\"\n }\n }\n}"

 finalizers
: []
 labels
:
 provider
: "fabric8"
 project
: "hubot-notifier"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 name
: "hubot-notifier"
 ownerReferences
: []
 data
:
 hubot
-password: "RedHat$1"
 kubernetes
-dns-domain: "cluster.local"
 hubot
-username: "hubot"
- apiVersion: "v1"
 kind
: "ConfigMap"
 metadata
:
 annotations
:
 fabric8
.io/json-schema: "{\n \"type\" : \"object\",\n \"properties\" : {\n\
 \ \"HUBOT_SLACK_GRAFANA_HOST\" : {\n \"type\" : \"string\",\n \
 \ \"description\" : \"Host for your Grafana 2.0 install, e.g. 'http://play.grafana.org'\"\
 ,\n \"default\" : \"http://grafana\"\n },\n\
 \ \"HUBOT_SLACK_GRAFANA_API_KEY\" : {\n \"type\" : \"string\",\n \
 \ \"description\" : \"API key for a particular user\"\n },\n \"\
 HUBOT_JENKINS_URL\" : {\n \"type\" : \"string\",\n \"description\"\
 \ : \"The URL for the Jenkins CI server\",\n \"default\" : \"http://jenkins\"\
 \n },\n \"HUBOT_SLACK_TOKEN\" : {\n \"type\" : \"string\",\n \
 \ \"description\" : \"The token for Hubot to login to Slack\"\n }\n\
 \ }\n}"

 finalizers
: []
 labels
:
 name
: "hubot-slack"
 provider
: "fabric8"
 project
: "hubot-slack"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 name
: "hubot-slack"
 ownerReferences
: []
 data
:
 hubot
-jenkins-url: "http://jenkins/"
 hubot
-grafana-host: "http://grafana/"
 hubot
-slack-token: "*****************************"
 hubot
-grafana-api-key: ""
- apiVersion: "extensions/v1beta1"
 kind
: "Deployment"
 metadata
:
 annotations
:
 fabric8
.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/hubot-notifier/src/main/fabric8/icon.png"
 fabric8
.io/git-commit: "0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/metrics-path: "dashboard/file/kubernetes-pods.json/?var-project=hubot-notifier&var-version=2.2.297"
 fabric8
.io/build-id: "4"
 fabric8
.io/build-url: "http://jenkins.ux.fabric8.io/job/oss-parent/4"
 fabric8
.io/git-branch: "release-v2.2.297"
 fabric8
.io/git-url: "http://gogs.ux.fabric8.io/gogsadmin/oss-parent/commit/0958d61020835b9707536cc0525344fc30a764dd"
 finalizers
: []
 labels
:
 provider
: "fabric8"
 project
: "hubot-notifier"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 name
: "hubot-notifier"
 ownerReferences
: []
 spec
:
 replicas
: 1
 selector
:
 matchExpressions
: []
 matchLabels
:
 provider
: "fabric8"
 project
: "hubot-notifier"
 
group: "io.fabric8.devops.apps"
 
template:
 metadata
:
 annotations
:
 fabric8
.io/git-commit: "0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/metrics-path: "dashboard/file/kubernetes-pods.json/?var-project=hubot-notifier&var-version=2.2.297"
 fabric8
.io/build-id: "4"
 fabric8
.io/build-url: "http://jenkins.ux.fabric8.io/job/oss-parent/4"
 fabric8
.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/hubot-notifier/src/main/fabric8/icon.png"
 fabric8
.io/git-branch: "release-v2.2.297"
 fabric8
.io/git-url: "http://gogs.ux.fabric8.io/gogsadmin/oss-parent/commit/0958d61020835b9707536cc0525344fc30a764dd"
 finalizers
: []
 labels
:
 provider
: "fabric8"
 project
: "hubot-notifier"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 ownerReferences
: []
 spec
:
 containers
:
 
- args: []
 command
: []
 env
:
 
- name: "HUBOT_KUBERNETES_ROOM"
 value
: "#devops_${namespace}"
 
- name: "HUBOT_USERNAME"
 valueFrom
:
 configMapKeyRef
:
 key
: "hubot-username"
 name
: "hubot-notifier"
 
- name: "HUBOT_PASSWORD"
 valueFrom
:
 configMapKeyRef
:
 key
: "hubot-password"
 name
: "hubot-notifier"
 
- name: "KUBERNETES_NAMESPACE"
 valueFrom
:
 fieldRef
:
 fieldPath
: "metadata.namespace"
 
- name: "HUBOT_BUILD_ROOM"
 value
: "#devops_${namespace}"
 image
: "fabric8/hubot-notifier:2.2.297"
 imagePullPolicy
: "IfNotPresent"
 name
: "hubot-notifier"
 ports
:
 
- containerPort: 8778
 name
: "jolokia"
 resources
:
 limits
:
 cpu
: "0"
 memory
: "0"
 requests
:
 cpu
: "0"
 memory
: "0"
 securityContext
:
 privileged
: false
 volumeMounts
: []
 imagePullSecrets
: []
 nodeSelector
: {}
 serviceAccountName
: "fabric8"
 volumes
: []
- apiVersion: "extensions/v1beta1"
 kind
: "Deployment"
 metadata
:
 annotations
:
 fabric8
.io/git-commit: "0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/metrics-path: "dashboard/file/kubernetes-pods.json/?var-project=hubot-slack&var-version=2.2.297"
 fabric8
.io/build-id: "4"
 fabric8
.io/build-url: "http://jenkins.ux.fabric8.io/job/oss-parent/4"
 fabric8
.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/hubot-slack/src/main/fabric8/icon.png"
 fabric8
.io/git-branch: "release-v2.2.297"
 fabric8
.io/git-url: "http://gogs.ux.fabric8.io/gogsadmin/oss-parent/commit/0958d61020835b9707536cc0525344fc30a764dd"
 finalizers
: []
 labels
:
 name
: "hubot-slack"
 provider
: "fabric8"
 project
: "hubot-slack"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 name
: "hubot-slack"
 ownerReferences
: []
 spec
:
 replicas
: 1
 selector
:
 matchExpressions
: []
 matchLabels
:
 name
: "hubot-slack"
 project
: "hubot-slack"
 provider
: "fabric8"
 
group: "io.fabric8.devops.apps"
 
template:
 metadata
:
 annotations
:
 fabric8
.io/git-commit: "0958d61020835b9707536cc0525344fc30a764dd"
 fabric8
.io/metrics-path: "dashboard/file/kubernetes-pods.json/?var-project=hubot-slack&var-version=2.2.297"
 fabric8
.io/build-id: "4"
 fabric8
.io/build-url: "http://jenkins.ux.fabric8.io/job/oss-parent/4"
 fabric8
.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/hubot-slack/src/main/fabric8/icon.png"
 fabric8
.io/git-branch: "release-v2.2.297"
 fabric8
.io/git-url: "http://gogs.ux.fabric8.io/gogsadmin/oss-parent/commit/0958d61020835b9707536cc0525344fc30a764dd"
 finalizers
: []
 labels
:
 name
: "hubot-slack"
 provider
: "fabric8"
 project
: "hubot-slack"
 version
: "2.2.297"
 
group: "io.fabric8.devops.apps"
 name
: "hubot-slack"
 ownerReferences
: []
 spec
:
 containers
:
 
- args: []
 command
: []
 env
:
 
- name: "HUBOT_GRAFANA_API_KEY"
 valueFrom
:
 configMapKeyRef
:
 key
: "hubot-grafana-api-key"
 name
: "hubot-slack"
 
- name: "HUBOT_SLACK_TOKEN"
 valueFrom
:
 configMapKeyRef
:
 key
: "hubot-slack-token"
 name
: "hubot-slack"
 
- name: "HUBOT_GRAFANA_HOST"
 valueFrom
:
 configMapKeyRef
:
 key
: "hubot-grafana-host"
 name
: "hubot-slack"
 
- name: "HUBOT_JENKINS_URL"
 valueFrom
:
 configMapKeyRef
:
 key
: "hubot-jenkins-url"
 name
: "hubot-slack"
 image
: "fabric8/hubot-slack:2.2.297"
 name
: "hubot-slack"
 ports
:
 
- containerPort: 8080
 name
: "http"
 protocol
: "TCP"
 volumeMounts
: []
 imagePullSecrets
: []
 nodeSelector
: {}
 volumes
: []

jer...@saasindustries.com

unread,
Nov 26, 2016, 8:30:17 AM11/26/16
to fabric8
Just a follow up, seems like Hubot is working very well for reporting what Kubernetes is doing. I went and started installing other runtimes, removing service accounts, cleaning up failed installs of runtimes and etc - and Hubot announced everything just fine.

Its just that Hubot is not reporting anything that really matter for DevOps as for as the Jenkins builds and etc, approval and etc.

Maybe I am missing a configuration or something?
Reply all
Reply to author
Forward
0 new messages