diff options
Diffstat (limited to 'kube2consul/src/main')
-rw-r--r-- | kube2consul/src/main/blueprint/deploy.yml | 8 | ||||
-rw-r--r-- | kube2consul/src/main/blueprint/list_of_servicelet.list | 4 | ||||
-rw-r--r-- | kube2consul/src/main/blueprint/task.yml | 118 | ||||
-rw-r--r-- | kube2consul/src/main/blueprint/vars.yml | 14 | ||||
-rw-r--r-- | kube2consul/src/main/docker/Dockerfile | 11 | ||||
-rw-r--r-- | kube2consul/src/main/docker/start.sh | 36 |
6 files changed, 0 insertions, 191 deletions
diff --git a/kube2consul/src/main/blueprint/deploy.yml b/kube2consul/src/main/blueprint/deploy.yml deleted file mode 100644 index cc61076..0000000 --- a/kube2consul/src/main/blueprint/deploy.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- remote_user: ubuntu - become: yes - become_method: sudo - vars_files: - - vars.yml - tasks: - - include: task.yml diff --git a/kube2consul/src/main/blueprint/list_of_servicelet.list b/kube2consul/src/main/blueprint/list_of_servicelet.list deleted file mode 100644 index 77a1d4f..0000000 --- a/kube2consul/src/main/blueprint/list_of_servicelet.list +++ /dev/null @@ -1,4 +0,0 @@ -{
- "servicelet_module":[
- ]
-}
\ No newline at end of file diff --git a/kube2consul/src/main/blueprint/task.yml b/kube2consul/src/main/blueprint/task.yml deleted file mode 100644 index 45cfcd9..0000000 --- a/kube2consul/src/main/blueprint/task.yml +++ /dev/null @@ -1,118 +0,0 @@ ---- -- name: remove kube2consul container - docker: - name: kube2consul - image: "{{kube2consul_image}}" - state: absent - -- name: run kube2consul container - docker: - name: kube2consul - image: "{{kube2consul_image}}" - log_driver: syslog - net: host - restart_policy: always - volumes: - - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}" - env: - KUBE_MASTER_IP: "{{kube_master_ip}}" - PDM_CONTROLLER_IP: "{{pdm_controller_ip}}" - JOIN_IP: "{{consul_join_ip}}" - when: - - all_in_one == 'no' - - master_in_controller == 'no' - - cluster_type == 'k8s' - -- name: run kube2consul container - docker: - name: kube2consul - image: "{{kube2consul_image}}" - net: host - restart_policy: always - privileged: true - volumes: - - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}" - - "/root/.kube/config:/root/.kube/config:ro" - env: - KUBE_MASTER_IP: "{{kube_master_ip}}" - PDM_CONTROLLER_IP: "{{pdm_controller_ip}}" - JOIN_IP: "{{consul_join_ip}}" - CLUSTER_TYPE: "openshift" - when: - - all_in_one == 'no' - - master_in_controller == 'no' - - cluster_type == 'openshift' - -- name: run kube2consul container - docker: - name: kube2consul - image: "{{kube2consul_image}}" - log_driver: syslog - restart_policy: always - volumes: - - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}" - env: - KUBE_MASTER_IP: "{{kube_master_ip}}" - PDM_CONTROLLER_IP: "{{pdm_controller_ip}}" - JOIN_IP: "{{consul_join_ip}}" - ALL_IN_ONE: "yes" - when: - - all_in_one == 'yes' - - cluster_type == 'k8s' - -- name: run kube2consul container - docker: - name: kube2consul - image: "{{kube2consul_image}}" - log_driver: syslog - restart_policy: always - privileged: true - volumes: - - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}" - - "/root/.kube/config:/root/.kube/config:ro" - env: - KUBE_MASTER_IP: "{{kube_master_ip}}" - PDM_CONTROLLER_IP: "{{pdm_controller_ip}}" - JOIN_IP: "{{consul_join_ip}}" - ALL_IN_ONE: "yes" - CLUSTER_TYPE: "openshift" - when: - - all_in_one == 'yes' - - cluster_type == 'openshift' - -- name: run kube2consul container - docker: - name: kube2consul - image: "{{kube2consul_image}}" - log_driver: syslog - restart_policy: always - volumes: - - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}" - env: - KUBE_MASTER_IP: "{{kube_master_ip}}" - PDM_CONTROLLER_IP: "{{pdm_controller_ip}}" - JOIN_IP: "{{consul_join_ip}}" - ALL_IN_ONE: "yes" - when: - - master_in_controller == 'yes' - - cluster_type == 'k8s' - -- name: run kube2consul container - docker: - name: kube2consul - image: "{{kube2consul_image}}" - log_driver: syslog - restart_policy: always - privileged: true - volumes: - - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}" - - "/root/.kube/config:/root/.kube/config:ro" - env: - KUBE_MASTER_IP: "{{kube_master_ip}}" - PDM_CONTROLLER_IP: "{{pdm_controller_ip}}" - JOIN_IP: "{{consul_join_ip}}" - ALL_IN_ONE: "yes" - CLUSTER_TYPE: "openshift" - when: - - master_in_controller == 'yes' - - cluster_type == 'openshift'
\ No newline at end of file diff --git a/kube2consul/src/main/blueprint/vars.yml b/kube2consul/src/main/blueprint/vars.yml deleted file mode 100644 index 971438d..0000000 --- a/kube2consul/src/main/blueprint/vars.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- api_network_ip: -- man_network_ip: -- registry_url: -- cp_vertype: -- cp_type: -- cp_name: -- cp_version: -- kube2consul_image: "{{registry_url}}/{{cp_type}}/{{cp_name}}:{{cp_version}}" -- kube_master_ip: "{{ hostvars[inventory_hostname]['api_network_ip'] }}" -- pdm_controller_ip: "{{vp_ip}}" -- consul_join_ip: "{{zenap_msb_consul_server_ip}}" -- kube2consul_data_host: "/home/zenap-msb/consul_data/kube2consul_{{kube_master_ip}}" -- kube2consul_data_container: "/consul-works/data-dir"
\ No newline at end of file diff --git a/kube2consul/src/main/docker/Dockerfile b/kube2consul/src/main/docker/Dockerfile deleted file mode 100644 index 278cac5..0000000 --- a/kube2consul/src/main/docker/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM alpine:3.3
-ENV CONSUL_VERSION 0.7.1
-ENV BASE /
-ADD consul-linux_amd64.tar.gz /
-RUN cd /usr/lib \
- && ln -s /consul/libglib-2.0.so.0.4400.0 libglib-2.0.so.0 \
- && ln -s /consul/libintl.so.8.1.3 libintl.so.8
-COPY kube2consul /bin/
-COPY start.sh /
-
-ENTRYPOINT exec /start.sh
\ No newline at end of file diff --git a/kube2consul/src/main/docker/start.sh b/kube2consul/src/main/docker/start.sh deleted file mode 100644 index 033c50b..0000000 --- a/kube2consul/src/main/docker/start.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -if [ -z "${KUBE_MASTER_IP}" ]; then - echo "kube master node ip is required." - exit 1 -fi - -if [ -n "${JOIN_IP}" ]; then - echo "### Starting consul client" - if [ -z "${ALL_IN_ONE}" ]; then - /consul/consul agent -data-dir /consul-works/data-dir -node kube2consul_${KUBE_MASTER_IP} -bind ${KUBE_MASTER_IP} -client 0.0.0.0 -retry-join ${JOIN_IP} -retry-interval 5s & - else - /consul/consul agent -data-dir /consul-works/data-dir -node kube2consul_${KUBE_MASTER_IP} -bind 0.0.0.0 -client 0.0.0.0 -retry-join ${JOIN_IP} -retry-interval 5s & - fi -fi - -if [ -z "${RUN_MODE}" ]; then - echo "non-HA scenario." -else - echo "\n\n### Starting consul agent" - cd ./consul - ./entry.sh & -fi - -kube_url="http://${KUBE_MASTER_IP}:8080" - -if [ "${CLUSTER_TYPE}" == "openshift" ]; then - kube_url="https://${KUBE_MASTER_IP}:8443" -fi - -echo "\n\n### Starting kube2consul" -if [ -z "${PDM_CONTROLLER_IP}" ]; then - /bin/kube2consul --kube_master_url ${kube_url} -else - echo "in Paas mode." - /bin/kube2consul --kube_master_url ${kube_url} --pdm_controller_url http://${PDM_CONTROLLER_IP}:9527 -fi
\ No newline at end of file |