diff --git a/templates/etcd-ha/6/README.md b/templates/etcd-ha/6/README.md new file mode 100644 index 0000000..3752469 --- /dev/null +++ b/templates/etcd-ha/6/README.md @@ -0,0 +1,27 @@ +## Etcd v2.3.7 Persistent + +### Upgrade WARNING + +Automated upgrading to this version is only supported from `2.3.7-beta.1`. If you are on a previous version, please upgrade to `2.3.7-beta.1` before upgrading to this version. It is recommended you perform a manual backup before continuing. + +### Backup Configuration + +Backups are enabled/disabled via the `Enable Backups` radio buttons. + +The backup period durations must be a sequence of decimal numbers, each with optional fraction and a unit suffix, such as `300ms`, `1.5h` or `2h45m`. Valid time units are `ns`, `us` or `µs`, `ms`, `s`, `m` and `h`. + +The `Backup Creation Period` duration indicates at what rate backups should be created. It is not recommended to create backups more often than `30s`. + +The `Backup Retention Period` duration indicates at what rate historical backups should be deleted. Backups outside of the retention period are expired after the next successful backup. + +The maximum number of backups stored on disk at any given moment follows the equation `ceiling(retention period / creation period)`. For example, `5m` creation period with `4h` retention period would store at most `ceiling(4h / 5m)` backups or `48` backups. A conservative estimate for backup size is `50MB`, so the attached network storage should have at least `2.4GB` free space. Backup sizes will vary depending on usage. + +If backups are disabled, the values for `Backup Creation Period` and `Backup Retention Period` are ignored. + +### Disaster Recovery + +See [this wiki](https://github.com/rancher/rancher/wiki/Kubernetes-Management#disaster-recovery) for instructions. + +### Restoring Backups + +See [this wiki](https://github.com/rancher/rancher/wiki/Kubernetes-Management#restoring-backups) for instructions. diff --git a/templates/etcd-ha/6/docker-compose.yml b/templates/etcd-ha/6/docker-compose.yml new file mode 100644 index 0000000..319045b --- /dev/null +++ b/templates/etcd-ha/6/docker-compose.yml @@ -0,0 +1,24 @@ +etcd: + image: rancher/etcd:v2.3.7-11 + labels: + io.rancher.scheduler.affinity:host_label_soft: etcd=true + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.sidekicks: data + environment: + RANCHER_DEBUG: '${RANCHER_DEBUG}' + EMBEDDED_BACKUPS: '${EMBEDDED_BACKUPS}' + BACKUP_PERIOD: '${BACKUP_PERIOD}' + BACKUP_RETENTION: '${BACKUP_RETENTION}' + volumes: + - etcd:/pdata + - ${BACKUP_LOCATION}:/data-backup + volumes_from: + - data +data: + image: busybox + command: /bin/true + net: none + volumes: + - /data + labels: + io.rancher.container.start_once: 'true' diff --git a/templates/etcd-ha/6/rancher-compose.yml b/templates/etcd-ha/6/rancher-compose.yml new file mode 100644 index 0000000..03cba97 --- /dev/null +++ b/templates/etcd-ha/6/rancher-compose.yml @@ -0,0 +1,50 @@ +.catalog: + version: 2.3.7-build.11 + minimum_rancher_version: v1.2.0 + questions: + - variable: SCALE + description: Desired cluster size. 3, 5, or 7 are good choices. You will need this many hosts to reach your desired scale. + label: Number of Nodes + required: true + default: 3 + type: int + - variable: EMBEDDED_BACKUPS + label: Enable Backups + description: "Periodically backup state to the host filesystem." + required: true + default: true + type: boolean + - variable: BACKUP_LOCATION + label: Backup Host Location + description: "Location for state to be backed up to on the host. Mount network storage here on all hosts before continuing" + required: true + default: /var/etcd/backups + type: string + - variable: BACKUP_PERIOD + label: Backup Creation Period + description: Create a backup after this amount of time passes. Must conform to duration format + required: true + default: 15m0s + type: string + - variable: BACKUP_RETENTION + label: Backup Retention Period + description: Expire a backup after this amount of time passes. Must conform to duration format + required: true + default: 24h + type: string + - variable: RANCHER_DEBUG + description: Enable or disable verbose logging + label: Debug + required: true + default: true + type: boolean +etcd: + scale: ${SCALE} + retain_ip: true + health_check: + port: 2378 + request_line: /health + interval: 5000 + response_timeout: 3000 + unhealthy_threshold: 2 + healthy_threshold: 2 diff --git a/templates/etcd-ha/config.yml b/templates/etcd-ha/config.yml index d434d0f..277318f 100644 --- a/templates/etcd-ha/config.yml +++ b/templates/etcd-ha/config.yml @@ -1,5 +1,5 @@ name: Etcd description: | A distributed key/value store that provides a reliable way to store data across a cluster of machines -version: 2.3.7-beta.2 +version: 2.3.7-11 category: Clustering