<commit_before>= Master and Node Configuration
{product-author}
{product-version}
:data-uri:
:icons:
:experimental:
:toc: macro
:toc-title:

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 --writeconfig --master-config=master.yaml --node-config=node.yaml`
* `openshift start master --write-config --config=master.yaml`
* `openshift start node --write-config config=node.yaml`

== 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=master.yaml --node-config=node.yaml`
* `openshift start master --config=master.yaml`
* `openshift start node config=node.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]
---
apiVersion: v1
assetConfig:
  kubernetesPublicURL: https://10.13.137.161:8443
  logoutURI: ""
  masterPublicURL: https://10.13.137.161:8443
  publicURL: https://10.13.137.161:8444
  servingInfo:
    bindAddress: 0.0.0.0:8444
    certFile: openshift.local.certificates/master/cert.crt
    clientCA: openshift.local.certificates/ca/cert.crt
    keyFile: openshift.local.certificates/master/key.key
corsAllowedOrigins:
- 10.13.137.161:8444
- 10.13.137.161:8443
- localhost
- 127.0.0.1
dnsConfig:
  bindAddress: 0.0.0.0:53
etcdClientInfo:
  ca: ""
  certFile: ""
  keyFile: ""
  url: http://10.13.137.161:4001
etcdConfig:
  masterAddress: 10.13.137.161:4001
  peerAddress: 0.0.0.0:7001
  servingInfo:
    bindAddress: 0.0.0.0:4001
    certFile: ""
    clientCA: ""
    keyFile: ""
  storageDirectory: openshift.local.etcd
imageConfig:
  format: openshift/origin-${component}:${version}
  latest: false
kind: MasterConfig
kubernetesMasterConfig:
  masterIP: 10.13.137.161
  servicesSubnet: 172.30.17.0/24
  staticNodeNames:
  - hostname.example.org
masterClients:
  deployerKubeConfig: openshift.local.certificates/openshift-deployer/.kubeconfig
  kubernetesKubeConfig: openshift.local.certificates/kube-client/.kubeconfig
  openshiftLoopbackKubeConfig: openshift.local.certificates/openshift-client/.kubeconfig
oauthConfig:
  assetPublicURL: https://10.13.137.161:8444
  grantConfig:
    method: auto
  identityProviders:
  - provider:
      apiVersion: v1
      kind: AllowAllPasswordIdentityProvider
    usage:
      challenge: true
      login: true
      providerScope: anypassword
  masterPublicURL: https://10.13.137.161:8443
  masterURL: https://10.13.137.161:8443
  proxyCA: ""
  sessionAuthenticationConfig:
    sessionMaxAgeSeconds: 300
    sessionName: ssn
    sessionSecrets:
    - <PASSWORD>
  tokenConfig:
    accessTokenMaxAgeSeconds: 3600
    authorizeTokenMaxAgeSeconds: 300
policyConfig:
  bootstrapPolicyFile: openshift.local.policy/policy.json
  masterAuthorizationNamespace: master
  openshiftSharedResourcesNamespace: openshift
servingInfo:
  bindAddress: 0.0.0.0:8443
  certFile: openshift.local.certificates/master/cert.crt
  clientCA: openshift.local.certificates/ca/cert.crt
  keyFile: openshift.local.certificates/master/key.key

---

=== 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 `--write-config` to generate a file of your own.

[source]
---
allowDisabledDocker: true
apiVersion: v1
dnsDomain: local
dnsIP: 10.13.137.161
kind: NodeConfig
masterKubeConfig: openshift.local.certificates/node-hostname.example.org/.kubeconfig
networkContainerImage: openshift/origin-pod:v0.4.1
nodeName: hostname.example.org
recordEvents: false
servingInfo:
  bindAddress: 0.0.0.0:10250
  certFile: openshift.local.certificates/node-hostname.example.org/server.crt
  clientCA: ""
  keyFile: openshift.local.certificates/node-hostname.example.org/server.key
volumeDirectory: openshift.local.volumes
---

=== Stub for discussion of what the different values actually do<commit_msg>comments 2<commit_after>= Master and Node Configuration
{product-author}
{product-version}
:data-uri:
:icons:
:experimental:
:toc: macro
:toc-title:

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 --writeconfig --master-config=master.yaml --node-config=node.yaml`
* `openshift start master --write-config --config=master.yaml`
* `openshift start node --write-config config=node.yaml`

== 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=master.yaml --node-config=node.yaml`
* `openshift start master --config=master.yaml`
* `openshift start node config=node.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]
---
apiVersion: v1
assetConfig:
  kubernetesPublicURL: https://10.0.0.1:8443
  logoutURI: ""
  masterPublicURL: https://10.0.0.1:8443
  publicURL: https://10.0.0.1:8444
  servingInfo:
    bindAddress: 0.0.0.0:8444
    certFile: openshift.local.certificates/master/cert.crt
    clientCA: openshift.local.certificates/ca/cert.crt
    keyFile: openshift.local.certificates/master/key.key
corsAllowedOrigins:
- 10.0.0.1:8444
- 10.0.0.1:8443
- localhost
- 127.0.0.1
dnsConfig:
  bindAddress: 0.0.0.0:53
etcdClientInfo:
  ca: ""
  certFile: ""
  keyFile: ""
  url: http://10.0.0.1:4001
etcdConfig:
  masterAddress: 10.0.0.1:4001
  peerAddress: 0.0.0.0:7001
  servingInfo:
    bindAddress: 0.0.0.0:4001
    certFile: ""
    clientCA: ""
    keyFile: ""
  storageDirectory: openshift.local.etcd
imageConfig:
  format: openshift/origin-${component}:${version}
  latest: false
kind: MasterConfig
kubernetesMasterConfig:
  masterIP: 10.0.0.1
  servicesSubnet: 172.30.17.0/24
  staticNodeNames:
  - hostname.example.org
masterClients:
  deployerKubeConfig: openshift.local.certificates/openshift-deployer/.kubeconfig
  kubernetesKubeConfig: openshift.local.certificates/kube-client/.kubeconfig
  openshiftLoopbackKubeConfig: openshift.local.certificates/openshift-client/.kubeconfig
oauthConfig:
  assetPublicURL: https://10.0.0.1:8444
  grantConfig:
    method: auto
  identityProviders:
  - provider:
      apiVersion: v1
      kind: AllowAllPasswordIdentityProvider
    usage:
      challenge: true
      login: true
      providerScope: anypassword
  masterPublicURL: https://10.0.0.1:8443
  masterURL: https://10.0.0.1:8443
  proxyCA: ""
  sessionAuthenticationConfig:
    sessionMaxAgeSeconds: 300
    sessionName: ssn
    sessionSecrets:
    - <PASSWORD>
  tokenConfig:
    accessTokenMaxAgeSeconds: 3600
    authorizeTokenMaxAgeSeconds: 300
policyConfig:
  bootstrapPolicyFile: openshift.local.policy/policy.json
  masterAuthorizationNamespace: master
  openshiftSharedResourcesNamespace: openshift
servingInfo:
  bindAddress: 0.0.0.0:8443
  certFile: openshift.local.certificates/master/cert.crt
  clientCA: openshift.local.certificates/ca/cert.crt
  keyFile: openshift.local.certificates/master/key.key

---

=== 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 `--write-config` to generate a file of your own.

[source]
---
allowDisabledDocker: true
apiVersion: v1
dnsDomain: local
dnsIP: 10.0.0.1
kind: NodeConfig
masterKubeConfig: openshift.local.certificates/node-hostname.example.org/.kubeconfig
networkContainerImage: openshift/origin-pod:v0.4.1
nodeName: hostname.example.org
recordEvents: false
servingInfo:
  bindAddress: 0.0.0.0:10250
  certFile: openshift.local.certificates/node-hostname.example.org/server.crt
  clientCA: ""
  keyFile: openshift.local.certificates/node-hostname.example.org/server.key
volumeDirectory: openshift.local.volumes
---

=== Stub for discussion of what the different values actually do
{'fraction_non_alphanumeric': 0.09286610676706246, 'fraction_numerical': 0.04044791968336712, 'mean_word_length': 4.227043390514631, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 40, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3009802', 'n_tokens_mistral': 3441, 'n_tokens_neox': 3135, 'n_words': 1010}