This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# our AEM app runs as the 'day' user in the /home/day DIR | |
## for you yungins, 'day' is the company that created cq5/aem6 | |
# MUST RUN THIS as the day user | |
# {{ aem_type }} is the AEM instance type we store in Ansible .. author or publish | |
PID=$(ps aux | egrep "day.*java" | egrep -v "egrep" | awk '{print $2}') | |
LOG="/home/day/{{ aem_type }}/crx-quickstart/logs/threaddump.log" | |
# clear out old log file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
# check to make sure the httpd package is installed | |
describe package('httpd') do | |
it { should be_installed } | |
end | |
# check to ensure the httpd service is running and enabled | |
describe service('httpd') do | |
it { should be_running } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Commands: | |
# hal restart tomcat in <environment> | |
module.exports = (robot) -> | |
robot.respond /restart tomcat in (dev|stage|prod)/i, (msg) -> | |
env = msg.match[1] | |
robot.emit "jenkins_job", { | |
name: "Restart_Tomcat", | |
msg: msg, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hubot event listener | |
# can map to a Jenkins instance and job and build it with params if needed | |
# can be invoked like this: | |
# robot.emit "jenkins_job", { | |
# name: "Restart_Tomcat", | |
# msg: msg, | |
# success: "Hello .. I went ahead and triggered a restart for Tomcat in the #{env} environment", | |
# params: "Inventory=#{env}&Group=tomcat" | |
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# takes a snapshot of the provided device and writes a description | |
# will freeze the FS, snapshot, then unfreeze | |
# has the ability to "wait" until the snapshot is done if you want to make sure before you proceed to other tasks | |
# | |
device=0 | |
desc=0 | |
wait=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def jsonString = readFileFromWorkspace("jobs.json") | |
def slurper = new groovy.json.JsonSlurper() | |
json = slurper.parseText(jsonString) | |
/* example JSON | |
{ | |
"cronJobs":[ | |
{ | |
"name": "Cron_Run_Ansible_Dev", | |
"vars":[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# this is how you encrypt a file using openssl and aes-256 | |
# openssl aes-256-cbc -salt -a -e -in <src file> -out <out file> -k <enc salt> | |
# expects you pass in vars: | |
# enc_src_file -- local location of encrypted src file that will copied to target node | |
# enc_src_dest -- where the decrypted file should be put | |
# enc_salt -- salt used to decrypt | |
# enc_file_user -- user ownership |
NewerOlder