Fuel CCP - Glance deployment
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

glance-api.yaml 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. dsl_version: 0.4.0
  2. service:
  3. name: glance-api
  4. ports:
  5. - {{ glance.api_port }}
  6. annotations:
  7. service:
  8. prometheus.io/probe: "true"
  9. prometheus.io/probe_path: "/healthcheck"
  10. containers:
  11. - name: glance-api
  12. image: glance-api
  13. pre:
  14. - name: glance-db-create
  15. dependencies:
  16. - database
  17. type: single
  18. command:
  19. mysql -u root -p{{ db.root_password }} -h {{ address("database") }} -e "create database {{ glance.db.name }};
  20. create user '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'
  21. {% if db.tls.enabled %} require ssl {% endif %};
  22. grant all privileges on {{ glance.db.name }}.* to '{{ glance.db.username }}'@'%' identified by '{{ glance.db.password }}'
  23. {% if db.tls.enabled %} require ssl {% endif %};"
  24. - name: glance-db-sync
  25. files:
  26. - glance-api
  27. dependencies:
  28. - glance-db-create
  29. type: single
  30. command: glance-manage db_sync
  31. - name: glance-user-create
  32. dependencies:
  33. - keystone-create-domain
  34. type: single
  35. command: openstack user create --domain {{ service_account.domain }} --password {{ glance.password }} {{ glance.user }}
  36. - name: glance-role-add
  37. dependencies:
  38. - glance-user-create
  39. type: single
  40. command: openstack role add --project {{ service_account.project }} --user {{ glance.user }} admin
  41. - name: glance-service-create
  42. dependencies:
  43. - keystone
  44. type: single
  45. command: openstack service create --name glance --description "OpenStack Image service" image
  46. - name: glance-public-endpoint-create
  47. dependencies:
  48. - glance-service-create
  49. type: single
  50. command: openstack endpoint create --region RegionOne image public {{ address('glance-api', glance.api_port, external=True, with_scheme=True) }}
  51. - name: glance-internal-endpoint-create
  52. dependencies:
  53. - glance-service-create
  54. type: single
  55. command: openstack endpoint create --region RegionOne image internal {{ address('glance-api', glance.api_port, with_scheme=True) }}
  56. - name: glance-admin-endpoint-create
  57. dependencies:
  58. - glance-service-create
  59. type: single
  60. command: openstack endpoint create --region RegionOne image admin {{ address('glance-api', glance.api_port, with_scheme=True) }}
  61. daemon:
  62. files:
  63. - glance-api
  64. # {% if glance.tls.enabled %}
  65. - ca_cert
  66. # {% endif %}
  67. # {% if glance.ceph.enable %}
  68. - ceph-conf
  69. - glance-ceph-key
  70. # {% endif %}
  71. # {% if glance.swift.enable %}
  72. - glance-swift-conf
  73. # {% endif %}
  74. command: glance-api
  75. dependencies:
  76. - memcached
  77. # {% if glance.bootstrap.enable %}
  78. post:
  79. - name: glance-cirros-image-upload
  80. type: single
  81. command: /opt/ccp/bin/glance-cirros-image-upload.sh
  82. files:
  83. - glance-cirros-image-upload.sh
  84. # {% endif %}
  85. # {% if glance.tls.enabled %}
  86. - name: nginx-glance-api
  87. image: nginx
  88. daemon:
  89. files:
  90. - upstreams
  91. - servers
  92. - server-cert
  93. - server-key
  94. command: nginx
  95. # {% endif %}
  96. files:
  97. glance-api:
  98. path: /etc/glance/glance-api.conf
  99. content: glance-api.conf.j2
  100. ceph-conf:
  101. path: /etc/ceph/ceph.conf
  102. content: ceph.conf.j2
  103. glance-ceph-key:
  104. path: /etc/ceph/ceph.client.{{ glance.ceph.username }}.keyring
  105. content: ceph.client.glance.keyring.j2
  106. glance-swift-conf:
  107. path: /etc/glance/glance-swift-store.conf
  108. content: glance-swift-store.conf.j2
  109. glance-cirros-image-upload.sh:
  110. path: /opt/ccp/bin/glance-cirros-image-upload.sh
  111. content: glance-cirros-image-upload.sh.j2
  112. perm: "500"
  113. # {% if glance.tls.enabled %}
  114. servers:
  115. path: /etc/nginx/conf.d/servers.conf
  116. content: nginx-api.conf.j2
  117. perm: "0400"
  118. upstreams:
  119. path: /etc/nginx/conf.d/upstreams.conf
  120. content: upstreams.conf.j2
  121. perm: "0400"
  122. ca_cert:
  123. path: /opt/ccp/etc/tls/ca.pem
  124. content: ca-cert.pem.j2
  125. server-cert:
  126. path: /opt/ccp/etc/tls/server-cert.pem
  127. content: server-cert.pem.j2
  128. perm: "0400"
  129. server-key:
  130. path: /opt/ccp/etc/tls/server-key.pem
  131. content: server-key.pem.j2
  132. perm: "0400"
  133. # {% endif %}