Skip to content

weepee-org/openshift-example-project

Repository files navigation

openshift-example-project

Example project running:

  • static static webserver
  • php webserver
  • hhvm webserver

Installation

You need oc locally installed:

create a new project

oc new-project example \
    --description="Examples weepee registry" \
    --display-name="Examples Weepee Registry"

Look in BuildAll.sh for all Build Examples

Modifications for integrating in a private repository

create an ssh deploy key without passphrase

> ssh-keygen -f ~/.ssh/openshift-my-static-site
> oc secrets new-sshauth openshift-my-static-site --ssh-privatekey=/home/joeri/.ssh/openshift-my-static-site
> oc secrets add serviceaccount/builder secrets/openshift-my-static-site

Update the BuildConfig (Modify and Append BuildConfig-Secrets.yaml.template to your Buildconfig) (Remove old BuildConfig first !)

> oc delete -f Buildconfig.yaml
> oc create -f BuildConfig.yaml

Add your key to the deploy keys of you repository on GitHub

> cat ~/.ssh/openshift-my-static-site.pub

Route-production.yml

Routes to a production hostname

> oc create -f Route-production.yaml

WebHooks

You can find the (github and generic) webhook in the openshift control pannel ! (Browse - Builds) You can copy the url to clipboard and paste it in Github webhook url (handy for rolling updates)

Updating from branches

You can trigger on different Branches just modify your BuildConfig

source:
  git:
    ref: release
    uri: https://github.com/weepee-org/openshift-example-project.git
  contextDir: php/
  type: Git

About

Example project with static apache, php and hhvm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published