brpm_content_framework 0.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +38 -0
  3. data/.travis.yml +17 -0
  4. data/Gemfile +3 -0
  5. data/LICENSE +21 -0
  6. data/README.md +308 -0
  7. data/Rakefile +23 -0
  8. data/TO_BE_MIGRATED.txt +9 -0
  9. data/architecture.png +0 -0
  10. data/automations/direct_execute.meta +10 -0
  11. data/automations/direct_execute.rb +10 -0
  12. data/automations/install_module.meta +10 -0
  13. data/automations/install_module.rb +13 -0
  14. data/bin/brpm_install +30 -0
  15. data/bin/brpm_uninstall +30 -0
  16. data/bin/event_handler +63 -0
  17. data/bin/webhook_receiver +49 -0
  18. data/brpm_content.gemspec +31 -0
  19. data/config.yml +8 -0
  20. data/infrastructure/.bashrc +6 -0
  21. data/infrastructure/.brpm +2 -0
  22. data/infrastructure/config/customer_include.rb +26 -0
  23. data/infrastructure/config/server.yml +3 -0
  24. data/infrastructure/log.html +39 -0
  25. data/infrastructure/scripts/backup_database.sh +19 -0
  26. data/infrastructure/scripts/ddns.sh +10 -0
  27. data/infrastructure/scripts/install_brpm.sh +63 -0
  28. data/infrastructure/scripts/maintenance.sh +4 -0
  29. data/infrastructure/scripts/patch_brpm.sh +90 -0
  30. data/infrastructure/scripts/restore_database.sh +33 -0
  31. data/infrastructure/scripts/run_event_handler.cmd +19 -0
  32. data/infrastructure/scripts/run_event_handler.sh +20 -0
  33. data/infrastructure/scripts/run_webhook_receiver.cmd +15 -0
  34. data/infrastructure/scripts/run_webhook_receiver.sh +15 -0
  35. data/infrastructure/silent_install_options_4.6.txt +93 -0
  36. data/infrastructure/silent_install_options_upgrade_4.6.txt +92 -0
  37. data/infrastructure/smtp_settings.rb +42 -0
  38. data/lib/brpm_auto.rb +358 -0
  39. data/lib/brpm_script_executor.rb +80 -0
  40. data/lib/logging/brpm_logger.rb +39 -0
  41. data/lib/logging/logger_base.rb +36 -0
  42. data/lib/logging/simple_logger.rb +27 -0
  43. data/lib/module_installer.rb +483 -0
  44. data/lib/params/all_params.rb +80 -0
  45. data/lib/params/integration_settings.rb +27 -0
  46. data/lib/params/params.rb +174 -0
  47. data/lib/params/params_base.rb +81 -0
  48. data/lib/params/request_params.rb +38 -0
  49. data/lib/rest_api.rb +155 -0
  50. data/lib/semaphore.rb +79 -0
  51. data/lib/utilities.rb +317 -0
  52. data/lib/version_control/git.rb +192 -0
  53. data/lib/version_control/svn.rb +221 -0
  54. data/lib/write_to.rb +1 -0
  55. data/tests/all_params_spec.rb +116 -0
  56. data/tests/brpm_auto_spec.rb +84 -0
  57. data/tests/customer_include/config/customer_include.rb +10 -0
  58. data/tests/customer_include/config/server.yml +3 -0
  59. data/tests/customer_include_spec.rb +29 -0
  60. data/tests/gemspec_spec.rb +11 -0
  61. data/tests/module_installer_spec.rb +46 -0
  62. data/tests/params_spec.rb +172 -0
  63. data/tests/request_params_spec.rb +86 -0
  64. data/tests/server_yaml_spec.rb +19 -0
  65. data/tests/spec_helper.rb +64 -0
  66. data/to_be_migrated/brpm_framework.rb +88 -0
  67. data/to_be_migrated/customer_include_default.rb +25 -0
  68. data/to_be_migrated/local_jirb.rb +15 -0
  69. data/to_be_migrated/resource_framework.rb +211 -0
  70. data/transport/dispatch_baa.rb +355 -0
  71. data/transport/dispatch_base.rb +345 -0
  72. data/transport/dispatch_nsh.rb +248 -0
  73. data/transport/dispatch_ssh.rb +154 -0
  74. data/transport/transport_baa.rb +1095 -0
  75. data/transport/transport_nsh.rb +359 -0
  76. data/transport/transport_ssh.rb +220 -0
  77. metadata +204 -0
@@ -0,0 +1,31 @@
1
+ require "yaml"
2
+
3
+ config = YAML.load_file(File.join(File.dirname(__FILE__), "config.yml"))
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = File.basename(File.expand_path(File.dirname(__FILE__)))
7
+ spec.version = config["version"]
8
+ spec.platform = Gem::Platform::RUBY
9
+ spec.license = config["license"]
10
+ spec.authors = [config["author"]]
11
+ spec.email = config["email"]
12
+ spec.homepage = config["homepage"]
13
+ spec.summary = config["summary"]
14
+ spec.description = config["description"]
15
+
16
+ spec.required_rubygems_version = "2.1.9"
17
+
18
+ spec.add_runtime_dependency "rest-client"
19
+ spec.add_runtime_dependency "json"
20
+ spec.add_runtime_dependency "savon", '~>1.1.0'
21
+ spec.add_runtime_dependency 'capistrano', '2.15.5'
22
+
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rspec"
25
+
26
+ spec.files = `git ls-files`.split("\n")
27
+ spec.require_path = 'lib'
28
+
29
+ spec.executables = spec.files.grep(%r{^modules/framework/bin/}).map{ |f| File.basename(f) }
30
+ spec.bindir = "bin"
31
+ end
data/config.yml ADDED
@@ -0,0 +1,8 @@
1
+ version: 0.1.55
2
+
3
+ author: Niek Bartholomeus
4
+ email: niek.bartholomeus@gmail.com
5
+ homepage: https://github.com/BMC-RLM/brpm_content
6
+ license: MIT
7
+ summary: BRPM Content Framework
8
+ description: The BRPM Content Framework is a lightweight framework that allows to run automation logic on top of BRPM in a modular, re-usable, testable and developer-friendly way
@@ -0,0 +1,6 @@
1
+ export BRPM_HOME=/opt/bmc/RLM
2
+ export JAVA_HOME="$BRPM_HOME/lib/jre"
3
+ export JRUBY_HOME="$BRPM_HOME/lib/jruby"
4
+ export GEM_HOME=${BRPM_CONTENT_HOME:-$BRPM_HOME/modules}
5
+
6
+ export PATH="$GEM_HOME/bin:$JRUBY_HOME/bin:$PATH"
@@ -0,0 +1,2 @@
1
+ brpm_url: http://brpm-server:8088/brpm
2
+ brpm_api_token: ...
@@ -0,0 +1,26 @@
1
+ # This file should be located in BRPM_HOME/config
2
+ # See the README for more information on how to use this file
3
+
4
+ def get_customer_include_params
5
+ params = {}
6
+ # Hostname so nsh paths can be constructed from local paths
7
+ params["BAA_RPM_HOSTNAME"] = "localhost"
8
+ # set your own automation token
9
+ params["Token"] = "???"
10
+ # Hostname so nsh paths can be constructed from local paths
11
+ params["BAA_RPM_HOSTNAME"] = "localhost"
12
+ # Change this to set BAA base path
13
+ params["BAA_BASE_PATH"] = "/opt/bmc/bladelogic"
14
+ # This is the root path for use in BAA/BSA
15
+ params["BAA_BASE_GROUP"] = "BRPM"
16
+ # The location and name of the standard NSH script for script execution
17
+ params["BAA_FRAMEWORK_NSH_SCRIPT"] = "/BRPM/NSHScripts/FrameworkScriptExecute"
18
+ # Place your own global constants
19
+ params["DATA_CENTER_NAMES"] = ["HOU", "LEX", "PUNE"]
20
+
21
+ params
22
+ end
23
+
24
+ def my_custom_method(a, b)
25
+ a + b
26
+ end
@@ -0,0 +1,3 @@
1
+ # This file should be located in BRPM_HOME/config
2
+ # See the README for more information on how to use this file
3
+ my_parameter: "abc"
@@ -0,0 +1,39 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
5
+ <script type="text/javascript">
6
+
7
+ $(document).ready(function() {
8
+
9
+ function getURLParameter(name) {
10
+ return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
11
+ }
12
+
13
+ function functionToLoadFile(){
14
+ jQuery.get('/brpm/automation_results/' + getURLParameter('request') + '.log', function(data) {
15
+ mustScroll = false;
16
+
17
+ if($(window).scrollTop() + $(window).height() == $(document).height()){
18
+ mustScroll = true;
19
+ }
20
+
21
+ $('#text-file-container').html(data);
22
+
23
+ if(mustScroll){
24
+ window.scrollTo(0,document.body.scrollHeight);
25
+ }
26
+
27
+ setTimeout(functionToLoadFile, 2000);
28
+ });
29
+ }
30
+
31
+ setTimeout(functionToLoadFile, 10);
32
+ });
33
+
34
+ </script>
35
+ </head>
36
+ <body>
37
+ <pre id="text-file-container"></pre>
38
+ </body>
39
+ </html>
@@ -0,0 +1,19 @@
1
+ #! /bin/bash
2
+
3
+ if [ -z "$BRPM_HOME" ]; then
4
+ echo "BRPM_HOME is not set (e.g. /opt/bmc/RLM). Aborting the backup."
5
+ exit 1
6
+ fi
7
+
8
+ BRPM_DB_NAME=bmc_rpm_db
9
+ BRPM_DB_USER=rlm_user
10
+
11
+ if [ ! -d "/root/database_backups" ]; then
12
+ mkdir -p /root/database_backups
13
+ fi
14
+
15
+ DATE=$(date +"%Y%m%d%H%M")
16
+ echo "Backing up database to /root/database_backups/brpm_database_dump_$DATE.sql..."
17
+ $BRPM_HOME/pgsql/bin/pg_dump -U $BRPM_DB_USER $BRPM_DB_NAME -f /root/database_backups/brpm_database_dump_$DATE.sql
18
+
19
+ echo "Done."
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ wget https://freedns.afraid.org/scripts/afraid.aws.sh.txt
3
+ read -p "Press [enter] to open afraid.aws.sh.txt -> modify GET to curl and insert the token for the new dns name (see http://freedns.afraid.org/dynamic/)..."
4
+ nano afraid.aws.sh.txt
5
+ mv afraid.aws.sh.txt /etc/cron.d/afraid.aws.sh
6
+ chmod 500 /etc/cron.d/afraid.aws.sh
7
+ sudo chown root.root /etc/cron.d/afraid.aws.sh
8
+ echo "*/2 * * * * root /etc/cron.d/afraid.aws.sh >/dev/null 2>&1" >> /etc/crontab
9
+ read -p "What is the dns name?" dnsname
10
+ sed -c -i "s/\(HOSTNAME *= *\).*/\1$dnsname/" /etc/sysconfig/network
@@ -0,0 +1,63 @@
1
+ #!/bin/bash
2
+ service iptables stop
3
+ chkconfig iptables off
4
+ yum update -y
5
+ yum install -y git wget nano curl unzip
6
+
7
+ read -p "What is the location of the RLM package? (either ftp link or local file system)" LOCATION
8
+
9
+ if [ -z "$LOCATION" ]; then
10
+ echo "The location was not specified. Aborting the installation."
11
+ exit 1
12
+ fi
13
+
14
+ if [[ "$LOCATION" == ftp://* ]]; then
15
+ wget -O ./RLM.zip $LOCATION
16
+ LOCATION=./RLM.zip
17
+ fi
18
+
19
+ if [ ! -f "$LOCATION" ]; then
20
+ echo "The specified location is not a patch file. Aborting the installation."
21
+ exit 1
22
+ fi
23
+
24
+ unzip $LOCATION
25
+ cd BRLM/Disk1/
26
+
27
+ read -p "What is the location of the silent install file?" SILENT_INSTALL_FILE_LOCATION
28
+
29
+ if [ ! -f "$SILENT_INSTALL_FILE_LOCATION" ]; then
30
+ echo "The silent install file was not found. Aborting the installation."
31
+ exit 1
32
+ fi
33
+
34
+ BRPM_HOME=$(eval "sed -n \"s/-P installLocation=\(.*\)/\1/p\" $SILENT_INSTALL_FILE_LOCATION")
35
+ if [ -z "$BRPM_HOME" ]; then
36
+ echo "The specified location is not a silent install file. Aborting the installation."
37
+ exit 1
38
+ fi
39
+
40
+ chmod +x setup.sh
41
+ ./setup.sh -i silent -DOPTIONS_FILE=$SILENT_INSTALL_FILE_LOCATION
42
+
43
+ read -p "What is the public hostname? [$(hostname)]" EXTERNAL_HOSTNAME
44
+ CURRENT_HOSTNAME=$(hostname)
45
+ BRPM_HOSTNAME=${EXTERNAL_HOSTNAME:-$CURRENT_HOSTNAME}
46
+
47
+ echo "Stopping BRPM..."
48
+ /etc/init.d/bmcrpm-4.6.00 stop
49
+
50
+ echo "Replacing the hostname to the public hostname in torquebox.yml ..."
51
+ CURRENT_VERSION=$(eval "sed -n \"s= root: $BRPM_HOME/releases/\(.*\)/RPM=\1=p\" $BRPM_HOME/server/jboss/standalone/deployments/RPM-knob.yml")
52
+ DEFAULT_HOSTNAME=$(eval "sed -n \"s= host: \(.*\)=\1=p\" $BRPM_HOME/releases/$CURRENT_VERSION/RPM/config/torquebox.yml")
53
+ sed -i -e s/$DEFAULT_HOSTNAME/$BRPM_HOSTNAME/g $BRPM_HOME/releases/$CURRENT_VERSION/RPM/config/torquebox.yml
54
+
55
+ echo "Restarting BRPM..."
56
+ /etc/init.d/bmcrpm-4.6.00 start
57
+
58
+ echo "Done."
59
+
60
+ echo "Make sure that the BRPM and stomp ports are open."
61
+
62
+
63
+
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ service bmcrpm-4.6.00 start
3
+ tail -F $BRPM_HOME/server/jboss/standalone/log/server.log
4
+ service bmcrpm-4.6.00 stop
@@ -0,0 +1,90 @@
1
+ #!/bin/bash
2
+
3
+ USAGE="patch_brpm.sh <new version> <location (ftp or local file system)>"
4
+
5
+ NEW_VERSION=$1
6
+ LOCATION=$2
7
+
8
+ if [ -z "$BRPM_HOME" ]; then
9
+ echo "BRPM_HOME is not set (e.g. /opt/bmc/RLM). Aborting the patch installation."
10
+ exit 1
11
+ fi
12
+
13
+ if [ -z "$NEW_VERSION" ]; then
14
+ echo "New version is not specified. Aborting the patch installation."
15
+ echo "Usage: $USAGE"
16
+ exit 1
17
+ fi
18
+
19
+ if [ -z "$LOCATION" ]; then
20
+ echo "The location was not specified. Aborting the installation."
21
+ echo "Usage: $USAGE"
22
+ exit 1
23
+ fi
24
+
25
+ if [[ "$LOCATION" == ftp://* ]]; then
26
+ wget -O brpm.war $LOCATION
27
+ LOCATION=brpm.war
28
+ fi
29
+
30
+ if [ ! -f "$LOCATION" ]; then
31
+ echo "The specified location is not a file. Aborting the installation."
32
+ exit 1
33
+ fi
34
+
35
+ if [ -f ~/shell_scripts/backup_database.sh ]; then
36
+ echo "Found ~/shell_scripts/backup_database.sh so taking a database backup first..."
37
+ ~/shell_scripts/backup_database.sh
38
+ echo ""
39
+ fi
40
+
41
+ echo "Stopping BRPM..."
42
+ /etc/init.d/bmcrpm-4.6.00 stop
43
+
44
+ OLD_VERSION=$(eval "sed -n \"s= root: $BRPM_HOME/releases/\(.*\)/RPM=\1=p\" $BRPM_HOME/server/jboss/standalone/deployments/RPM-knob.yml")
45
+
46
+ echo "Migrating BRPM from version $OLD_VERSION to version $NEW_VERSION... "
47
+
48
+ echo "Installing the war file ..."
49
+ mkdir -p $BRPM_HOME/releases/$NEW_VERSION/RPM
50
+ mv $LOCATION $BRPM_HOME/releases/$NEW_VERSION/RPM
51
+ cd $BRPM_HOME/releases/$NEW_VERSION/RPM
52
+ unzip -d $BRPM_HOME/releases/$NEW_VERSION/RPM $BRPM_HOME/releases/$NEW_VERSION/RPM/brpm.war
53
+
54
+ echo "Copying over the config files from $BRPM_HOME/releases/$OLD_VERSION/RPM/config ..."
55
+ /bin/cp $BRPM_HOME/releases/$OLD_VERSION/RPM/config/database.yml $BRPM_HOME/releases/$NEW_VERSION/RPM/config
56
+ /bin/cp $BRPM_HOME/releases/$OLD_VERSION/RPM/config/automation_settings.rb $BRPM_HOME/releases/$NEW_VERSION/RPM/config
57
+ /bin/cp $BRPM_HOME/releases/$OLD_VERSION/RPM/config/smtp_settings.rb $BRPM_HOME/releases/$NEW_VERSION/RPM/config
58
+ /bin/cp $BRPM_HOME/releases/$OLD_VERSION/RPM/config/wicked_pdf_config.rb $BRPM_HOME/releases/$NEW_VERSION/RPM/config
59
+ /bin/cp $BRPM_HOME/releases/$OLD_VERSION/RPM/config/carrierwave_settings.rb $BRPM_HOME/releases/$NEW_VERSION/RPM/config
60
+
61
+ if [ -d $BRPM_HOME/releases/$OLD_VERSION/RPM/lib/script_support/git_repos ]; then
62
+ /bin/cp -R $BRPM_HOME/releases/$OLD_VERSION/RPM/lib/script_support/git_repos $BRPM_HOME/releases/$NEW_VERSION/RPM/lib/script_support
63
+ fi
64
+
65
+ echo "Replacing the version number in RPM-knob.yml ..."
66
+ sed -i -e s/$OLD_VERSION/$NEW_VERSION/g $BRPM_HOME/server/jboss/standalone/deployments/RPM-knob.yml
67
+
68
+ echo "Replacing the hostname to the public hostname in torquebox.yml ..."
69
+ PREVIOUS_HOSTNAME=$(eval "sed -n \"s= host: \(.*\)=\1=p\" $BRPM_HOME/releases/$OLD_VERSION/RPM/config/torquebox.yml")
70
+ DEFAULT_HOSTNAME=$(eval "sed -n \"s= host: \(.*\)=\1=p\" $BRPM_HOME/releases/$NEW_VERSION/RPM/config/torquebox.yml")
71
+ sed -i -e s/$DEFAULT_HOSTNAME/$PREVIOUS_HOSTNAME/g $BRPM_HOME/releases/$NEW_VERSION/RPM/config/torquebox.yml
72
+
73
+ . $BRPM_HOME/bin/setenv.sh
74
+ cd $BRPM_HOME/releases/$NEW_VERSION/RPM/config
75
+
76
+ echo "Updating gems..."
77
+ jruby -S bundle install
78
+
79
+ echo "Migrating the database..."
80
+ jruby -S rake --verbose db:migrate RAILS_ENV=production
81
+
82
+ echo "Patch $NEW_VERSION was applied successfully."
83
+ echo "Note that any customizations that may have been done to the torquebox.yml file must be redone manually: $BRPM_HOME/releases/$NEW_VERSION/RPM/config/torquebox.yml"
84
+
85
+ echo "Restarting BRPM..."
86
+ /etc/init.d/bmcrpm-4.6.00 start
87
+
88
+ echo "Done."
89
+
90
+
@@ -0,0 +1,33 @@
1
+ #! /bin/bash
2
+
3
+ if [ -z "$BRPM_HOME" ]; then
4
+ echo "BRPM_HOME is not set (e.g. /opt/bmc/RLM). Aborting the restore."
5
+ exit 1
6
+ fi
7
+
8
+ DUMP_FILE=$1
9
+
10
+ if [ -z "$DUMP_FILE" ]; then
11
+ echo "DUMP_FILE is not specified. Aborting the restore."
12
+ exit 1
13
+ fi
14
+
15
+ BRPM_DB_NAME=bmc_rpm_db
16
+ BRPM_DB_USER=rlm_user
17
+
18
+ echo "Stopping BRPM..."
19
+ /etc/init.d/bmcrpm-4.6.00 stop
20
+
21
+ echo "Dropping existing database $BRPM_DB_NAME..."
22
+ $BRPM_HOME/pgsql/bin/dropdb -U $BRPM_DB_USER $BRPM_DB_NAME
23
+
24
+ echo "Creating database $BRPM_DB_NAME..."
25
+ $BRPM_HOME/pgsql/bin/createdb -O $BRPM_DB_USER -E UTF8 -U $BRPM_DB_USER $BRPM_DB_NAME
26
+
27
+ echo "Restoring database from /root/database_backups/brpm_database_dump_$DATE.sql to $BRPM_DB_NAME..."
28
+ $BRPM_HOME/pgsql/bin/psql -U $BRPM_DB_USER -d $BRPM_DB_NAME -f $DUMP_FILE
29
+
30
+ echo "Restarting BRPM..."
31
+ /etc/init.d/bmcrpm-4.6.00 start
32
+
33
+ echo "Done."
@@ -0,0 +1,19 @@
1
+ rem mandatory settings
2
+ set EVENT_HANDLER_BRPM_HOST=localhost
3
+
4
+ set EVENT_HANDLER_MESSAGING_PORT=5445
5
+ set EVENT_HANDLER_MESSAGING_USERNAME=msguser
6
+ set EVENT_HANDLER_MESSAGING_PASSWORD=???
7
+ set EVENT_HANDLER_LOG_FILE=c:/tmp/event_handler.log
8
+ set EVENT_HANDLER_PROCESS_EVENT_SCRIPT=integrations/brpm/process_event_handler_event.rb
9
+
10
+ # custom settings
11
+ set EVENT_HANDLER_BRPM_PORT=8088
12
+ set EVENT_HANDLER_BRPM_TOKEN= ???
13
+
14
+ set EVENT_HANDLER_JIRA_URL=http://jira-server:9090
15
+ set EVENT_HANDLER_JIRA_USERNAME=???
16
+ set EVENT_HANDLER_JIRA_PASSWORD=???
17
+ set EVENT_HANDLER_JIRA_RELEASE_FIELD_ID=???
18
+
19
+ event_handler
@@ -0,0 +1,20 @@
1
+ #!/bin/bash
2
+ # mandatory settings
3
+ export EVENT_HANDLER_BRPM_HOST=localhost
4
+
5
+ export EVENT_HANDLER_MESSAGING_PORT=5445
6
+ export EVENT_HANDLER_MESSAGING_USERNAME=msguser
7
+ export EVENT_HANDLER_MESSAGING_PASSWORD=????
8
+ export EVENT_HANDLER_LOG_FILE=/tmp/event_handler.log
9
+ export EVENT_HANDLER_PROCESS_EVENT_SCRIPT=integrations/brpm/process_event_handler_event.rb
10
+
11
+ # custom settings
12
+ export EVENT_HANDLER_BRPM_PORT=8088
13
+ export EVENT_HANDLER_BRPM_TOKEN=????
14
+
15
+ export EVENT_HANDLER_JIRA_URL=http://jira-server:9090
16
+ export EVENT_HANDLER_JIRA_USERNAME=????
17
+ export EVENT_HANDLER_JIRA_PASSWORD=????
18
+ export EVENT_HANDLER_JIRA_RELEASE_FIELD_ID=????
19
+
20
+ event_handler
@@ -0,0 +1,15 @@
1
+ rem mandatory settings
2
+ set WEBHOOK_RECEIVER_PORT=8089
3
+ set WEBHOOK_RECEIVER_MOUNT_POINT=webhooks
4
+ set WEBHOOK_RECEIVER_LOG_FILE=c:/tmp/webhook_receiver.log
5
+ set WEBHOOK_RECEIVER_INTEGRATION_ID=???
6
+ set WEBHOOK_RECEIVER_PROCESS_EVENT_SCRIPT=integrations/jira/process_webhook_event.rb
7
+
8
+ rem custom settings
9
+ set WEBHOOK_RECEIVER_BRPM_HOST=localhost
10
+ set WEBHOOK_RECEIVER_BRPM_PORT=8080
11
+ set WEBHOOK_RECEIVER_BRPM_TOKEN=???
12
+ set WEBHOOK_RECEIVER_JIRA_RELEASE_FIELD_ID=???
13
+
14
+ jruby -J-Djava.library.path= webhook_receiver
15
+
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+ # mandatory settings
3
+ export WEBHOOK_RECEIVER_PORT=8089
4
+ export WEBHOOK_RECEIVER_MOUNT_POINT=webhooks
5
+ export WEBHOOK_RECEIVER_LOG_FILE=/tmp/webhook_receiver.log
6
+ export WEBHOOK_RECEIVER_INTEGRATION_ID=???
7
+ export WEBHOOK_RECEIVER_PROCESS_EVENT_SCRIPT=integrations/jira/process_webhook_event.rb
8
+
9
+ # custom settings
10
+ export WEBHOOK_RECEIVER_BRPM_HOST=localhost
11
+ export WEBHOOK_RECEIVER_BRPM_PORT=8088
12
+ export WEBHOOK_RECEIVER_BRPM_TOKEN=???
13
+ export WEBHOOK_RECEIVER_JIRA_RELEASE_FIELD_ID=???
14
+
15
+ jruby -J-Djava.library.path= $(which webhook_receiver)
@@ -0,0 +1,93 @@
1
+ ###############################################################################
2
+ #
3
+ # Product: BMC Release Lifecycle Management 4.6.00
4
+ #
5
+ # To invoke in silent mode with options file:
6
+ # ./setup.sh -i silent -DOPTIONS_FILE=/tmp/Options.txt
7
+ # To generate a silent options file:
8
+ # ./setup.sh -DGENERATE_OPTIONS_FILE=/tmp/OutputOptionsFileName.txt
9
+ #
10
+ # ATENTION!!!
11
+ # All passwords are set by default to value '********'.
12
+ # Please change it to your own password(s) before using.
13
+ # You can generate hash for password by running maintenance utility (tab 'Encrypt'):
14
+ # - Windows:
15
+ # utility\BRPMMaintenanceTool.cmd
16
+ # - Linux/Solaris:
17
+ # utility/BRPMMaintenanceTool.sh
18
+ #
19
+ ###############################################################################
20
+ # Install Path
21
+ -P installLocation=/opt/bmc/RLM
22
+
23
+ #------------ Feature Choices ----------#
24
+ -A featureBRPM
25
+ -A PostgreSQL
26
+
27
+ #------------ BRPM Install Options ----------#
28
+ #-J BMC_BRPM_INSTALL_TYPE=PARTIAL_PRIVILEGE
29
+ -J IS_MULTIPLE_INSTANCE_CAPABLE=true
30
+ -J ADD_REMOVE_PROGRAMS_DEFAULT_KEY=BRPM
31
+ -J USE_BMC_BUNDLED_JRE=true
32
+ -J BMC_JAVA_JDK_PATH=
33
+ -J BMC_JAVA_JRE_PATH=C:\Program Files\BMC Software\BRPM\lib\jre
34
+ -J BRPM_USER=admin
35
+ -J USE_BMC_BUNDLED_JRE=true
36
+ -J BMC_BRPM_HTTP_PORT=8088
37
+ -J BRPM_USE_HTTPS=
38
+ # HTTPS Certificate Options
39
+
40
+ -J BMC_SUPERUSER_FIRSTNAME=John
41
+ -J BMC_SUPERUSER_LASTNAME=Administrator
42
+ -J BMC_SUPERUSER_EMAIL=admin@example.com
43
+ -J BMC_SUPERUSER_LOGIN=admin
44
+ -J BMC_SUPERUSER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
45
+ -J BMC_SUPERUSER_CONFIRM_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
46
+
47
+ #------------ BRPM Database Information ----------#
48
+ # Options SQL_SERVER, ORACLE, POSTGRESQL
49
+ # -J BMC_DB_TYPE=SQL_SERVER
50
+ # -J BMC_DB_TYPE=ORACLE
51
+ -J BMC_DB_TYPE=POSTGRESQL
52
+ -J BMC_DB_HOST=localhost
53
+ -J BMC_DB_PORT=5432
54
+ # -J BMC_DB_PORT=1433 # SQL_SERVER
55
+ # -J BMC_DB_PORT=1521 # Oracle
56
+ -J BMC_DB_NAME=bmc_rpm_db
57
+ -J BMC_DB_USER_NAME=rlm_user
58
+ -J BMC_DB_USER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
59
+
60
+ #------------ BRPM Migration Information ----------#
61
+ # Options true, false
62
+ -J BMC_MIGRATE_EXISTING_BRPM_INSTALLATION=false
63
+ -J BMC_REFERENCE_BRPM_INSTALLATION_PATH=/opt/bmc/RLM/releases/4.6.00/RPM
64
+ # Options USE_SAME_DATABASE, USE_SAME_DATABASE_EMPTY_DATABASE_CONTENTS
65
+ -J BMC_BRPM_DATABASE_MIGRATION=USE_SAME_DATABASE
66
+ # Options 4.4.00, BRLM_4_3_00, BRPM_2_6
67
+ -J BMC_BRPM_MIGRATION_VERSION=4.4.00
68
+ # Options COPY_CONFIGURATION, DISCARD
69
+ -J BMC_OTHER_SETTINGS=COPY_CONFIGURATION
70
+ -J BMC_BRPM_SKIP_DB_MODIFICATION_FOR_CLUSTER=false
71
+
72
+ #------------ Email Information ----------#
73
+ -J BMC_SENDMAIL_FROM=admin@example.com
74
+ -J MAIL_NOTIFICATIONS=USE_SMTP
75
+ -J BMC_SMTP_HOST=smtp.mycorp.com
76
+ -J BMC_SMTP_PORT=25
77
+ -J BMC_SMTP_DOMAIN_NAME=mycorp.com
78
+ -J BMC_SMTP_USER_NAME=smtpuser@company.com
79
+ -J BMC_SMTP_USER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
80
+ -J BMC_SMTP_AUTHENTICATION=login
81
+ -J BMC_SMTP_TLS=true
82
+
83
+ #------------ BRPM Torquebox superuser ----------#
84
+ -J BMC_TORQUEBOX_SUPERUSER_LOGIN=superuser
85
+ -J BMC_TORQUEBOX_SUPERUSER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
86
+ -J BMC_TORQUEBOX_SUPERUSER_CONFIRM_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
87
+
88
+ #------------ Messaging Host ----------#
89
+ -J BMC_MESSAGING_SYSTEM_HOST=127.0.0.1
90
+ -J BMC_MESSAGING_SYSTEM_PORT=5445
91
+ -J BMC_MESSAGING_SYSTEM_USER_NAME=msguser
92
+ -J BMC_MESSAGING_SYSTEM_USER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
93
+ -J BMC_MESSAGING_SYSTEM_USER_CONFIRM_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
@@ -0,0 +1,92 @@
1
+ ###############################################################################
2
+ #
3
+ # Product: BMC Release Lifecycle Management 4.6.00
4
+ #
5
+ # To invoke in silent mode with options file:
6
+ # ./setup.sh -i silent -DOPTIONS_FILE=/tmp/Options.txt
7
+ # To generate a silent options file:
8
+ # ./setup.sh -DGENERATE_OPTIONS_FILE=/tmp/OutputOptionsFileName.txt
9
+ #
10
+ # ATENTION!!!
11
+ # All passwords are set by default to value '********'.
12
+ # Please change it to your own password(s) before using.
13
+ # You can generate hash for password by running maintenance utility (tab 'Encrypt'):
14
+ # - Windows:
15
+ # utility\BRPMMaintenanceTool.cmd
16
+ # - Linux/Solaris:
17
+ # utility/BRPMMaintenanceTool.sh
18
+ #
19
+ ###############################################################################
20
+ # Install Path
21
+ -P installLocation=/opt/bmc/RLM
22
+
23
+ #------------ Feature Choices ----------#
24
+ -A featureBRPM
25
+ -A PostgreSQL
26
+
27
+ #------------ BRPM Install Options ----------#
28
+ #-J BMC_BRPM_INSTALL_TYPE=PARTIAL_PRIVILEGE
29
+ -J IS_MULTIPLE_INSTANCE_CAPABLE=true
30
+ -J ADD_REMOVE_PROGRAMS_DEFAULT_KEY=BRPM
31
+ -J USE_BMC_BUNDLED_JRE=true
32
+ #-J BMC_JAVA_JDK_PATH=
33
+ #-J BMC_JAVA_JRE_PATH=C:\Program Files\BMC Software\BRPM\lib\jre
34
+ -J BRPM_USER=admin
35
+ -J BMC_BRPM_HTTP_PORT=29418
36
+ -J BRPM_USE_HTTPS=
37
+ # HTTPS Certificate Options
38
+
39
+ -J BMC_SUPERUSER_FIRSTNAME=John
40
+ -J BMC_SUPERUSER_LASTNAME=Administrator
41
+ -J BMC_SUPERUSER_EMAIL=admin@example.com
42
+ -J BMC_SUPERUSER_LOGIN=admin
43
+ -J BMC_SUPERUSER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
44
+ -J BMC_SUPERUSER_CONFIRM_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
45
+
46
+ #------------ BRPM Database Information ----------#
47
+ # Options SQL_SERVER, ORACLE, POSTGRESQL
48
+ # -J BMC_DB_TYPE=SQL_SERVER
49
+ # -J BMC_DB_TYPE=ORACLE
50
+ -J BMC_DB_TYPE=POSTGRESQL
51
+ -J BMC_DB_HOST=localhost
52
+ -J BMC_DB_PORT=5432
53
+ # -J BMC_DB_PORT=1433 # SQL_SERVER
54
+ # -J BMC_DB_PORT=1521 # Oracle
55
+ -J BMC_DB_NAME=bmc_rpm_db
56
+ -J BMC_DB_USER_NAME=brpmuser
57
+ -J BMC_DB_USER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
58
+
59
+ #------------ BRPM Migration Information ----------#
60
+ # Options true, false
61
+ -J BMC_MIGRATE_EXISTING_BRPM_INSTALLATION=true
62
+ -J BMC_REFERENCE_BRPM_INSTALLATION_PATH=/opt/bmc/RLM/releases/4.4.00.07/RPM
63
+ # Options USE_SAME_DATABASE, USE_SAME_DATABASE_EMPTY_DATABASE_CONTENTS
64
+ -J BMC_BRPM_DATABASE_MIGRATION=USE_SAME_DATABASE
65
+ # Options 4.4.00, BRLM_4_3_00, BRPM_2_6
66
+ -J BMC_BRPM_MIGRATION_VERSION=4.4.00
67
+ # Options COPY_CONFIGURATION, DISCARD
68
+ -J BMC_OTHER_SETTINGS=COPY_CONFIGURATION
69
+ -J BMC_BRPM_SKIP_DB_MODIFICATION_FOR_CLUSTER=false
70
+
71
+ #------------ Email Information ----------#
72
+ -J BMC_SENDMAIL_FROM=admin@example.com
73
+ -J MAIL_NOTIFICATIONS=USE_SMTP
74
+ -J BMC_SMTP_HOST=smtp.mycorp.com
75
+ -J BMC_SMTP_PORT=25
76
+ -J BMC_SMTP_DOMAIN_NAME=mycorp.com
77
+ -J BMC_SMTP_USER_NAME=smtpuser@company.com
78
+ -J BMC_SMTP_USER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
79
+ -J BMC_SMTP_AUTHENTICATION=login
80
+ -J BMC_SMTP_TLS=true
81
+
82
+ #------------ BRPM Torquebox superuser ----------#
83
+ -J BMC_TORQUEBOX_SUPERUSER_LOGIN=superuser
84
+ -J BMC_TORQUEBOX_SUPERUSER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
85
+ -J BMC_TORQUEBOX_SUPERUSER_CONFIRM_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
86
+
87
+ #------------ Messaging Host ----------#
88
+ -J BMC_MESSAGING_SYSTEM_HOST=127.0.0.1
89
+ -J BMC_MESSAGING_SYSTEM_PORT=5445
90
+ -J BMC_MESSAGING_SYSTEM_USER_NAME=msguser
91
+ -J BMC_MESSAGING_SYSTEM_USER_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
92
+ -J BMC_MESSAGING_SYSTEM_USER_CONFIRM_PASSWORD=DES\:a751b8161238d051e4e986421d24d2dcd1cff043003f0e35
@@ -0,0 +1,42 @@
1
+ ################################################################################
2
+ # BMC Software, Inc.
3
+ # Confidential and Proprietary
4
+ # Copyright (c) BMC Software, Inc. 2001-2012
5
+ # All Rights Reserved.
6
+ ################################################################################
7
+
8
+ DEFAULT_SUPPORT_EMAIL_ADDRESS = "releaseme.be@gmail.com"
9
+ DEFAULT_SUPPORT_EMAIL_FOOTER = "If you have any problems or questions - please email #{DEFAULT_SUPPORT_EMAIL_ADDRESS}"
10
+ # this is set to the notifier default in case clients had that address working and want to keep it without setting a new one
11
+ #DEFAULT_SUPPORT_EMAIL_FROM_ADDRESS = "no-reply@#{Notifier.default_url_options[:host]}"
12
+
13
+ def configure_mail(config)
14
+ # Set the :host value to a domain that your smtp or sendmail will allow for outgoing mail
15
+ config.action_mailer.default_url_options = { :host => 'brpm.pulsar-it.be:29418' }
16
+
17
+ # Override the mail method for all environments. Possible values are :smtp (default), :sendmail, :file and :test.
18
+ config.action_mailer.delivery_method = :smtp
19
+
20
+ # Override perform deliveries for all environments. Determines whether deliver_* methods are actually carried out. By default they are,
21
+ # but this can be turned off to help functional testing. Change this to true to enable email.
22
+ config.action_mailer.perform_deliveries = true
23
+
24
+ # To set up SMTP, uncomment the appropriate method call below, set options in the method as necessary,
25
+ # and save the file as smtp_settings.rb
26
+ configure_mail_with_smtp(config)
27
+ end
28
+
29
+ def configure_mail_with_smtp(config)
30
+ require 'smtp_tls'
31
+
32
+ config.action_mailer.smtp_settings = {
33
+ :address => "smtp.gmail.com",
34
+ :port => 587,
35
+ :domain => "brpm.pulsar-it.be:29418",
36
+ :user_name => "releaseme.be@gmail.com",
37
+ :password => "********",
38
+ :authentication => 'plain',
39
+ :enable_starttls_auto => true
40
+ }
41
+ end
42
+