Example project running:
- php webserver running wordpress
You need oc (https://github.com/openshift/origin/releases) locally installed:
create a new project
> oc new-project example-wordpress-php \
--description="Example WordPress PHP" \
--display-name="Example WordPress HHVM"
build it all
> ./BuildAll.sh
create an ssh deploy key without passphrase
> ssh-keygen -f ~/.ssh/openshift-wordpress-php
> oc secrets new-sshauth openshift-wordpress-php --ssh-privatekey=/home/joeri/.ssh/openshift-wordpress-php
> oc secrets add serviceaccount/builder secrets/openshift-wordpress-php
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-wordpress-php.pub
Routes to a production hostname
> oc create -f Route-production.yaml
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)
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