Merge "Adding configuration of ZMQ Event publisher plugin"
This commit is contained in:
commit
7926373175
@ -63,6 +63,7 @@ Methods:
|
||||
- $template: $resources.yaml('InstallCFPlugin.template')
|
||||
- $.instance.agent.call($template, $resources)
|
||||
|
||||
- $.configureZMQPlugin()
|
||||
|
||||
- If: $.instance.assignFloatingIp
|
||||
Then:
|
||||
@ -92,6 +93,20 @@ Methods:
|
||||
- $.instance.agent.call($template, $resources)
|
||||
- $._environment.reporter.report($this, 'Jenkins is connected to OpenLDAP server!')
|
||||
|
||||
configureZMQPlugin:
|
||||
Body:
|
||||
- $._environment.reporter.report($this, 'Creating security group for ZMQ Event publisher')
|
||||
- $securityGroupIngress:
|
||||
- ToPort: 8888
|
||||
FromPort: 8888
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
|
||||
- $._environment.stack.push()
|
||||
- $resources: new(sys:Resources)
|
||||
- $._environment.reporter.report($this, 'Configure Jenkins ZMQ Event Publisher plugin...')
|
||||
- $template: $resources.yaml('ConfigureZMQ.template')
|
||||
- $.instance.agent.call($template, $resources)
|
||||
|
||||
destroy:
|
||||
Body:
|
||||
|
19
murano-apps/Jenkins/package/Resources/ConfigureZMQ.template
Normal file
19
murano-apps/Jenkins/package/Resources/ConfigureZMQ.template
Normal file
@ -0,0 +1,19 @@
|
||||
FormatVersion: 2.1.0
|
||||
Version: 1.0.0
|
||||
Name: Configure ZMQ
|
||||
|
||||
Body: |
|
||||
return configureZMQ().stdout
|
||||
|
||||
Scripts:
|
||||
configureZMQ:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: configure_zmq.sh
|
||||
Files:
|
||||
- 'configure_zmq/templates/org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty.xml.erb'
|
||||
- 'configure_zmq/manifests/init.pp'
|
||||
- 'configure_zmq.pp'
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -0,0 +1,5 @@
|
||||
node default {
|
||||
class { 'configure_zmq':
|
||||
zmq_port => 8888,
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# No error if already exists.
|
||||
mkdir -p /etc/puppet/modules/configure_zmq
|
||||
mkdir -p /etc/puppet/modules/configure_zmq/manifests/
|
||||
mkdir -p /etc/puppet/modules/configure_zmq/templates/
|
||||
|
||||
cp configure_zmq/manifests/init.pp /etc/puppet/modules/configure_zmq/manifests/
|
||||
cp configure_zmq/templates/org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty.xml.erb /etc/puppet/modules/configure_zmq/templates/
|
||||
|
||||
puppet apply configure_zmq.pp
|
@ -0,0 +1,16 @@
|
||||
class configure_zmq (
|
||||
$zmq_port = undef,
|
||||
) {
|
||||
service { 'jenkins':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
}
|
||||
file { '/var/lib/jenkins/org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty.xml':
|
||||
notify => Service['jenkins'],
|
||||
ensure => present,
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0644',
|
||||
content => template('configure_zmq/org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty.xml.erb'),
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty_-HudsonNotificationPropertyDescriptor plugin="zmq-event-publisher@0.0.3">
|
||||
<globallyEnabled>true</globallyEnabled>
|
||||
<port><%= zmq_port %></port>
|
||||
</org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty_-HudsonNotificationPropertyDescriptor>
|
Loading…
x
Reference in New Issue
Block a user