Reputation: 920
Is there any way to create two applications that in Openshift that use the same git repo (although perhaps different branches?).
I am basically looking for a super simple way to create one "experimental" or "dev" application and one production one.
Thanks!
Upvotes: 1
Views: 729
Reputation: 2093
This blog post on release management covers the topic in more detail: https://blog.openshift.com/release-management-in-the-cloud/
Here's a quick summary of the process...
# setup
cd LOCAL_APP_DIRECTORY
rhc app create STG_APP_NAME CARTRIDGE_TYPE
rhc app create --no-git PROD_APP_NAME CARTRIDGE_TYPE
git remote add production -m master PROD_GIT_URL
git push -f production master
git remote rename origin staging
# deployment
git push staging # or simply, git push
git push production
# emergency rollbacks:
git log # return commit history, example hash: 28c5555352a902c549c965da30cf7559c80f328e
git push staging 28c5555352a902c549c965da30cf7559c80f328e:master
git push production 28c5555352a902c549c965da30cf7559c80f328e:master
Upvotes: 3