Skip to content

Commit

Permalink
Merge pull request #1 from npflan/forberedelsesweekend3-2019
Browse files Browse the repository at this point in the history
3. forberedelse weekend
  • Loading branch information
nmbro authored Oct 2, 2019
2 parents 5f9f6dd + 6a713a6 commit 97abdd3
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 4 deletions.
13 changes: 13 additions & 0 deletions hostfiles/hosts_kubernetes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"kubernetes-master":[
"10.100.101.20"
],
"kubernetes-nodes":[
"10.100.101.10",
"10.100.101.11",
"10.100.101.13",
"10.100.102.10",
"10.100.102.11",
"10.100.102.12",
"10.100.103.10",
"10.100.103.11"
],
15 changes: 15 additions & 0 deletions playbooks/kubernetes/install-nfsutils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- hosts: kubernetes-nodes
tasks:
- name: Install kubelet version
apt:
name: "{{ packages }}"
update_cache: yes
vars:
packages:
- nfs-common

# - name: Restart service kubelet
# service:
# name: kubelet
# state: restarted
17 changes: 17 additions & 0 deletions playbooks/kubernetes/upgrade-kubelet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- hosts: kubernetes-nodes
tasks:
- name: Install kubelet version
apt:
name: "{{ packages }}"
update_cache: yes
vars:
packages:
- kubelet=1.15.4-00
- kubectl=1.15.4-00
- kubeadm=1.15.4-00

- name: Restart service kubelet
service:
name: kubelet
state: restarted
6 changes: 3 additions & 3 deletions playbooks/monitoring/assets/filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ filebeat.inputs:


- type: log
enabled: true
enabled: false
paths:
- /var/log/kern.log
include_lines: ['EDAC MC0:']
Expand Down Expand Up @@ -157,7 +157,7 @@ setup.kibana:
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["ip-101-80.rack1.srv.minserver.dk:9200", "ip-102-83.rack2.srv.minserver.dk:9200","ip-102-68.rack2.srv.minserver.dk:9200","ip-103-143.rack3.srv.minserver.dk:9200","ip-103-69.rack3.srv.minserver.dk:9200","ip-102-78.rack2.srv.minserver.dk:9200"]
hosts: ["10.100.101.7:9200","10.100.102.6:9200","10.100.102.7:9200","10.100.103.7:9200"]
pipeline: '%{[fields.pipeline]}'
index: "filebeat-%{[beat.version]}-%{+yyyy.MM.dd}"

Expand All @@ -169,7 +169,7 @@ output.elasticsearch:
setup.template:
name: "filebeat"
pattern: "filebeat-*"
enabled: false
enabled: true

#----------------------------- Logstash output --------------------------------
#output.logstash:
Expand Down
7 changes: 7 additions & 0 deletions playbooks/monitoring/assets/modules.d/system.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- module: system
syslog:
enabled: true
var.paths: ["/var/log/syslog*"]
auth:
enabled: true
var.paths: ["/var/log/auth.log*"]
14 changes: 13 additions & 1 deletion playbooks/monitoring/filebeat-updateconfig.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- hosts: npf_gameservers_all
- hosts: npf_gameservers
gather_facts: no
tasks:
- name: copy filebeat.yml config files
Expand All @@ -9,6 +9,18 @@
owner: root
group: root

- name: Create modules.d
file:
path: /etc/filebeat/modules.d
state: directory

- name: copy system.yml to modules.d
copy:
src: assets/modules.d/system.yml
dest: /etc/filebeat/modules.d/system.yml
owner: root
group: root

- name: reload daemons
command: systemctl daemon-reload

Expand Down

0 comments on commit 97abdd3

Please sign in to comment.