{"action":"opened","issue":{"url":"https://api.github.com/repos/openshift/origin-aggregated-logging/issues/1251","repository_url":"https://api.github.com/repos/openshift/origin-aggregated-logging","labels_url":"https://api.github.com/repos/openshift/origin-aggregated-logging/issues/1251/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin-aggregated-logging/issues/1251/comments","events_url":"https://api.github.com/repos/openshift/origin-aggregated-logging/issues/1251/events","html_url":"https://github.com/openshift/origin-aggregated-logging/issues/1251","id":342844712,"node_id":"MDU6SXNzdWUzNDI4NDQ3MTI=","number":1251,"title":"Cluster initialization and modifications proposal","user":{"login":"jcantrill","id":4548408,"node_id":"MDQ6VXNlcjQ1NDg0MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/4548408?v=4","gravatar_id":"","url":"https://api.github.com/users/jcantrill","html_url":"https://github.com/jcantrill","followers_url":"https://api.github.com/users/jcantrill/followers","following_url":"https://api.github.com/users/jcantrill/following{/other_user}","gists_url":"https://api.github.com/users/jcantrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jcantrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcantrill/subscriptions","organizations_url":"https://api.github.com/users/jcantrill/orgs","repos_url":"https://api.github.com/users/jcantrill/repos","events_url":"https://api.github.com/users/jcantrill/events{/privacy}","received_events_url":"https://api.github.com/users/jcantrill/received_events","type":"User","site_admin":false},"labels":[{"id":260296580,"node_id":"MDU6TGFiZWwyNjAyOTY1ODA=","url":"https://api.github.com/repos/openshift/origin-aggregated-logging/labels/kind/enhancement","name":"kind/enhancement","color":"84b6eb","default":false},{"id":260296583,"node_id":"MDU6TGFiZWwyNjAyOTY1ODM=","url":"https://api.github.com/repos/openshift/origin-aggregated-logging/labels/kind/question","name":"kind/question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-19T18:42:08Z","updated_at":"2018-07-19T18:42:08Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"# Overview\r\nInitialization of the ES cluster is currently executed by the run script by backgrounding a process which is contrary to recommendations for running containers.  Kubernetes does not offer (AFAIK) a way to run post initialization outside of using something like a Job.  In anticipation of the introduction of operators, this proposal identifies how we may modify and structure the initialization and migration tasks so they could be executed by something like a Job or the operator.  It would move us more in line with the original deployer which allows us to add version the initialization and migration tasks within our elasticsearch image.\r\n\r\n# Proposal\r\n* Create directories specifically for initialization tasks and migration tasks\r\n* Add an `init` (or `cluster-init`) and `migrate` entrypoints\r\n## Directory Structure\r\nEach directory includes the scripts needed to perform the init or migrate tasks:\r\n* prefixed with a 4 digit number to identify the order in which they are executed\r\n* indempotent\r\n```\r\n/etc/elasticsearch\r\n  |- init/\r\n     |- 0001-seed-acl\r\n     |- 0010-seed-index-templates\r\n  |-migrate/\r\n    |- 0100-clean-kibana-index-patterns\r\n    |- 0150-remove-old-searchguard-indices\r\n```\r\n## Entry points\r\n```\r\n${HOME}/init\r\n\r\n  #!/bin/bash\r\n  source logging\r\n  for file in $(/etc/elasticsearch/init/*); do\r\n     if [ -f $file ] ; then\r\n       $(\"./${file}\")\r\n     fi  \r\n  done\r\n\r\n${HOME}/migrate\r\n```\r\n## run.sh\r\nInitially, modify the `run.sh` script to background the `init` and `migrate` scripts"}}
{"actor":{"display_login":"jcantrill"}}