Skip to content

OpenShift Binary Deployment

Michael Koppen edited this page Aug 16, 2015 · 2 revisions

Deployment

Preperation

(rhc app create base --no-git)
rhc configure-app –-no-auto-deploy -a base
rhc configure-app --deployment-type binary -a base

.travis.yml

env:
  global:
    # $OPENSHIFT_LOGIN
    - secure: <secure>
    # $OPENSHIFT_PASSWORD
    - secure: <secure>

before_install:
  - openssl aes-256-cbc -K $encrypted_b48b31fc6699_key -iv $encrypted_b48b31fc6699_iv
    -in id_rsa.enc -out id_rsa -d
  - mv id_rsa ~/.ssh/id_rsa
  - chmod 600 ~/.ssh/id_rsa

install:
  - mvn clean install -Popenshift -B -V

after_success:
  - if [ "$TRAVIS_BRANCH" != "master" ]; then echo "No deployment because branch is not master."; exit 0; fi
  - cp webapps/ROOT.war binary/dependencies/jbossews/webapps/ROOT.war
  - cp -r .openshift/* binary/repo/.openshift
  - cd binary
  - tar -czvf ../webapps/binary.tar.gz ./
  - cd ..
  - gem install rhc
  - rhc deploy -a base webapps/binary.tar.gz --no-force-clean-build -l $OPENSHIFT_LOGIN -p $OPENSHIFT_PASSWORD

Auto-scaling

Clone this wiki locally