anchor.diff:  toc::[]
   
   == Overview
  -`openshift start`, `openshift start master`, and `openshift start node` all take a limited set of arguments that are sufficient for development and experimental purposes, but are insufficient to describe and control the full set of configuration and security options that are necessary in a production environment.  To provide those options, it is necessary to use the dedicated master and node config files.
  -
  -The config files are fully specifying with no defaulting.  This means that any empty value means that you want to start up with an empty value for that parameter.  It makes it easy to reason about exactly what your configuration is, but it also means that it can be difficult to remember all of the options to specify.  To make this easier, the config files can be created with the `--write-config` flag and can be used via the `--config` flag.
  -
  -== Create the starting config files
  -The `openshift start` command accepts flags that indicate that it should simply write the config file that it would have used and terminate.  This is useful for getting a starting point for the config.  You can do this by running 
  -
  -* `openshift start --write-config=openshift.local.config`
  -* `openshift start master --write-config=openshift.local.config/master`
  -* `osadm create-node-config --node-dir=openshift.local.config/node-myhost --node=myhost --hostnames=myhost.local,10.0.0.1`
  -
  -== Use the config files
  -Once you have modified the config files to your liking, you can make use of them by specifying them as an argument.  Keep in mind that if you specify a config file, *none of the other flags you pass in will be respected*.  You can run them like: 
  -
  -* `openshift start --master-config=openshift.local.config/master/master-config.yaml --node-config=openshift.local.config/node-<node-name>/node-config.yaml`
  -* `openshift start master --config=openshift.local.config/master/master-config.yaml`
  -* `openshift start node --config=openshift.local.config/node-myhost/node-config.yaml`
  -
  -== Stub for discussion of generating the config for a new node
  -
  -
  -== Example master.yaml
  -This is an example at a point in time.  You should run `--write-config` to generate a file of your own.
  -
  -[source]
  ----
  +The `openshift start` command is used to launch OpenShift servers. The command
  +and its subcommands (`master` to launch a
  +link:../architecture/infrastructure_components/kubernetes_infrastructure.html#master[master
  +server] and `node` to launch a
  +link:../architecture/infrastructure_components/kubernetes_infrastructure.html#node[node
  +server]) all take a limited set of arguments that are sufficient for launching
  +servers in a development or experimental environment.
  +
  +However, these arguments are insufficient to describe and control the full set
  +of configuration and security options that are necessary in a production
  +environment. To provide those options, it is necessary to use the dedicated
  +master and node configuration files.
  +
  +link:#master-configuration-files[Master configuration files] and
  +link:#node-configuration-files[node configuration files] are fully specified
  +with no default values. Therefore, any empty value indicates that you want to
  +start up with an empty value for that parameter. This makes it easy to reason
  +about exactly what your configuration is, but it also makes it difficult to
  +remember all of the options to specify. To make this easier, the configuration
  +files can be created with the `--write-config` option and then used with the
  +`--config` option.
  +
  +== Creating New Configuration Files
  +For masters, the `openshift start` command accepts options that indicate that it
  +should simply write the configuration files that it would have used, then
  +terminate. For nodes, a configuration file can be written using the `osadm
  +create-node-config` command. Creating new configuration files is useful to get a
  +starting point for defining your configuration.
  +
  +The following commands write the relevant launch configuration file(s),
  +certificate files, and any other necessary files to the specified
  +`--write-config` or `--node-dir` directory.
  +
  +To create configuration files for an all-in-one server (a master and a node on
  +the same host) in the specified directory:
  +
  +[options="nowrap"]
  +----
  +$ openshift start --write-config=/openshift.local.config
  +----
  +
  +To create a link:#master-configuration-files[master configuration file] and
  +other required files in the specified directory:
  +
  +[options="nowrap"]
  +----
  +$ openshift start master --write-config=/openshift.local.config/master
  +----
  +
  +To create a link:#node-configuration-files[node configuration file] and other
  +related files in the specified directory:
  +
  +[options="nowrap"]
  +----
  +$ osadm create-node-config --node-dir=/openshift.local.config/node-<node_hostname> --node=<node_hostname> --hostnames=<hostname>,<ip_address>
  +----
  +
  +For the `--hostnames` option in the above command, use a comma-delimited list of
  +every host name or IP address you want server certificates to be valid for. The
  +above command also assumes that certificate files are located in an
  +*_openshift.local.config/master/_* directory. If they are not, you can include
  +options to specify their location. Run the command with the `-h` option to see
  +details.
  +
  +== Launching Servers Using Configuration Files
  +Once you have modified the master and/or node configuration files to your
  +specifications, you can use them when launching servers by specifying them as an
  +argument. Keep in mind that if you specify a configuration file, none of the
  +other command line options you pass are respected.
  +
  +To launch an all-in-one server using a master configuration and a node
  +configuration file:
  +
  +[options="nowrap"]
  +----
  +$ openshift start --master-config=/openshift.local.config/master/master-config.yaml --node-config=/openshift.local.config/node-<node_hostname>/node-config.yaml
  +----
  +
  +To launch a master server using a master configuration file:
  +
  +[options="nowrap"]
  +----
  +$ openshift start master--config=/openshift.local.config/master/master-config.yaml
  +----
  +
  +To launch a node server using a node configuration file:
  +
  +[options="nowrap"]
  +----
  +$ openshift start node --config=/openshift.local.config/node-<node_hostname>/node-config.yaml
  +----
  +
  +== Master Configuration Files
  +The following *_master-config.yaml_* file is a sample master configuration
  +file taken at a point in time. You can
  +link:#creating-new-configuration-files[create a new master configuration file]
  +to see the valid options for your installed version of OpenShift.
  +
  +.Sample Master Configuration File
  +[source,yaml]
  +----
  +NetworkConfig:
  +  clusterNetworkCIDR: 10.1.0.0/16
  +  hostSubnetLength: 8
  +  networkPluginName: ""
   apiVersion: v1
   assetConfig:
     logoutURL: ""
  -  masterPublicURL: https://10.0.0.1:8443
  -  publicURL: https://10.0.0.1:8443/console/
  +  masterPublicURL: https://10.0.2.15:8443
  +  publicURL: https://10.0.2.15:8443/console/
     servingInfo:
       bindAddress: 0.0.0.0:8443
       certFile: master.server.crt
       clientCA: ""
       keyFile: master.server.key
   corsAllowedOrigins:
  -- 10.0.0.1:8443
  +- 10.0.2.15:8443
   - 127.0.0.1
   - localhost
   dnsConfig:
  
positive.code:     authorizeTokenMaxAgeSeconds: 300
  policyConfig:
    bootstrapPolicyFile: policy.json
    masterAuthorizationNamespace: master
    openshiftSharedResourcesNamespace: openshift
  servingInfo:
    bindAddress: 0.0.0.0:8443
    certFile: master.server.crt
    clientCA: ca.crt
    keyFile: master.server.key
  projectNodeSelector: ""
  ---
  
  === Stub for discussion of what the different values actually do
  
  == Example node.yaml
  This is an example at a point in time.  You should run `osadm create-node-config` to generate a file of your own.
  
  [source]
  ---
  allowDisabledDocker: false
  apiVersion: v1
  dnsDomain: local
  
negative.code:     provider:
        apiVersion: v1
        kind: AllowAllPasswordIdentityProvider
    masterPublicURL: https://10.0.2.15:8443
    masterURL: https://10.0.2.15:8443
    sessionConfig:
      sessionMaxAgeSeconds: 300
      sessionName: ssn
  