Skip to content

Commit

Permalink
Merge remote-tracking branch 'openshift/master'
Browse files Browse the repository at this point in the history
Conflicts:
	.openshift/action_hooks/start
	README.md
  • Loading branch information
timmolter committed Jul 4, 2014
2 parents 3e88d5e + a9204c9 commit fb85324
Show file tree
Hide file tree
Showing 19 changed files with 381 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .openshift/README.md
@@ -0,0 +1,3 @@
For information about .openshift directory, consult the documentation:

http://openshift.github.io/documentation/oo_user_guide.html#the-openshift-directory
3 changes: 3 additions & 0 deletions .openshift/action_hooks/README.md
@@ -0,0 +1,3 @@
For information about action hooks, consult the documentation:

http://openshift.github.io/documentation/oo_user_guide.html#action-hooks
2 changes: 1 addition & 1 deletion .openshift/action_hooks/start
@@ -1,3 +1,3 @@
#!/bin/bash
cd $OPENSHIFT_REPO_DIR
nohup java -jar target/xdropwizard-1.1.0-SNAPSHOT.jar server xdropwizard.openshift.yml > ${OPENSHIFT_DIY_LOG_DIR}/xdropwizard.log 2>&1 &
nohup java -jar target/xdropwizard-1.1.0-SNAPSHOT.jar server xdropwizard.openshift.yml > ${OPENSHIFT_DIY_LOG_DIR}/xdropwizard.log 2>&1 &
10 changes: 10 additions & 0 deletions .openshift/action_hooks/stop
@@ -0,0 +1,10 @@
#!/bin/bash
source $OPENSHIFT_CARTRIDGE_SDK_BASH

# The logic to stop your application should be put in this script.
if [ -z "$(ps -ef | grep testrubyserver.rb | grep -v grep)" ]
then
client_result "Application is already stopped"
else
kill `ps -ef | grep testrubyserver.rb | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1
fi
27 changes: 27 additions & 0 deletions .openshift/cron/README.cron
@@ -0,0 +1,27 @@
Run scripts or jobs on a periodic basis
=======================================
Any scripts or jobs added to the minutely, hourly, daily, weekly or monthly
directories will be run on a scheduled basis (frequency is as indicated by the
name of the directory) using run-parts.

run-parts ignores any files that are hidden or dotfiles (.*) or backup
files (*~ or *,) or named *.{rpmsave,rpmorig,rpmnew,swp,cfsaved}

The presence of two specially named files jobs.deny and jobs.allow controls
how run-parts executes your scripts/jobs.
jobs.deny ===> Prevents specific scripts or jobs from being executed.
jobs.allow ===> Only execute the named scripts or jobs (all other/non-named
scripts that exist in this directory are ignored).

The principles of jobs.deny and jobs.allow are the same as those of cron.deny
and cron.allow and are described in detail at:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Automating_System_Tasks.html#s2-autotasks-cron-access

See: man crontab or above link for more details and see the the weekly/
directory for an example.

PLEASE NOTE: The Cron cartridge must be installed in order to run the configured jobs.

For more information about cron, consult the documentation:
http://openshift.github.io/documentation/oo_cartridge_guide.html#cron
http://openshift.github.io/documentation/oo_user_guide.html#cron
Empty file.
Empty file.
Empty file.
Empty file.
16 changes: 16 additions & 0 deletions .openshift/cron/weekly/README
@@ -0,0 +1,16 @@
Run scripts or jobs on a weekly basis
=====================================
Any scripts or jobs added to this directory will be run on a scheduled basis
(weekly) using run-parts.

run-parts ignores any files that are hidden or dotfiles (.*) or backup
files (*~ or *,) or named *.{rpmsave,rpmorig,rpmnew,swp,cfsaved} and handles
the files named jobs.deny and jobs.allow specially.

In this specific example, the chronograph script is the only script or job file
executed on a weekly basis (due to white-listing it in jobs.allow). And the
README and chrono.dat file are ignored either as a result of being black-listed
in jobs.deny or because they are NOT white-listed in the jobs.allow file.

For more details, please see ../README.cron file.

1 change: 1 addition & 0 deletions .openshift/cron/weekly/chrono.dat
@@ -0,0 +1 @@
Time And Relative D...n In Execution (Open)Shift!
3 changes: 3 additions & 0 deletions .openshift/cron/weekly/chronograph
@@ -0,0 +1,3 @@
#!/bin/bash

echo "`date`: `cat $(dirname \"$0\")/chrono.dat`"
12 changes: 12 additions & 0 deletions .openshift/cron/weekly/jobs.allow
@@ -0,0 +1,12 @@
#
# Script or job files listed in here (one entry per line) will be
# executed on a weekly-basis.
#
# Example: The chronograph script will be executed weekly but the README
# and chrono.dat files in this directory will be ignored.
#
# The README file is actually ignored due to the entry in the
# jobs.deny which is checked before jobs.allow (this file).
#
chronograph

7 changes: 7 additions & 0 deletions .openshift/cron/weekly/jobs.deny
@@ -0,0 +1,7 @@
#
# Any script or job files listed in here (one entry per line) will NOT be
# executed (read as ignored by run-parts).
#

README

3 changes: 3 additions & 0 deletions .openshift/markers/README.md
@@ -0,0 +1,3 @@
For information about markers, consult the documentation:

http://openshift.github.io/documentation/oo_user_guide.html#markers
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -707,4 +707,5 @@ There are just two main things needed to make a flot chart:
});
</script>
</body>
</html>
</html>

279 changes: 279 additions & 0 deletions diy/index.html

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions diy/testrubyserver.rb
@@ -0,0 +1,14 @@
#!/usr/bin/env ruby
require 'webrick'
include WEBrick

config = {}
config.update(:Port => 8080)
config.update(:BindAddress => ARGV[0])
config.update(:DocumentRoot => ARGV[1])
server = HTTPServer.new(config)
['INT', 'TERM'].each {|signal|
trap(signal) {server.shutdown}
}

server.start
Empty file added misc/.gitkeep
Empty file.

0 comments on commit fb85324

Please sign in to comment.