From 8459f2b0645620baa4778e5962f1cecdc6ee572e Mon Sep 17 00:00:00 2001 From: Jeffrey Sica Date: Fri, 21 Jul 2017 14:10:36 -0400 Subject: [PATCH] mixed up copied files --- .../keepalived/0/1/docker-compose.yml | 37 ----------------- .../keepalived/0/1/rancher-compose.yml | 40 ------------------- .../keepalived/0/docker-compose.yml | 4 +- .../keepalived/0/rancher-compose.yml | 32 +++++++++++---- 4 files changed, 27 insertions(+), 86 deletions(-) delete mode 100755 infra-templates/keepalived/0/1/docker-compose.yml delete mode 100755 infra-templates/keepalived/0/1/rancher-compose.yml diff --git a/infra-templates/keepalived/0/1/docker-compose.yml b/infra-templates/keepalived/0/1/docker-compose.yml deleted file mode 100755 index e110845..0000000 --- a/infra-templates/keepalived/0/1/docker-compose.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: '2' -services: - keepalived-master: - restart: always - image: arcts/keepalived - network_mode: host - cap_add: - - NET_ADMIN - environment: - KEEPALIVED_AUTOCONF: true - KEEPALIVED_STATE: MASTER - KEEPALIVED_INTERFACE: eth0 - KEEPALIVED_VIRTUAL_ROUTER_ID: 2 - KEEPALIVED_UNICAST_SRC_IP: ${master_ip} - KEEPALIVED_UNICAST_PEER_0: ${backup_ip} - KEEPALIVED_TRACK_INTERFACE_1: eth0 - KEEPALIVED_VIRTUAL_IPADDRESS_1: "\"${virtual_ip}\"" - labels: - io.rancher.scheduler.affinity:host_label: ${host_label}=${master_host_label} - - keepalived-backup: - restart: always - image: arcts/keepalived - network_mode: host - cap_add: - - NET_ADMIN - environment: - KEEPALIVED_AUTOCONF: true - KEEPALIVED_STATE: BACKUP - KEEPALIVED_INTERFACE: eth0 - KEEPALIVED_VIRTUAL_ROUTER_ID: 2 - KEEPALIVED_UNICAST_SRC_IP: ${backup_ip} - KEEPALIVED_UNICAST_PEER_0: ${master_ip} - KEEPALIVED_TRACK_INTERFACE_1: eth0 - KEEPALIVED_VIRTUAL_IPADDRESS_1: "\"${virtual_ip}\"" - labels: - io.rancher.scheduler.affinity:host_label: ${host_label}=${backup_host_label} diff --git a/infra-templates/keepalived/0/1/rancher-compose.yml b/infra-templates/keepalived/0/1/rancher-compose.yml deleted file mode 100755 index bd13ebc..0000000 --- a/infra-templates/keepalived/0/1/rancher-compose.yml +++ /dev/null @@ -1,40 +0,0 @@ -.catalog: - name: "keepalived" - version: v1.0.0 - description: "Autostart Keepalived (ONLY IF YOU KNOW WHAT YOU'RE DOING)" - minimum_rancher_version: v0.46.0 - uuid: keepalived:v1.0.0 - questions: - - variable: host_label - label: "Keepalived Host Label" - description: "Host Label used to schedule keepalived master and backup instances" - type: "string" - default: "edge" - required: true - - variable: master_host_label - label: "Master Host Label" - description: "The value of the Keepalived Host Label to signifify the master instance" - type: "string" - default: "MASTER" - required: true - - variable: backup_host_label - label: "Backup Host Label" - description: "The value of the Keepalived Host Label to signifify the backup instance" - type: "string" - default: "BACKUP" - required: true - - variable: master_ip - description: "Host IP of master edge node" - label: "Master IP" - type: "string" - required: true - - variable: backup_ip - description: "Host IP of backup edge node" - label: "Backup IP" - type: "string" - required: true - - variable: virtual_ip - label: "Virtual IP" - description: "Virtual IP to be created." - type: "string" - required: true diff --git a/infra-templates/keepalived/0/docker-compose.yml b/infra-templates/keepalived/0/docker-compose.yml index 837b46f..e110845 100755 --- a/infra-templates/keepalived/0/docker-compose.yml +++ b/infra-templates/keepalived/0/docker-compose.yml @@ -16,7 +16,7 @@ services: KEEPALIVED_TRACK_INTERFACE_1: eth0 KEEPALIVED_VIRTUAL_IPADDRESS_1: "\"${virtual_ip}\"" labels: - io.rancher.scheduler.affinity:host_label: edge=master + io.rancher.scheduler.affinity:host_label: ${host_label}=${master_host_label} keepalived-backup: restart: always @@ -34,4 +34,4 @@ services: KEEPALIVED_TRACK_INTERFACE_1: eth0 KEEPALIVED_VIRTUAL_IPADDRESS_1: "\"${virtual_ip}\"" labels: - io.rancher.scheduler.affinity:host_label: edge=backup + io.rancher.scheduler.affinity:host_label: ${host_label}=${backup_host_label} diff --git a/infra-templates/keepalived/0/rancher-compose.yml b/infra-templates/keepalived/0/rancher-compose.yml index ebdf5ef..bd13ebc 100755 --- a/infra-templates/keepalived/0/rancher-compose.yml +++ b/infra-templates/keepalived/0/rancher-compose.yml @@ -1,22 +1,40 @@ .catalog: name: "keepalived" - version: v0.2.0 + version: v1.0.0 description: "Autostart Keepalived (ONLY IF YOU KNOW WHAT YOU'RE DOING)" minimum_rancher_version: v0.46.0 - uuid: keepalived:v0.2.0 + uuid: keepalived:v1.0.0 questions: - - variable: virtual_ip - label: "Virtual IP" - description: "Virtual IP in ip command format" + - variable: host_label + label: "Keepalived Host Label" + description: "Host Label used to schedule keepalived master and backup instances" type: "string" + default: "edge" + required: true + - variable: master_host_label + label: "Master Host Label" + description: "The value of the Keepalived Host Label to signifify the master instance" + type: "string" + default: "MASTER" + required: true + - variable: backup_host_label + label: "Backup Host Label" + description: "The value of the Keepalived Host Label to signifify the backup instance" + type: "string" + default: "BACKUP" required: true - variable: master_ip - description: "IP of master edge node" + description: "Host IP of master edge node" label: "Master IP" type: "string" required: true - variable: backup_ip - description: "IP of backup edge node" + description: "Host IP of backup edge node" label: "Backup IP" type: "string" required: true + - variable: virtual_ip + label: "Virtual IP" + description: "Virtual IP to be created." + type: "string" + required: true