使用官方的docker image来学习 RabbitMQ和Python客户端的使用
参考: https://www.rabbitmq.com/tutorials/tutorial-one-python.html
启动RabbitMQ
docker run -d -P -e RABBITMQ_NODENAME=rabbit --hostname rabbit --name rabbit rabbitmq:3
#!/usr/bin/env python | |
import sys | |
import urllib2 | |
import ssl | |
import lxml | |
import lxml.html | |
CTX = ssl.create_default_context() | |
CTX.check_hostname = False | |
CTX.verify_mode = ssl.CERT_NONE |
import groovy.json.JsonBuilder | |
import org.apache.commons.httpclient.* | |
import org.apache.commons.httpclient.methods.* | |
import hudson.model.Queue.Executable | |
int WARNING_DURATION_IN_SECONDS = 100 * 2 // 6 hours | |
dashing_url="http://172.17.0.2:3030/widgets/events" | |
def busyExecutors = Jenkins.instance.computers | |
.collect { |
freeStyleJob("Hello3") { | |
logRotator(2, 30) | |
scm { | |
git('https://github.com/larrycai/docker-images.git') | |
} | |
triggers { | |
scm('H/15 * * * *') | |
} | |
wrappers { | |
preBuildCleanup() |
使用官方的docker image来学习 RabbitMQ和Python客户端的使用
参考: https://www.rabbitmq.com/tutorials/tutorial-one-python.html
启动RabbitMQ
docker run -d -P -e RABBITMQ_NODENAME=rabbit --hostname rabbit --name rabbit rabbitmq:3
FROM ubuntu:trusty | |
RUN apt-get update && apt-get install -y apache2 |
FROM ubuntu:latest | |
RUN apt-get update | |
MAINTAINER Larry Cai "larry.caiyu@gmail.com" | |
RUN apt-get install -y curl make | |
RUN curl https://get.docker.io/builds/Linux/x86_64/docker-latest -o /usr/local/bin/docker | |
RUN chmod +x /usr/local/bin/docker |
Check how to build the rpm package from existing packages
$ tar -zcvf ~/wget.tar.gz /usr/bin/wget
$ rpm -bb wget.spec
I got message like below, my questions is why line mkdir /home/larry/rpmbuild/BUILDROOT/wget-1.12-1.x86_64
is executed automatically
Since in the redhat 6.4 docker container, the folder will not be created automatically
This the sample log widget for CodingWithMe Learn Dashing Widget.
Dashing is the exceptionally handsome dashboard framework.
Using follow curl
command to update the data inside
$ curl -d '{ "auth_token": "YOUR_AUTH_TOKEN", "access": "1/0"}' http://localhost:3030/widgets/log
$ curl -d @log.json http://localhost:3030/widgets/log
jenkins-stats.py is used to generate statics for jenkins server, so far it display the plugin's usage in each job, see related stackoverflow question:how can I know whether the plugin is used by any jobs in jenkins
python-requests module is required
# Description: | |
# Interact with your Jenkins CI server | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# HUBOT_JENKINS_HOST | |
# HUBOT_JENKINS_AUTH | |
# |