dancer.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "name": "dancer-example",
  6. "annotations": {
  7. "description": "An example Dancer application with no database",
  8. "tags": "instant-app,perl,dancer",
  9. "iconClass": "icon-perl"
  10. }
  11. },
  12. "labels": {
  13. "template": "dancer-example"
  14. },
  15. "objects": [
  16. {
  17. "kind": "Service",
  18. "apiVersion": "v1",
  19. "metadata": {
  20. "name": "dancer-example",
  21. "annotations": {
  22. "description": "Exposes and load balances the application pods"
  23. }
  24. },
  25. "spec": {
  26. "ports": [
  27. {
  28. "name": "web",
  29. "port": 8080,
  30. "targetPort": 8080
  31. }
  32. ],
  33. "selector": {
  34. "name": "dancer-example"
  35. }
  36. }
  37. },
  38. {
  39. "kind": "Route",
  40. "apiVersion": "v1",
  41. "metadata": {
  42. "name": "dancer-example"
  43. },
  44. "spec": {
  45. "host": "${APPLICATION_DOMAIN}",
  46. "to": {
  47. "kind": "Service",
  48. "name": "dancer-example"
  49. }
  50. }
  51. },
  52. {
  53. "kind": "ImageStream",
  54. "apiVersion": "v1",
  55. "metadata": {
  56. "name": "dancer-example",
  57. "annotations": {
  58. "description": "Keeps track of changes in the application image"
  59. }
  60. }
  61. },
  62. {
  63. "kind": "BuildConfig",
  64. "apiVersion": "v1",
  65. "metadata": {
  66. "name": "dancer-example",
  67. "annotations": {
  68. "description": "Defines how to build the application"
  69. }
  70. },
  71. "spec": {
  72. "source": {
  73. "type": "Git",
  74. "git": {
  75. "uri": "${SOURCE_REPOSITORY_URL}",
  76. "ref": "${SOURCE_REPOSITORY_REF}"
  77. },
  78. "contextDir": "${CONTEXT_DIR}"
  79. },
  80. "strategy": {
  81. "type": "Source",
  82. "sourceStrategy": {
  83. "from": {
  84. "kind": "ImageStreamTag",
  85. "namespace": "openshift",
  86. "name": "perl:5.16"
  87. }
  88. }
  89. },
  90. "output": {
  91. "to": {
  92. "kind": "ImageStreamTag",
  93. "name": "dancer-example:latest"
  94. }
  95. },
  96. "triggers": [
  97. {
  98. "type": "ImageChange"
  99. },
  100. {
  101. "type": "GitHub",
  102. "github": {
  103. "secret": "${GITHUB_WEBHOOK_SECRET}"
  104. }
  105. }
  106. ]
  107. }
  108. },
  109. {
  110. "kind": "DeploymentConfig",
  111. "apiVersion": "v1",
  112. "metadata": {
  113. "name": "dancer-example",
  114. "annotations": {
  115. "description": "Defines how to deploy the application server"
  116. }
  117. },
  118. "spec": {
  119. "strategy": {
  120. "type": "Rolling"
  121. },
  122. "triggers": [
  123. {
  124. "type": "ImageChange",
  125. "imageChangeParams": {
  126. "automatic": true,
  127. "containerNames": [
  128. "dancer-example"
  129. ],
  130. "from": {
  131. "kind": "ImageStreamTag",
  132. "name": "dancer-example:latest"
  133. }
  134. }
  135. },
  136. {
  137. "type": "ConfigChange"
  138. }
  139. ],
  140. "replicas": 1,
  141. "selector": {
  142. "name": "dancer-example"
  143. },
  144. "template": {
  145. "metadata": {
  146. "name": "dancer-example",
  147. "labels": {
  148. "name": "dancer-example"
  149. }
  150. },
  151. "spec": {
  152. "containers": [
  153. {
  154. "name": "dancer-example",
  155. "image": "dancer-example",
  156. "ports": [
  157. {
  158. "containerPort": 8080
  159. }
  160. ],
  161. "env": [
  162. {
  163. "name": "PERL_APACHE2_RELOAD",
  164. "value": "${PERL_APACHE2_RELOAD}"
  165. }
  166. ]
  167. }
  168. ]
  169. }
  170. }
  171. }
  172. }
  173. ],
  174. "parameters": [
  175. {
  176. "name": "SOURCE_REPOSITORY_URL",
  177. "description": "The URL of the repository with your application source code",
  178. "value": "https://github.com/openshift/dancer-ex.git"
  179. },
  180. {
  181. "name": "SOURCE_REPOSITORY_REF",
  182. "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
  183. },
  184. {
  185. "name": "CONTEXT_DIR",
  186. "description": "Set this to the relative path to your project if it is not in the root of your repository"
  187. },
  188. {
  189. "name": "APPLICATION_DOMAIN",
  190. "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.",
  191. "value": ""
  192. },
  193. {
  194. "name": "GITHUB_WEBHOOK_SECRET",
  195. "description": "A secret string used to configure the GitHub webhook",
  196. "generate": "expression",
  197. "from": "[a-zA-Z0-9]{40}"
  198. },
  199. {
  200. "name": "SECRET_KEY_BASE",
  201. "description": "Your secret key for verifying the integrity of signed cookies",
  202. "generate": "expression",
  203. "from": "[a-z0-9]{127}"
  204. },
  205. {
  206. "name": "PERL_APACHE2_RELOAD",
  207. "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules",
  208. "value": ""
  209. }
  210. ]
  211. }