Bug 1057153 - RFE enable administrator to provide default application git templates
Summary: RFE enable administrator to provide default application git templates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-23 14:28 UTC by Luke Meyer
Modified: 2017-03-08 17:36 UTC (History)
6 users (show)

Fixed In Version: openshift-origin-broker-1.15.3.3-1.el6op rubygem-openshift-origin-controller-1.17.12.2-1.el6op
Doc Type: Enhancement
Doc Text:
The broker host now allows configurable default templates for new applications without requiring custom cartridges, enabling administrators to customize the initial application experience for users. For example, initial JBoss EWS configuration files can be customized with organization defaults, and all default applications can have the organization name and logo. Set the new DEFAULT_APP_TEMPLATES setting in the /etc/openshift/broker.conf file on the broker host to specify default Git URLs for any web cartridge using a space-separated list of elements in the form <cartridge-name>|<git-url>. These URLs are used rather than any Git template included in the cartridge. Configure all broker hosts with the same values and restart the broker service.
Clone Of:
Environment:
Last Closed: 2014-02-25 15:43:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0209 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.3 bugfix and enhancement update 2014-02-25 20:40:32 UTC

Description Luke Meyer 2014-01-23 14:28:47 UTC
As an administrator, I'd like to provide git templates for the cartridges so I can customize the initial application experience of my users. For some cartridges (e.g. JBoss) this enables me to specify default application server settings. For all cartridges it enables me to have the apps reflect the company name, logo, color palette, etc.

I would like to do this without creating a custom cartridge, so that I can continue to get updated cartridges as OpenShift makes them available without having to maintain my forked cartridges (unless template changes are necessary).

Steps to Reproduce:
1. rhc app create <name> <cartridge>
2. or, create from management console
3. or, create from JBoss Dev Tools
4. Visit application

Actual results:
Exactly what ships with OpenShift.

Expected results:
Cartridge templates I specify somewhere.

Additional info:
Initial implementation will essentially allow the broker to set a default for the --from-code parameter from rhc, which can refer to any remote git repo. If there is enough interest, a future implementation might also allow using local repos on the node hosts.

Upstream Trello feature:
https://trello.com/c/XyIl91VO/192-enable-administrator-to-provide-default-application-git-templates-enterprise-origin

Comment 2 Luke Meyer 2014-02-07 16:07:01 UTC
These origin-server commits cherry-picked:

commit f0c39e6c016376da182f9279f637013bf819db1b
Author: Luke Meyer <lmeyer>
Date:   Tue Feb 4 18:31:29 2014 -0500

    <broker func tests> for custom default templates
    
    https://trello.com/c/EoO1OFal/200-2-enterprise-admin-can-change-default-app-git-templates

commit 15085774df70e86491cd4ec0fd037ef2118355b6
Author: Luke Meyer <lmeyer>
Date:   Wed Feb 5 11:48:06 2014 -0500

    <broker unit tests> for config readers
    
    related to parsing app template url config
    https://trello.com/c/EoO1OFal/200-2-enterprise-admin-can-change-default-app-git-templates

commit 93fb5c81f0607226cf4440041c048184828fec93
Author: Luke Meyer <lmeyer>
Date:   Fri Jan 31 06:51:08 2014 -0500

    <broker> enable customizing default app templates
    
    https://trello.com/c/EoO1OFal/200-2-enterprise-admin-can-change-default-app-git-templates
    This enables the administrator to configure URLs that should be used as
    the default application templates for framework cartridges. This is done
    in broker configuration.

Comment 5 Anping Li 2014-02-11 14:10:36 UTC
Verify in puddle: 2014-02-10 and pass with follow steps:
create applications using all type of cartridges with option below, all quickstarts can be imported.
# Customize default app templates for specified framework cartridges.
# Space-separated list of elements <cartridge-name>|<git url> - URLs must be available for all nodes.
# URL will be cloned as the git repository for the cartridge at app creation unless the user specifies their own.
# e.g.: DEFAULT_APP_TEMPLATES=php-5.3|http://example.com/php.git perl-5.10|file:///etc/openshift/cart.conf.d/templates/perl.git
# WARNING: do not include private credentials in any URL; they would be visible in every app's cloned repository.
#DEFAULT_APP_TEMPLATES=perl-5.10|https://github.com/openshift-quickstart/dancer-example.git php-5.3|https://github.com/openshift/dokuwiki-quickstart.git
#DEFAULT_APP_TEMPLATES=python-2.6|https://github.com/openshift/flask-example.git python-2.7|https://github.com/openshift/flask-example.git
#DEFAULT_APP_TEMPLATES=python-2.6|https://github.com/openshift/django-example.git python-2.6|https://github.com/openshift/flask-example.git
#DEFAULT_APP_TEMPLATES=ruby-1.9|https://github.com/openshift/sinatra-example.git
#DEFAULT_APP_TEMPLATES=jbosseap-6|https://github.com/openshift/kitchensink-example.git
#DEFAULT_APP_TEMPLATES=jbosseap-6|https://github.com/openshift/dokuwiki-quickstart.git
#DEFAULT_APP_TEMPLATES=ruby-1.8|https://github.com/anpingli/ruby18.git
#DEFAULT_APP_TEMPLATES=jbossews-2.0|https://github.com/anpingli/jbossews20.git
#DEFAULT_APP_TEMPLATES=jbossews-1.0|https://github.com/anpingli/jbossews10.git
#DEFAULT_APP_TEMPLATES=nodejs-0.10|https://github.com/anpingli/nodejs010.git
#DEFAULT_APP_TEMPLATES=python-2.6|https://github.com/openshift/django-example.git python-2.7|https://github.com/openshift/flask-example.git perl-5.10|https://github.com/openshift-quickstart/dancer-example.git php-5.3|https://github.com/openshift/dokuwiki-quickstart.git ruby-1.9|https://github.com/openshift/sinatra-example.git jbosseap-6|https://github.com/openshift/kitchensink-example.git ruby-1.8|https://github.com/anpingli/ruby18.git jbossews-2.0|https://github.com/anpingli/jbossews20.git jbossews-1.0|https://github.com/anpingli/jbossews10.git nodejs-0.10|https://github.com/anpingli/nodejs010.git

DEFAULT_APP_TEMPLATES=python-2.6|file:///etc/openshift/cart.conf.d/template/django-example.git python-2.7|file:///etc/openshift/cart.conf.d/template/flask-example.git perl-5.10|file:///etc/openshift/cart.conf.d/template-quickstart/dancer-example.git php-5.3|file:///etc/openshift/cart.conf.d/template/dokuwiki-quickstart.git ruby-1.9|file:///etc/openshift/cart.conf.d/template/sinatra-example.git jbosseap-6|file:///etc/openshift/cart.conf.d/template/kitchensink-example.git ruby-1.8|file:///github.com/anpingli/ruby18.git jbossews-2.0|file:///github.com/anpingli/jbossews20.git jbossews-1.0|file:///github.com/anpingli/jbossews10.git nodejs-0.10|file:///github.com/anpingli/nodejs010.git

Comment 7 errata-xmlrpc 2014-02-25 15:43:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0209.html


Note You need to log in before you can comment on or make changes to this bug.