Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

Commit

Permalink
Merge pull request #146 from goodrain/v3.7-patch11
Browse files Browse the repository at this point in the history
[REV] optimize rbd-repo health status checks #145
  • Loading branch information
ysicing authored Sep 12, 2018
2 parents 872e93f + 74e1b60 commit a12f8f6
Show file tree
Hide file tree
Showing 22 changed files with 246 additions and 176 deletions.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
please complete the following information:

- [ ] Rainbond versions:[e.g. 3.6.x,3.7.x,5.x]
- [ ] Kubernetes versions: [e.g. gr-1.6.4,1.10.3]
- [ ] Docker version: [e.g. gr-1.12.6]
- [ ] Operating system and kernel: [e.g. Centos 7.4,Debian 9.4, Ubuntu 16.04,3.10.0-514.26.2.el7.x86_64]
- [ ] Provider: [Aliyun,Qcloud,AWS,VirtualBox,...]
- [ ] Install details: [Online,Offline,Single node,HA]
- [ ] Steps to reproduce
- [ ] Screenshots(If applicable, add screenshots to help explain your problem.)
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/custom.md

This file was deleted.

14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/install-error-report.md

This file was deleted.

32 changes: 0 additions & 32 deletions install/imgs/img_list.ls

This file was deleted.

1 change: 0 additions & 1 deletion install/imgs/readme.md

This file was deleted.

1 change: 0 additions & 1 deletion install/pkgs/readme.md

This file was deleted.

12 changes: 12 additions & 0 deletions install/salt/base/node.sls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ node-conf:
- user: root
- group: root

{% if "manage" in grains['id'] %}
node-monitor-conf:
file.managed:
- source: salt://install/files/conf/monitor.yaml
- name: {{ pillar['rbd-path'] }}/conf/monitor.yaml
- template: jinja
- makedirs: True
- mode: 644
- user: root
- group: root
{% endif %}

node-uuid-conf:
file.managed:
- source: salt://install/files/node/node_host_uuid.conf
Expand Down
4 changes: 2 additions & 2 deletions install/salt/common/create_dir.sls
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ etc-db-dir:
- name: {{ DIR }}/etc/rbd-db
- makedirs: True

etc-prometheus-dir:
etc-monitor-dir:
file.directory:
- name: {{ DIR }}/etc/prometheus
- name: {{ DIR }}/etc/rbd-monitor
- makedirs: True

etc-api-dir:
Expand Down
120 changes: 69 additions & 51 deletions install/salt/common/dns.sls
Original file line number Diff line number Diff line change
@@ -1,72 +1,71 @@
{% if "manage" in grains['id'] %}
{% set hostip = pillar['vip'] %}
rbd-repo-domain:
host.present:
- ip: {{ hostip }}
- names:
- lang.goodrain.me
- maven.goodrain.me
#rbd-repo-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - lang.goodrain.me
# - maven.goodrain.me

kube-apiserver-domain:
host.present:
- ip: {{ hostip }}
- names:
- kubeapi.goodrain.me

rbd-api-domain:
host.present:
- ip: {{ hostip }}
- names:
- region.goodrain.me
#rbd-api-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - region.goodrain.me

rbd-registry-domain:
host.present:
- ip: {{ hostip }}
- names:
- goodrain.me

rbd-app-ui-domain:
host.present:
- ip: {{ hostip }}
- names:
- console.goodrain.me
#rbd-app-ui-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - console.goodrain.me

{% else %}
# Todo:support VIP
{% set hostip = pillar['vip'] %}
{% set localip = grains['mip'][0] %}

rbd-repo-domain:
host.present:
- ip: {{ hostip }}
- names:
- lang.goodrain.me
- maven.goodrain.me

kube-apiserver-domain:
host.present:
- ip: {{ hostip }}
- names:
- kubeapi.goodrain.me

rbd-api-domain:
host.present:
- ip: {{ hostip }}
- names:
- region.goodrain.me

rbd-registry-domain:
host.present:
- ip: {{ hostip }}
- names:
- goodrain.me

rbd-app-ui-domain:
host.present:
- ip: {{ hostip }}
- names:
- console.goodrain.me

#rbd-repo-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - lang.goodrain.me
# - maven.goodrain.me

#kube-apiserver-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - kubeapi.goodrain.me

#rbd-api-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - region.goodrain.me

#rbd-registry-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - goodrain.me

#rbd-app-ui-domain:
# host.present:
# - ip: {{ hostip }}
# - names:
# - console.goodrain.me

hostname-domain:
host.present:
Expand All @@ -83,19 +82,38 @@ uuid-domain:

{% endif %}

# repo.goodrain.me
local-domain:
host.present:
- ip: {{ pillar['master-private-ip'] }}
- names:
- repo.goodrain.me

# Modify /etc/resolv.conf
add_master_dns:
file.append:
disable_old_dns:
file.replace:
- name: /etc/resolv.conf
- text:
- "nameserver {{ pillar.dns.get('current','114.114.114.114') }}"
- pattern: "^nameserver "
- repl: "#nameserver "

add_manage_dns:
file.append:
- name: /etc/resolv.conf
- text:
- "nameserver {{ pillar['master-private-ip'] }}"

add_local_dns:
file.append:
- name: /etc/resolv.conf
- text:
- "nameserver {{ grains['mip'][0] }}"

add_master_dns:
file.append:
- name: /etc/resolv.conf
- text:
- "nameserver {{ pillar.dns.get('current','114.114.114.114') }}"

domain-resolv:
file.replace:
- name: /etc/resolv.conf
Expand Down
13 changes: 2 additions & 11 deletions install/salt/docker/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,23 @@ docker-mirrors:
- makedirs: True
{% endif %}

{% if pillar['install-type']=="online" %}
docker-repo:
pkgrepo.managed:
{% if grains['os_family']|lower == 'redhat' %}
{% if pillar['install-type']=="offline" %}
{% if grains['id']!= "manage01" %}
- humanname: local_repo
- baseurl: http://repo.goodrain.me/
- enabled: 1
- gpgcheck: 0
{% endif %}
#online
{% else %}
- humanname: Goodrain CentOS-$releasever - for x86_64
- baseurl: http://repo.goodrain.com/centos/$releasever/3.6/$basearch
- enabled: 1
- gpgcheck: 0
- gpgkey: http://repo.goodrain.com/gpg/RPM-GPG-KEY-CentOS-goodrain
{% endif %}
# debain or ubuntu
{% else %}
- name: deb http://repo.goodrain.com/debian/9 3.6 main
- file: /etc/apt/sources.list.d/docker.list
- key_url: http://repo.goodrain.com/gpg/goodrain-C4CDA0B7
{% endif %}
- require_in:
- pkg: gr-docker-engine
{% endif %}

gr-docker-engine:
pkg.installed:
Expand Down
Loading

0 comments on commit a12f8f6

Please sign in to comment.