diff --git a/.openshift/README.md b/.openshift/README.md new file mode 100644 index 00000000..7ec66d79 --- /dev/null +++ b/.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 diff --git a/.openshift/action_hooks/README.md b/.openshift/action_hooks/README.md new file mode 100644 index 00000000..54131958 --- /dev/null +++ b/.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 diff --git a/.openshift/action_hooks/stop b/.openshift/action_hooks/stop index c6bb29af..77d10b73 100755 --- a/.openshift/action_hooks/stop +++ b/.openshift/action_hooks/stop @@ -5,4 +5,3 @@ then client_result "Application is already stopped" else kill `ps -ef | grep commafeed | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1 -fi diff --git a/.openshift/cron/README.cron b/.openshift/cron/README.cron new file mode 100644 index 00000000..ac77f787 --- /dev/null +++ b/.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 diff --git a/.openshift/markers/README.md b/.openshift/markers/README.md new file mode 100644 index 00000000..45814da3 --- /dev/null +++ b/.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 diff --git a/README.md b/README.md index 6d64d4ba..13016281 100644 --- a/README.md +++ b/README.md @@ -94,4 +94,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/diy/index.html b/diy/index.html new file mode 100644 index 00000000..58caef0b --- /dev/null +++ b/diy/index.html @@ -0,0 +1,279 @@ + + + + + + Welcome to OpenShift + + + + +
+
+

Welcome to your Do-It-Yourself application on OpenShift

+
+

+ Do-It-Yourself is an experimental cartridge that provides a way to try unsupported languages, frameworks, and middleware on OpenShift. + To get started, add your framework of choice and modify .openshift/action_hooks/{start, stop} + to start and stop your application. + The only restriction is that your application should bind to $OPENSHIFT_DIY_IP:8080 + Don't forget to stop the existing server that is running before you push your stop file. +

+ +
+
+
+

Deploying code changes

+

OpenShift uses the Git version control system for your source code, and grants you access to it via the Secure Shell (SSH) protocol. In order to upload and download code to your application you need to give us your public SSH key. You can upload it within the web console or install the RHC command line tool and run rhc setup to generate and upload your key automatically.

+ +

Working in your local Git repository

+

If you created your application from the command line and uploaded your SSH key, rhc will automatically download a copy of that source code repository (Git calls this 'cloning') to your local system.

+ +

If you created the application from the web console, you'll need to manually clone the repository to your local system. Copy the application's source code Git URL and then run:

+ +
$ git clone <git_url> <directory_to_create>
+
+# Within your project directory
+# Commit your changes and push to OpenShift
+
+$ git commit -a -m 'Some commit message'
+$ git push
+ + + +
+ +
+
+ +

Managing your application

+ +

Web Console

+

You can use the OpenShift web console to enable additional capabilities via cartridges, add collaborator access authorizations, designate custom domain aliases, and manage domain memberships.

+ +

Command Line Tools

+

Installing the OpenShift RHC client tools allows you complete control of your cloud environment. Read more on how to manage your application from the command line in our User Guide. +

+ +

Development Resources

+ + + +
+
+ + + +
+ + + diff --git a/diy/testrubyserver.rb b/diy/testrubyserver.rb new file mode 100755 index 00000000..e9ef1156 --- /dev/null +++ b/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 diff --git a/misc/.gitkeep b/misc/.gitkeep new file mode 100644 index 00000000..e69de29b