diff --git a/templates/etcd-ha/0/rancher-compose.yml b/templates/etcd-ha/0/rancher-compose.yml index 2e025c5..abec4b3 100644 --- a/templates/etcd-ha/0/rancher-compose.yml +++ b/templates/etcd-ha/0/rancher-compose.yml @@ -1,6 +1,8 @@ .catalog: name: "Etcd" version: "2.3.0-rancher1" + minimum_rancher_version: v1.1.1 + maximum_rancher_version: v1.1.4 description: | Distributed highly-available key-value store minimum_rancher_version: "v0.46.0" diff --git a/templates/etcd-ha/1/rancher-compose.yml b/templates/etcd-ha/1/rancher-compose.yml index 2dc38d4..480c813 100644 --- a/templates/etcd-ha/1/rancher-compose.yml +++ b/templates/etcd-ha/1/rancher-compose.yml @@ -1,6 +1,8 @@ .catalog: name: "Etcd" version: "2.3.3-rancher1" + minimum_rancher_version: v1.1.1 + maximum_rancher_version: v1.1.4 description: | Distributed highly-available key-value store minimum_rancher_version: "v0.46.0" diff --git a/templates/etcd-ha/2/rancher-compose.yml b/templates/etcd-ha/2/rancher-compose.yml index 3f2916c..d1f48f8 100644 --- a/templates/etcd-ha/2/rancher-compose.yml +++ b/templates/etcd-ha/2/rancher-compose.yml @@ -1,6 +1,8 @@ .catalog: name: "Etcd" version: "2.3.6-rancher1" + minimum_rancher_version: v1.1.1 + maximum_rancher_version: v1.1.4 description: | Distributed highly-available key-value store minimum_rancher_version: "v0.46.0" diff --git a/templates/etcd-ha/3/rancher-compose.yml b/templates/etcd-ha/3/rancher-compose.yml index d6496fa..e248af1 100644 --- a/templates/etcd-ha/3/rancher-compose.yml +++ b/templates/etcd-ha/3/rancher-compose.yml @@ -1,6 +1,7 @@ .catalog: version: 2.3.6-rancher4 minimum_rancher_version: v1.1.1 + maximum_rancher_version: v1.1.4 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. diff --git a/templates/etcd-ha/4/rancher-compose.yml b/templates/etcd-ha/4/rancher-compose.yml index 63c62f0..262d4d9 100644 --- a/templates/etcd-ha/4/rancher-compose.yml +++ b/templates/etcd-ha/4/rancher-compose.yml @@ -1,6 +1,7 @@ .catalog: version: 2.3.7 minimum_rancher_version: v1.1.1 + maximum_rancher_version: v1.1.4 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. diff --git a/templates/etcd-ha/5/README.md b/templates/etcd-ha/5/README.md new file mode 100644 index 0000000..0e8f122 --- /dev/null +++ b/templates/etcd-ha/5/README.md @@ -0,0 +1,27 @@ +## Etcd v2.3.7 Persistent + +### 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. + +### Upgrading to this Version: WARNING + +Automated upgrading to this version is unsupported. Please capture a snapshot of a node's data directory and follow backup restoration process if necessary. diff --git a/templates/etcd-ha/5/docker-compose.yml b/templates/etcd-ha/5/docker-compose.yml new file mode 100644 index 0000000..043fcd0 --- /dev/null +++ b/templates/etcd-ha/5/docker-compose.yml @@ -0,0 +1,13 @@ +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} + environment: + RANCHER_DEBUG: '${RANCHER_DEBUG}' + EMBEDDED_BACKUPS: '${EMBEDDED_BACKUPS}' + BACKUP_PERIOD: '${BACKUP_PERIOD}' + BACKUP_RETENTION: '${BACKUP_RETENTION}' + volumes: + - etcd:/pdata + - ${BACKUP_LOCATION}:/data-backup diff --git a/templates/etcd-ha/5/rancher-compose.yml b/templates/etcd-ha/5/rancher-compose.yml new file mode 100644 index 0000000..0c0e023 --- /dev/null +++ b/templates/etcd-ha/5/rancher-compose.yml @@ -0,0 +1,50 @@ +.catalog: + version: 2.3.7-rancher2 + 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 eeb3bc4..e8ba13c 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 +version: 2.3.7-rancher2 category: Clustering