openshift.ks: Factor out repo configuration

Factor the repo or channel configuration out of the logic at the end of
the script and into the new configure_repos function.

Further factor the configuration out into configure_yum_repos,
configure_rhn_channels, and configure_rhsm_channels functions.
openshift.ks: Refactor repo configuration

In configure_repos, define new function predicates: need_optional_repo,
need_infra_repo, need_node_repo, need_jbosseap_cartridge_repo,
need_client_tools_repo, need_jbosseap_repo, and need_jbossews_repo.

In configure_yum_repos, configure_rhn_channels, and
configure_rhsm_channels, use these the aforementioned new predicate
functions.

This commit is not strictly refactoring; it has some functional changes:

• configure_rhn_channels will no longer configure priorities for
  channels that it is not adding.

• configure_rhsm_channels will disable the eap-5 channel right after
  enabling eap-6 and disable ews-1 right after enabling ews-2 instead of
  enabling eap-6 and ews-2 and then disabling eap-5 and ews-1.
openshift.ks: set up infra repo for named

In configure_repos, define need_infra_repo to be true when installing
the named component.  This change is needed because the installation
script now installs the yum-plugin-priorities package, which is in the
openshift_infrastructure and openshift_node channels, and so at least
one of these two channels must be enabled.
openshift-amz.sh: Fix generation

Make sed command in the rule that generates amazon/openshift-amz.sh disable
the configuration of the RHEL repo, as intended.  This rule has been broken
since commit 8457439d88003566a5a4c907f492789db4dd10e6, which added
whitespace that broke the regex match in the sed command.

Make the same change to the other sed commands in the same rule to make
them resilient in case of other whitespace changes.

Regenerate openshift-amz.sh.
Merge pull request #41 from Miciah/openshift.ks-refactor-repo-config

openshift.ks repo config refactoring
Adding a script for decoding broker auth tokens
openshift.ks: Refactor high-level install steps

Factor the steps at the end of the script into a new configure_all
function, and call that function after parse_cmdline and set_defaults.

Modify the generation rules for generic/openshift.sh to take this change
into account.
openshift.ks: Rename parse_cmdline

Rename parse_cmdline to parse_kernel_cmdline.
openshift.ks: Refactor parse_kernel_cmdline

Factor parse_args out of parse_kernel_cmdline.
openshift.sh: Parse command-line args

openshift.ks: Add a parse_cmdline function that parses the command-line
arguments.  Add a commented-out invocation of parse_cmdline.

scriptify, Makefile: When generating openshift.sh and openshift-amz.sh,
disable the invocation of parse_kernel_cmdline and enable the invocation of
parse_cmdline.

With this commit, it is now possible to specify settings as arguments
instead of environment variables.  For example, instead of the following:

    export CONF_DOMAIN=example.com
    sh openshift.sh

Now it will be possible to do the following:

    sh openshift.sh domain=example.com
openshift.ks: Add CONF_ACTIONS

Add the CONF_ACTIONS setting, using which the user can specify
a comma-separated list of functions to run.

Assign CONF_ACTIONS the value configure_all by default.

Don't run configure_all unconditionally.  Now the user can override the
default installation process to provide a list of steps to run or even
specify only one action to run, for example to reconfigure a single
service.
Merge pull request #46 from Miciah/openshift.ks-refactor-arguments-parsing

openshift.ks: Refactor arguments parsing
don't use perl in install scripts as it's not present in the RHEL minimal install
ensure ntp and ntpdate rpms are present if required, not present in the RHEL minimal install
Merge pull request #48 from Miciah/openshift.ks-yum-install-ntp-ntpdate

openshift.ks: yum install ntp ntpdate
Merge pull request #47 from Miciah/openshift.ks-replace-perl-by-sed

openshift.ks: Replace perl by sed
<install> nuke deprecated plugins
<openshift.ks> restructure to improve for automation
<install> revise wording
<install> rhn activation key optional; hardening