yiorgos

redash-deployment.m4

Jan 26th, 2021
265
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. divert(-1)
  2. define(redash_environment, `
  3. - name: PYTHONUNBUFFERED
  4. value: "0"
  5. - name: REDASH_REDIS_URL
  6. value: "redis://127.0.0.1:6379/0"
  7. - name: REDASH_MAIL_USERNAME
  8. value: "redash"
  9. - name: REDASH_MAIL_USE_TLS
  10. value: "true"
  11. - name: REDASH_MAIL_USE_SSL
  12. value: "false"
  13. - name: REDASH_MAIL_SERVER
  14. value: "mail.example.net"
  15. - name: REDASH_MAIL_PORT
  16. value: "587"
  17. - name: REDASH_MAIL_PASSWORD
  18. value: "password"
  19. - name: REDASH_MAIL_DEFAULT_SENDER
  20. value: "redash@mail.example.net"
  21. - name: REDASH_LOG_LEVEL
  22. value: "INFO"
  23. - name: REDASH_DATABASE_URL
  24. value: "postgresql://redash:redash@127.0.0.1:5432/redash"
  25. - name: REDASH_COOKIE_SECRET
  26. value: "not-so-secret"
  27. - name: REDASH_ADDITIONAL_QUERY_RUNNERS
  28. value: "redash.query_runner.python"
  29. ')
  30.  
  31. divert(0)
  32. ---
  33. apiVersion: apps/v1
  34. kind: Deployment
  35. metadata:
  36. name: redash
  37. labels:
  38. app: redash
  39. spec:
  40. replicas: 1
  41. selector:
  42. matchLabels:
  43. app: redash
  44. strategy:
  45. rollingUpdate:
  46. maxSurge: 0
  47. maxUnavailable: 1
  48. type: RollingUpdate
  49. template:
  50. metadata:
  51. labels:
  52. app: redash
  53. spec:
  54. containers:
  55. - name: redis
  56. image: redis
  57. ports:
  58. - name: redis
  59. containerPort: 6379
  60. - name: postgres
  61. image: postgres:11
  62. env:
  63. - name: POSTGRES_USER
  64. value: redash
  65. - name: POSTGRES_PASSWORD
  66. value: redash
  67. - name: POSTGRES_DB
  68. value: redash
  69. ports:
  70. - name: postgres
  71. containerPort: 5432
  72. - name: server
  73. image: redash/redash
  74. args: [ "server" ]
  75. env:
  76. - name: REDASH_WEB_WORKERS
  77. value: "2"
  78. redash_environment
  79. ports:
  80. - name: redash
  81. containerPort: 5000
  82. - name: scheduler
  83. image: redash/redash
  84. args: [ "scheduler" ]
  85. env:
  86. - name: QUEUES
  87. value: "celery"
  88. - name: WORKERS_COUNT
  89. value: "1"
  90. redash_environment
  91. - name: schedulded-worker
  92. image: redash/redash
  93. args: [ "worker" ]
  94. env:
  95. - name: QUEUES
  96. value: "scheduled_queries,schemas"
  97. - name: WORKERS_COUNT
  98. value: "1"
  99. - name: adhoc-worker
  100. image: redash/redash
  101. args: [ "worker" ]
  102. env:
  103. - name: QUEUES
  104. value: "queries"
  105. - name: WORKERS_COUNT
  106. value: "1"
  107. redash_environment
  108. ---
  109. apiVersion: v1
  110. kind: Service
  111. metadata:
  112. name: redash-nodeport
  113. spec:
  114. type: NodePort
  115. selector:
  116. app: redash
  117. ports:
  118. - port: 5000
  119. targetPort: 5000
RAW Paste Data