Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.91 KB | None | 0 0
  1. [[Add-Node]]
  2. == Extending the Cluster
  3. By default, the reference architecture playbooks are configured to deploy 3 master, 3 application, and 3 infrastructure nodes. This cluster size provides enough resources to get started with
  4. deploying a few test applications or a Continuous Integration Workflow example. However, as the cluster begins to be utilized by more teams and projects, it will be become necessary to
  5. provision more application or infrastructure nodes to support the expanding environment. To facilitate easily growing the cluster, the `add-node.py` python script
  6. (similar to `ocp-on-vmware.py`) is provided in the `openshift-ansible-contrib` repository. It will allow for provisioning either an Application or Infrastructure node per run and
  7. can be ran as many times as needed.
  8.  
  9. === Before Adding a Node
  10. Verify the quantity and type of the nodes in the cluster by using the `oc get nodes` command. The output below is an example of a complete OpenShift environment after the deployment of the reference architecture environment.
  11.  
  12. [subs=+quotes]
  13. ----
  14. $ *oc get nodes*
  15. NAME STATUS AGE
  16. master-0.example.com Ready,SchedulingDisabled 14m
  17. master-1.example.com Ready,SchedulingDisabled 14m
  18. master-2.example.com Ready,SchedulingDisabled 14m
  19. infra-0.example.com Ready 14m
  20. infra-1.example.com Ready 14m
  21. infra-2.example.com Ready 14m
  22. app-0.example.com Ready 14m
  23. app-1.example.com Ready 14m
  24. app-2.example.com Ready 14m
  25.  
  26. ----
  27.  
  28. === Introduction to add-node.py
  29. The python script `add-node.py` is operationally similar to the `ocp-on-vmware.py` script. Parameters can optionally be passed in when calling the script and values are
  30. read from `ocp-on-vmware.ini`. Any required parameters not already set will automatically prompted for at run time. To see all allowed parameters, the --help trigger is available.
  31.  
  32. [subs=+quotes]
  33. ----
  34. $ *./add-node.py --help*
  35. usage: add-node.py [-h] [--node_type NODE_TYPE] [--node_number NODE_NUMBER]
  36. [--create_inventory] [--no_confirm NO_CONFIRM] [--tag TAG]
  37. [--verbose]
  38.  
  39. Add new nodes to an existing OCP deployment
  40.  
  41. optional arguments:
  42. -h, --help show this help message and exit
  43. --node_type NODE_TYPE
  44. Specify the node label: app, infra, storage
  45. --node_number NODE_NUMBER
  46. Specify the number of nodes to add
  47. --create_inventory Helper script to create json inventory file and exit
  48. --no_confirm NO_CONFIRM
  49. Skip confirmation prompt
  50. --tag TAG Skip to various parts of install valid tags include:
  51. - vms (create storage vms)
  52. - crs-node-setup (install the proper packages on the crs nodes)
  53. - heketi-setup (install heketi and config on the crs master)
  54. - heketi-ocp (install the heketi secret and storage class on OCP)
  55. --verbose Verbosely display commands
  56. ----
  57.  
  58. === Adding an Application Node
  59. To add an application node, run the `add-node.py` script following the example below. Once the instance is launched, the installation of OpenShift will automatically begin.
  60.  
  61. NOTE: The `storage` node_type is available to add persistent storage to the OCP cluster using container native storage `CNS` or container ready storage `CRS`. Please see the
  62. upcoming chapter involving persistent storage for more information about this options.
  63.  
  64. [subs=+quotes]
  65. ----
  66. $ *./add-node.py --node_type=app*
  67. Configured inventory values:
  68. console_port: 8443
  69. deployment_type: openshift-enterprise
  70. openshift_vers: v3_5
  71. vcenter_host: 10.x.x.25
  72. vcenter_username: administrator@vsphere.local
  73. vcenter_password: xxxxxx
  74. vcenter_template_name: ocp-server-template-2.0.2
  75. vcenter_folder: ocp
  76. vcenter_datastore: ose-vmware
  77. vcenter_cluster: devel
  78. vcenter_resource_pool: OCP
  79. vcenter_datacenter: Boston
  80. public_hosted_zone: example.com
  81. app_dns_prefix: apps
  82. vm_dns: 10.x.x.5
  83. vm_gw: 10.x.x.254
  84. vm_netmask: 255.255.254.0
  85. vm_network: "VM Network"
  86. rhel_subscription_user: sysengra
  87. rhel_subscription_pass: xxxxxx
  88. rhel_subscription_server:
  89. rhel_subscription_pool: Red Hat OpenShift Container Platform, Premium*
  90. byo_lb: no
  91. lb_host: haproxy-0
  92. byo_nfs: no
  93. nfs_host: nfs-0
  94. nfs_registry_mountpoint: /exports
  95. master_nodes: 3
  96. infra_nodes: 3
  97. app_nodes: 3
  98. storage_nodes: 0
  99. vm_ipaddr_start: 10.x.x.225
  100. ocp_hostname_prefix:
  101. auth_type: ldap
  102. ldap_user: openshift
  103. ldap_user_password: xxxxxx
  104. ldap_fqdn: e2e.bos.redhat.com
  105. openshift_hosted_metrics_deploy: false
  106. openshift_sdn: redhat/openshift-ovs-subnet
  107. containerized: false
  108. container_storage: none
  109. tag: None
  110. node_number: 1
  111. ini_path: ./ocp-on-vmware.ini
  112. node_type: app
  113.  
  114.  
  115. Continue creating the inventory file with these values? [y/N]: y
  116.  
  117. Inventory file created: add-node.json
  118. host_inventory:
  119. app-1:
  120. guestname: app-1
  121. ip4addr: 10.x.x.230
  122. tag: app
  123.  
  124. Continue adding nodes with these values? [y/N]:
  125. ----
  126.  
  127. === Adding an Infrastructure Node
  128. The process for adding an Infrastructure Node is nearly identical to adding an Application Node. The only differences in adding an Infrastructure node is the
  129. requirement updating the HAproxy load balancer entry used by the router. Follow the example steps
  130. below to add a new infrastructure node.
  131.  
  132.  
  133. [subs=+quotes]
  134. ----
  135. $ *./add-node.py --node_type=infra
  136.  
  137. Configured inventory values:
  138. console_port: 8443
  139. deployment_type: openshift-enterprise
  140. openshift_vers: v3_5
  141. ...omitted...
  142. node_number: 1
  143. ini_path: ./ocp-on-vmware.ini
  144. node_type: infra
  145.  
  146. Continue creating the inventory file with these values? [y/N]: y
  147.  
  148. Inventory file created: add-node.json
  149. host_inventory:
  150. infra-1:
  151. guestname: infra-1
  152. ip4addr: 10.x.x.230
  153. tag: infra
  154.  
  155. Continue adding nodes with these values? [y/N]:
  156.  
  157. ----
  158.  
  159. === Validating a Newly Provisioned Node
  160. To verify a newly provisioned node that has been added to the existing environment, use the `oc get nodes` command. In this example, node `app-3.example.com`
  161. is an application node newly deployed by the `add-node.py` playbooks..
  162.  
  163. [subs=+quotes]
  164. ----
  165. $ *oc get nodes*
  166. NAME STATUS AGE
  167. master-0. Ready,SchedulingDisabled 14m
  168. master-1.example.com Ready,SchedulingDisabled 14m
  169. master-2.example.com Ready,SchedulingDisabled 14m
  170. infra-0.example.com Ready 14m
  171. infra-1.example.com Ready 14m
  172. infra-2.example.com Ready 14m
  173. app-0.example.com Ready 14m
  174. app-1.example.com Ready 14m
  175. app-2.example.com Ready 14m
  176. app-3.example.com Ready 2m
  177.  
  178. $ *oc get nodes --show-labels | grep app | wc -l*
  179. 4
  180. ----
  181.  
  182. // vim: set syntax=asciidoc:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement