UnderCloud安装原理

本节介绍UnderCloud的安装原理,UnderCloud主要是依赖于OpenStack本身的功能来安装OverCloud,OverCloud就是最终要交付的OpenStack环境。UnderCloud是一个单机版的OpenStack环境,主要安装的组件有nova, glance, keystone, neutron, heat, ironic, swift,还可以选择性的安装telemetry, mistral, zaqar等组件。

安装undercloud只使用一个简单的命令: openstack undercloud install就可以了,这个命令是python-tripleoclient提供的,它是python-openstackclient的一个插件,除了有安装undercloud的命令外,还有安装overcloud的命令,而在安装undercloud时,python-tripleoclient只是简单的调用了instack-undercloud中提供的命令: instack-install-undercloud,instack-undercloud就是专门用来安装和升级undercloud的,在instack-undercloud中,又使用了 instack + os-refresh-config + puppet来部署undercloud,所以这些组件的依赖关系如下:

  1. .
  2. └── python-openstackclient
  3. └── python-tripleoclient
  4. └── instack-undercloud
  5. ├── instack
  6. └── os-refresh-config
  7. ├── os-apply-config
  8. ├── puppet
  9. └── os-cloud-config

instack和os-refresh-config的具体细节请参见本章“依赖组件”一节中的内容,instack里主要应用了dib elements来定制当前系统,在instack-undercloud中,指定了多个elements来执行,主要是为后面安装undercloud做些准备工作,比如生成os-refresh-config需要的脚本,生成hieradata等等;而os-refresh-config则在安装undercloud过程中起到了整体的编排作用,它会去调用os-apply-config配置当前系统,跑puppet安装OpenStack组件,然后建立安装overcloud使用的网络等等;puppet是在os-refresh-config过程中被执行的,使用puppet apply在本地执行puppet代码,安装undercloud用到的各个OpenStack组件;在安装完成OpenStack各个组件后,os-refresh-config会去调用os-cloud-config提供的命令setup-neutron去建立管理网络。

下面来详细介绍下instack-undercloud安装undercloud中的主要步骤:

1. 生成环境变量

在安装undercloud之前,先要在stack用户的home目录下创建一个undercloud.conf配置文件,在该文件中定义了安装undercloud需要用的配置项,因为在安装时,本质上是在跑各种脚本,在脚本中会用到各种变量,这些变量的值需要从环境变量中获取,因此instack-install-undercloud命令先要将读取undercloud.conf中的配置项,然后将其转化为环境变量,方便后面的脚本使用,当然,脚本使用的环境变量不仅仅是在这个阶段生成的,在各个elements中,也定义了各种环境变量,在执行elemenets之前,会先被导出来。在安装undercloud时,生成的环境变量见附录1.

2. 生成Metadata配置文件

在后面的步骤中会执行os-apply-config,os-apply-config需要用到一个json格式的metadata配置文件,用来渲染模板,生成系统中的配置,这个json格式的metadata配置文件就是在这个阶段生成的,里面包括了hieradata的配置,neutron的配置,os-net-config的配置等等,该文件的保存路径为:/var/lib/heat-cfntools/cfn-init-data,可能是由于历史原因,是以cfn命名的,这也是os-apply-config最低优先级去找的配置文件,该文件的示例请参见附录2.

3. 执行instack

在instack-undercloud中指定了一些elements去执行,这些elements分别来自不同的项目,有tripleo-image-elements中定义的,有instack-undercloud中定义的,还有diskimage-builder中定义的,这些信息都被配置在一个json格式的配置文件中,执行的命令如下:

  1. sudo -E instack \
  2. -p /usr/share/tripleo-puppet-elements:/usr/share/instack-undercloud:/usr/share/tripleo-image-elements:/usr/share/diskimage-builder/elements \
  3. -j /usr/share/instack-undercloud/json-files/centos-7-undercloud-packages.json

centos-7-undercloud-packages.json文件的内容如下:

  1. [
  2. {
  3. "name": "Installation",
  4. "element": [
  5. "install-types",
  6. "undercloud-install",
  7. "enable-packages-install",
  8. "element-manifest",
  9. "puppet-stack-config"
  10. ],
  11. "hook": [
  12. "extra-data",
  13. "pre-install",
  14. "install",
  15. "post-install"
  16. ],
  17. "exclude-element": [
  18. "pip-and-virtualenv",
  19. "os-collect-config",
  20. "svc-map",
  21. "pip-manifest",
  22. "package-installs",
  23. "pkg-map",
  24. "puppet",
  25. "cache-url",
  26. "dib-python",
  27. "os-svc-install",
  28. "install-bin"
  29. ],
  30. "blacklist": [
  31. "99-refresh-completed"
  32. ]
  33. }
  34. ]

即指定了instack-types, undercloud-install, enable-packages-install, element-manifest, puppet-stack-config这几个elements,因为每一个elements都有依赖,所以最终处理完依赖,要执行的elements全量为:

  • install-types
  • element-manifest
  • manifests
  • source-repositories
  • puppet-modules
  • hiera
  • enable-packages-install
  • os-apply-config
  • os-refresh-config
  • undercloud-install
  • puppet-stack-config

每一个elements都包含了一些hook,instack的配置文件指定了只执行extra-data, pre-install, install, post-install这4个hook,这些hook以及hook中的脚本请参见附录3,合并之后的hook请参见附录4。

instack通过执行这些elements,大概做了几下几件事情:

  1. 从package安装各个项目的puppet代码,因为还支持从源码安装puppet代码
  2. 生成puppet的入口代码:puppet-stack-config.pp,以及生成puppet hieradata:puppet-stack-config.yaml
  3. 生成os-apply-config使用的模板文件
  4. 生成os-refresh-config使用的脚本

4. 执行os-refresh-config

在上一步中已经生成了os-refresh-config所需要使用的脚本,是通过os-refresh-config这个element生成的,这些脚本分散在每一个element中,每一个element除了包含instack执行过程中的hook外,还包含了os-refresh-config和os-apply-config需要用到的hook,通过os-refresh-config和os-apply-config这两个elements将这些hook合并到一起,如下:

  1. os-apply-config/
  2. etc/
  3. os-net-config/
  4. config.json
  5. puppet/
  6. hieradata/
  7. CentOS.yaml
  8. RedHat.yaml
  9. hiera.yaml
  10. root/
  11. stackrc
  12. stackrc.oac
  13. tripleo-undercloud-passwords
  14. tripleo-undercloud-passwords.oac
  15. var/
  16. opt/
  17. undercloud-stack/
  18. masquerade
  19. os-refresh-config/
  20. configure.d/
  21. 20-os-apply-config*
  22. 30-reload-keepalived*
  23. 40-hiera-datafiles*
  24. 40-truncate-nova-config*
  25. 50-puppet-stack-config*
  26. post-configure.d/
  27. 10-iptables*
  28. 80-seedstack-masquerade*
  29. 98-undercloud-setup*
  30. 99-refresh-completed*

在生成的os-refresh-config中,只包含了configure和post-configure两个hook,因此先执行configure.d中的脚本,然后执行post-configure.d中的脚本,其中比较重要的是如下几个脚本:

  • 在20-os-apply-config中执行了os-apply-config命令,将os-apply-config中的使用json metadata文件渲染模板,然后将生成的配置文件放置到对应的位置上去
  • 50-puppet-stack-config就是执行puppet代码了,是通过puppet apply的方式执行:

    1. puppet apply --detailed-exitcodes /etc/puppet/manifests/puppet-stack-config.pp

    这一步就是安装undercloud需要使用到的各个OpenStack组件了。

  • 98-undercloud-setup,在安装好OpenStack组件之后,调用os-cloud-config提供的命令setup-neutron去创建安装OverCloud需要使用的管理网络。此外,如果enable了mistral功能,还会去创建workbook。

除此之外,就是配置一些iptables规则,比如允许ip forwarding,可以让overcloud节点能访问外网,配置169.254.169.254的NAT规则,打通虚拟机访问metadata的通道等等,最终建立出来的undercloud网络拓扑如下:

原理解析 - 图1

经过上面这几步,就完成了undercloud的安装,整体来看undercloud采用了脚本+puppet的方式进行安装,安装过程非常复杂,定制化主要也是写elements,需要非常了解其中的原理才能定制undercloud,在现在的master分支,也就是Pike版本的TripleO中,采用了新的方法去安装undercloud,即也采用heat去部署,见这里,不再依赖instack-undercloud中的各种elements,这样undercloud和overcloud的安装方法就统一了。

附录1

安装undercloud时,生成的环境变量示例:

  1. {
  2. 'UNDERCLOUD_HORIZON_SECRET_KEY':'51a4c2aee7cfa93efee549c2a1bd48e9a3501494',
  3. 'TARGET_ROOT':'/',
  4. 'UNDERCLOUD_IRONIC_PASSWORD':'7558a0701f802a84faa625e0bc563170a97aa6cb',
  5. 'INSPECTION_COLLECTORS':'default,extra-hardware,logs',
  6. 'ENABLE_MISTRAL':'True',
  7. 'SHELL':'/bin/bash',
  8. 'UNDERCLOUD_ENDPOINT_SWIFT_ADMIN':'http://192.168.24.1:8080',
  9. 'UNDERCLOUD_ENDPOINT_GLANCE_ADMIN':'http://192.168.24.1:9292',
  10. 'UNDERCLOUD_CEILOMETER_SNMPD_PASSWORD':'7e698c4fdb9a0eccc0a079c456c7a32a816120df',
  11. 'UNDERCLOUD_ENDPOINT_NOVA_ADMIN':'http://192.168.24.1:8774/v2.1',
  12. 'NODE_DIST':'centos7',
  13. 'HISTSIZE':'1000',
  14. 'UNDERCLOUD_DEBUG':'True',
  15. 'UNDERCLOUD_DB_PASSWORD':'f2f25d1df2f05b810d7819bcfea45803185df833',
  16. 'INSPECTION_RUNBENCH':'False',
  17. 'SERVICE_PRINCIPAL':'',
  18. 'UNDERCLOUD_SWIFT_HASH_SUFFIX':'b3c4eef1928b9b84427c06f2a1acc5d7f1b2f198',
  19. 'UNDERCLOUD_ENDPOINT_IRONIC_INTERNAL':'http://192.168.24.1:6385',
  20. 'XDG_RUNTIME_DIR':'/run/user/1000',
  21. 'TRIPLEO_INSTALL_USER':'stack',
  22. 'UNDERCLOUD_ENDPOINT_KEYSTONE_PUBLIC':'https://192.168.24.2:13000',
  23. 'INSPECTION_KERNEL_ARGS':'ipa-debug=1 ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1',
  24. 'STORE_EVENTS':'False',
  25. 'XDG_SESSION_ID':'198',
  26. 'UNDERCLOUD_ADMIN_VIP':'192.168.24.3',
  27. 'UNDERCLOUD_ENDPOINT_CEILOMETER_ADMIN':'http://192.168.24.1:8777',
  28. 'JSONFILE':'/usr/share/instack-undercloud/json-files/centos-7-undercloud-packages.json',
  29. 'HOSTNAME':'undercloud.localdomain',
  30. 'SELINUX_LEVEL_REQUESTED':'',
  31. 'UNDERCLOUD_ENDPOINT_AODH_PUBLIC':'https://192.168.24.2:13042',
  32. 'UNDERCLOUD_ENDPOINT_AODH_INTERNAL':'http://192.168.24.1:8042',
  33. 'UNDERCLOUD_ENDPOINT_MISTRAL_PUBLIC':'https://192.168.24.2:13989/v2',
  34. 'DIB_INIT_SYSTEM':'systemd',
  35. 'INSPECTION_INTERFACE':'br-ctlplane',
  36. 'UNDERCLOUD_ENDPOINT_KEYSTONE_INTERNAL':'http://192.168.24.1:5000',
  37. 'MAIL':'/var/spool/mail/stack',
  38. 'TRIPLEO_UNDERCLOUD_PASSWORD_FILE':'/home/stack/undercloud-passwords.conf',
  39. 'SCHEDULER_MAX_ATTEMPTS':'30',
  40. 'UNDERCLOUD_ENDPOINT_HEAT_INTERNAL':'http://192.168.24.1:8004/v1/%(tenant_id)s',
  41. 'UNDERCLOUD_ENDPOINT_AODH_ADMIN':'http://192.168.24.1:8042',
  42. 'UNDERCLOUD_HEAT_PASSWORD':'561b715ce0f8ffe0c1482eeaed3df09cd2590a91',
  43. 'LOCAL_INTERFACE':'eth1',
  44. 'LESSOPEN':'||/usr/bin/lesspipe.sh %s',
  45. 'MASQUERADE_NETWORK':'192.168.24.0/24',
  46. 'USER':'root',
  47. 'UNDERCLOUD_ENDPOINT_HEAT_PUBLIC':'https://192.168.24.2:13004/v1/%(tenant_id)s',
  48. 'UNDERCLOUD_HEAT_STACK_DOMAIN_ADMIN_PASSWORD':'38e14254ddf98458ba09dcf600d936d3631a28b7',
  49. 'UNDERCLOUD_ENDPOINT_NEUTRON_ADMIN':'http://192.168.24.1:9696',
  50. 'SHLVL':'3',
  51. 'UNDERCLOUD_ENDPOINT_ZAQAR_ADMIN':'http://192.168.24.1:8888',
  52. 'UNDERCLOUD_ENDPOINT_CEILOMETER_PUBLIC':'https://192.168.24.2:13777',
  53. 'UNDERCLOUD_ENDPOINT_KEYSTONE_ADMIN':'http://192.168.24.1:35357',
  54. 'SUDO_USER':'stack',
  55. 'UNDERCLOUD_ENDPOINT_IRONIC_INSPECTOR_INTERNAL':'http://192.168.24.1:5050',
  56. 'ELEMENTS_PATH':'/usr/share/tripleo-puppet-elements:/usr/share/instack-undercloud:/usr/share/tripleo-image-elements:/usr/share/diskimage-builder/elements',
  57. 'ENABLE_VALIDATIONS':'True',
  58. 'UNDERCLOUD_ENDPOINT_ZAQAR_WEBSOCKET_INTERNAL':'ws://192.168.24.1:9000',
  59. 'UNDERCLOUD_ADMIN_PASSWORD':'78ad5a42318e7d41e5a2e0f1f9600375ba985b16',
  60. 'LOCAL_MTU':'1500',
  61. 'TMP_MOUNT_PATH':'/tmp/instack.gbtlM6/mnt',
  62. 'UNDERCLOUD_ENDPOINT_MISTRAL_INTERNAL':'http://192.168.24.1:8989/v2',
  63. 'SSH_CONNECTION':'192.168.23.1 37621 192.168.23.47 22',
  64. 'IMAGE_PATH':'.',
  65. 'GUESTFISH_OUTPUT':'\\e[0m',
  66. 'UNDERCLOUD_ENDPOINT_SWIFT_INTERNAL':'http://192.168.24.1:8080/v1/AUTH_%(tenant_id)s',
  67. 'GENERATE_SERVICE_CERTIFICATE':'True',
  68. 'UNDERCLOUD_CEILOMETER_METERING_SECRET':'989d08bc16f00298e7b0cf9fd396d5477a46c959',
  69. 'DIB_IMAGE_CACHE':'/root/.cache/image-create',
  70. 'DIB_DEFAULT_INSTALLTYPE':'package',
  71. 'IPXE_ENABLED':'True',
  72. 'UNDERCLOUD_ENDPOINT_IRONIC_INSPECTOR_PUBLIC':'https://192.168.24.2:13050',
  73. 'SELINUX_USE_CURRENT_RANGE':'',
  74. 'CLEAN_NODES':'False',
  75. 'UNDERCLOUD_ENDPOINT_NOVA_PUBLIC':'https://192.168.24.2:13774/v2.1',
  76. 'HOME':'/root',
  77. 'UNDERCLOUD_ENDPOINT_ZAQAR_INTERNAL':'http://192.168.24.1:8888',
  78. 'UNDERCLOUD_ENDPOINT_IRONIC_INSPECTOR_ADMIN':'http://192.168.24.1:5050',
  79. 'GUESTFISH_INIT':'\\e[1;34m',
  80. 'LANG':'en_US.utf8',
  81. 'UNDERCLOUD_SERVICE_CERTIFICATE':'/etc/pki/tls/certs/undercloud-192.168.24.2.pem',
  82. 'ENABLE_TELEMETRY':'True',
  83. 'DHCP_START':'192.168.24.5',
  84. 'IMAGE_NAME':'instack',
  85. 'DIB_OFFLINE':'',
  86. 'ENABLE_UI':'True',
  87. '_':'/usr/bin/python',
  88. 'NET_CONFIG_OVERRIDE':'',
  89. 'PUBLIC_INTERFACE_IP':'192.168.24.1/24',
  90. 'UNDERCLOUD_ENDPOINT_IRONIC_ADMIN':'http://192.168.24.1:6385',
  91. 'USERNAME':'root',
  92. 'UNDERCLOUD_ENDPOINT_HEAT_ADMIN':'http://192.168.24.1:8004/v1/%(tenant_id)s',
  93. 'LOCAL_IP':'192.168.24.1',
  94. 'SELINUX_ROLE_REQUESTED':'',
  95. 'UNDERCLOUD_ENDPOINT_GLANCE_INTERNAL':'http://192.168.24.1:9292',
  96. 'SUDO_GID':'1000',
  97. 'UNDERCLOUD_ENDPOINT_IRONIC_PUBLIC':'https://192.168.24.2:13385',
  98. '_LIB':'/usr/share/diskimage-builder/lib',
  99. 'SSH_TTY':'/dev/pts/1',
  100. 'DHCP_END':'192.168.24.30',
  101. 'UNDERCLOUD_ENDPOINT_NEUTRON_INTERNAL':'http://192.168.24.1:9696',
  102. 'UNDERCLOUD_ENDPOINT_ZAQAR_WEBSOCKET_ADMIN':'ws://192.168.24.1:9000',
  103. 'UNDERCLOUD_RABBIT_COOKIE':'274d7049a7cdd3be29759776b6054907be3cb410',
  104. 'NETWORK_GATEWAY':'192.168.24.1',
  105. 'UNDERCLOUD_ENDPOINT_NOVA_INTERNAL':'http://192.168.24.1:8774/v2.1',
  106. 'INSPECTION_ENABLE_UEFI':'True',
  107. 'TRIPLEO_UNDERCLOUD_CONF_FILE':'/home/stack/undercloud.conf',
  108. 'CERTIFICATE_GENERATION_CA':'local',
  109. 'HIERADATA_OVERRIDE':'quickstart-hieradata-overrides.yaml',
  110. 'UNDERCLOUD_NEUTRON_PASSWORD':'4bde341a0b0183b0b7d40d71a9f4f7d78b62f163',
  111. 'ENABLE_ZAQAR':'True',
  112. 'SSH_CLIENT':'192.168.23.1 37621 22',
  113. 'UNDERCLOUD_ENDPOINT_MISTRAL_ADMIN':'http://192.168.24.1:8989/v2',
  114. 'LOGNAME':'root',
  115. 'UNDERCLOUD_CEILOMETER_PASSWORD':'457c7fb371fe0228e41484de9b77d7515146c3c1',
  116. 'PATH':'/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/tmp/tmp0o4uKR/bin',
  117. 'UNDERCLOUD_ENDPOINT_SWIFT_PUBLIC':'https://192.168.24.2:13808/v1/AUTH_%(tenant_id)s',
  118. 'INSPECTION_IPRANGE':'192.168.24.100,192.168.24.120',
  119. 'GUESTFISH_RESTORE':'\\e[0m',
  120. 'MEMBER_ROLE_EXISTS':'False',
  121. 'UNDERCLOUD_ENDPOINT_ZAQAR_PUBLIC':'https://192.168.24.2:13888',
  122. 'TERM':'screen',
  123. 'ENABLE_TEMPEST':'True',
  124. 'ARCH':'amd64',
  125. 'IMAGE_ELEMENT':u'element-manifest enable-packages-install hiera install-types manifests os-apply-config os-refresh-config puppet-modules puppet-stack-config source-repositories undercloud-install',
  126. 'UNDERCLOUD_ZAQAR_PASSWORD':'a563879e04e18c7c4cf3f2b4e66637b1d84b9e10',
  127. 'DIB_ARGS':"['/bin/instack', '-p', '/usr/share/tripleo-puppet-elements:/usr/share/instack-undercloud:/usr/share/tripleo-image-elements:/usr/share/diskimage-builder/elements', '-j', '/usr/share/instack-undercloud/json-files/centos-7-undercloud-packages.json']",
  128. 'UNDERCLOUD_AODH_PASSWORD':'9b4aacbb5ea53d59946e22152e4296e9e157fb8b',
  129. 'UNDERCLOUD_ADMIN_TOKEN':'f4d890602dc406c76cf3c156f3a8c374a2028b8b',
  130. 'UNDERCLOUD_ENDPOINT_ZAQAR_WEBSOCKET_PUBLIC':'wss://192.168.24.2:9000',
  131. 'UNDERCLOUD_CEILOMETER_SNMPD_USER':'ro_snmp_user',
  132. 'GUESTFISH_PS1':'\\[\\e[1;32m\\]><fs>\\[\\e[0;31m\\] ',
  133. 'UNDERCLOUD_SWIFT_PASSWORD':'6646c8abbc69900be43ad9aeb2fb9bcde084b83c',
  134. 'UNDERCLOUD_ENDPOINT_GLANCE_PUBLIC':'https://192.168.24.2:13292',
  135. 'SUDO_UID':'1000',
  136. 'UNDERCLOUD_ENDPOINT_CEILOMETER_INTERNAL':'http://192.168.24.1:8777',
  137. 'TMP_HOOKS_PATH':'/tmp/tmp0o4uKR',
  138. 'UNDERCLOUD_ENDPOINT_NEUTRON_PUBLIC':'https://192.168.24.2:13696',
  139. 'UNDERCLOUD_HAPROXY_STATS_PASSWORD':'cfe22a516eb260a515368b42ecdafd0c31a4eab0',
  140. 'SUDO_COMMAND':'/bin/instack -p /usr/share/tripleo-puppet-elements:/usr/share/instack-undercloud:/usr/share/tripleo-image-elements:/usr/share/diskimage-builder/elements -j /usr/share/instack-undercloud/json-files/centos-7-undercloud-packages.json',
  141. 'UNDERCLOUD_GLANCE_PASSWORD':'432b0417d7e43907e9df98fae3b509306932275c',
  142. 'UNDERCLOUD_RABBIT_PASSWORD':'3f63076c9b2ec748d7021311acc0a4fcfcbf1b30',
  143. 'UNDERCLOUD_MISTRAL_PASSWORD':'a4e093153909d0d57c627e3b3b704c286fee2fa0',
  144. 'UNDERCLOUD_NOVA_PASSWORD':'54fca7b5d7905511604f69de11d67d4144bb669f',
  145. 'NETWORK_CIDR':'192.168.24.0/24',
  146. 'HISTCONTROL':'ignoredups',
  147. 'PWD':'/home/stack',
  148. 'UNDERCLOUD_PUBLIC_VIP':'192.168.24.2',
  149. 'INSPECTION_EXTRAS':'True',
  150. 'UNDERCLOUD_HEAT_ENCRYPTION_KEY':'9f0926190c3bd6c45203bb645af27039',
  151. 'UNDERCLOUD_HOSTNAME':'None',
  152. 'UNDERCLOUD_RABBIT_USERNAME':'44422a8e431da7e68defea8712790cf69bca46b1'
  153. }

附录2

os-apply-config使用的metadata配置文件示例:

  1. {
  2. "hiera": {
  3. "hierarchy": [
  4. "quickstart-hieradata-overrides",
  5. "\"%{::operatingsystem}\"",
  6. "\"%{::osfamily}\"",
  7. "puppet-stack-config"
  8. ]},
  9. "local-ip": "192.168.24.1",
  10. "masquerade_networks": ["192.168.24.0/24"],
  11. "service_certificate": "/etc/pki/tls/certs/undercloud-192.168.24.2.pem",
  12. "public_vip": "192.168.24.2",
  13. "neutron": {
  14. "dhcp_start": "192.168.24.5",
  15. "dhcp_end": "192.168.24.30",
  16. "network_cidr": "192.168.24.0/24",
  17. "network_gateway": "192.168.24.1"
  18. },
  19. "inspection": {
  20. "interface": "",
  21. "iprange": "",
  22. "runbench": ""
  23. },
  24. "os_net_config": {
  25. "network_config": [
  26. {
  27. "type": "ovs_bridge",
  28. "name": "br-ctlplane",
  29. "ovs_extra": [
  30. "br-set-external-id br-ctlplane bridge-id br-ctlplane"
  31. ],
  32. "members": [
  33. {
  34. "type": "interface",
  35. "name": "eth1",
  36. "primary": "true",
  37. "mtu": 1500
  38. }
  39. ],
  40. "addresses": [
  41. {
  42. "ip_netmask": "192.168.24.1/24"
  43. }
  44. ],
  45. "mtu": 1500
  46. }
  47. ]
  48. },
  49. "keystone": {
  50. "host": "192.168.24.1"
  51. },
  52. "ironic": {
  53. "service-password": "7558a0701f802a84faa625e0bc563170a97aa6cb"
  54. },
  55. "bootstrap_host": {
  56. "bootstrap_nodeid": "undercloud",
  57. "nodeid": "undercloud"
  58. }
  59. }

附录3

instack-undercloud中使用到的elements以及其中hook和脚本示例:

  1. * install-types(diskimage-builder)
  2. * extra-data.d
  3. * 99-enable-install-types
  4. * The base element enables the chosen install type by symlinking the correct hook scripts under install.d directly
  5. * element-manifest(diskimage-builder)
  6. * extra-data.d
  7. * 75-inject-element-manifest
  8. * manifests(diskimage-builder)
  9. * extra-data.d
  10. * 20-manifest-dir
  11. * environment.d
  12. * 14-manifests
  13. * cleanup.d
  14. * 01-copy-manifests-dir
  15. * source-repositories(diskimage-builder)
  16. * extra-data.d
  17. * 98-source-repositories
  18. * puppet-modules(tripleo-puppet-elements)
  19. * install.d/
  20. * puppet-modules-package-install/
  21. * 75-puppet-modules-package
  22. * puppet-modules-source-install/
  23. * 75-puppet-modules-source
  24. * 根据install_type会将对应目录下的脚本linkinstall.d目录下
  25. * environment.d/
  26. * 01-puppet-module-pins.sh
  27. * 02-puppet-modules-install-types.sh
  28. * source-repository-puppet-modules
  29. * hiera(tripleo-puppet-elements)
  30. * 10-hiera-disable
  31. * 40-hiera-datafiles
  32. * install.d/
  33. * 10-hiera-yaml-symlink
  34. * 11-hiera-orc-install
  35. * os-apply-config/
  36. * etc/puppet/hiera.yaml
  37. * enable-packages-install(tripleo-image-elements)
  38. * environment.d/
  39. * 01-export-install-types.bash
  40. * os-apply-config(tripleo-image-elements)
  41. * environment.d/
  42. * 10-os-apply-config-venv-dir.bash
  43. * install.d/
  44. * 11-create-template-root
  45. * 99-install-config-templates
  46. * os-apply-config-source-install/
  47. * 10-os-apply-config
  48. * os-refresh-config/
  49. * configure.d/
  50. * 20-os-apply-config
  51. * os-refresh-config(tripleo-image-elements)
  52. * install.d/
  53. * 99-os-refresh-config-install-scripts
  54. * os-refresh-config-source-install/
  55. * 10-os-refresh-config
  56. * os-refresh-config/
  57. * post-configure.d/
  58. * 99-refresh-completed
  59. * undercloud-install(instack-undercloud)
  60. * os-apply-config/
  61. * etc/
  62. * root/
  63. * var/
  64. * os-refresh-config/
  65. * configure.d/
  66. * 30-reload-keepalived
  67. * post-configure.d/
  68. * 80-seedstack-masquerade
  69. * 98-undercloud-setup
  70. * puppet-stack-config(instack-undercloud)
  71. * extra-data.d/
  72. * 10-install-git
  73. * install.d/
  74. * 02-puppet-stack-config
  75. * 10-puppet-stack-config-puppet-module
  76. * os-apply-config/
  77. * etc/
  78. * os-refresh-config/
  79. * configure.d/
  80. * 50-puppet-stack-config
  81. * post-configure.d/
  82. * 10-iptables

附录4

instack-undercloud中使用到的elements以及其中hook和脚本,在instack中被合并之后的示例:

  1. cleanup.d/
  2. 01-copy-manifests-dir*
  3. environment.d/
  4. 01-export-install-types.bash
  5. 02-puppet-modules-install-types.sh
  6. 10-os-apply-config-venv-dir.bash
  7. 14-manifests
  8. extra-data.d/
  9. 10-install-git*
  10. 20-manifest-dir*
  11. 75-inject-element-manifest*
  12. 98-source-repositories*
  13. 99-enable-install-types*
  14. install.d/
  15. os-apply-config-source-install/
  16. 10-os-apply-config*
  17. os-refresh-config-source-install/
  18. 10-os-refresh-config*
  19. puppet-modules-package-install/
  20. 75-puppet-modules-package*
  21. puppet-modules-source-install/
  22. 75-puppet-modules-source*
  23. 02-puppet-stack-config*
  24. 10-hiera-yaml-symlink*
  25. 10-puppet-stack-config-puppet-module*
  26. 11-create-template-root*
  27. 99-install-config-templates*
  28. 99-os-refresh-config-install-scripts*
  29. package-installs-hiera