This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Docker on Xenial 16.04.1 x64 | |
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# No interactive for now. | |
export DEBIAN_FRONTEND=noninteractive | |
# Update your APT package index. | |
sudo apt-get -y update | |
# Update package information, ensure that APT works with the https method, and that CA certificates are installed. | |
sudo apt-get -y install apt-transport-https ca-certificates | |
# Add the new GPG key. | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1beta1 | |
kind: StatefulSet | |
metadata: | |
name: logging-elastic | |
spec: | |
replicas: 1 | |
serviceName: logging-elastic | |
template: | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: logging-kibana | |
spec: | |
replicas: 1 | |
strategy: {} | |
template: | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1beta1 | |
kind: StatefulSet | |
metadata: | |
name: logging-elastic | |
spec: | |
replicas: 1 | |
serviceName: logging-elastic | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OLD_CLUSTER=localhost:9201 | |
NEW_CLUSTER=localhost:9202 | |
OLD_CLUSTER_SERVICE=logging-elastic-service-old:9200 | |
indices=$(curl $OLD_CLUSTER/_cat/indices | awk '{ print $3 }') | |
for index in $indices ; do | |
# get your indices prefix, write this regex to grasp your indices but skip .kibana index | |
if ! [[ $index =~ ^log.*$ ]]; then | |
continue | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OLD_CLUSTER=localhost:9201 | |
NEW_CLUSTER=localhost:9202 | |
OLD_CLUSTER_SERVICE=logging-elastic-service-old:9200 | |
indices=$(curl $OLD_CLUSTER/_cat/indices | awk '{ print $3 }') | |
printf "\n\n+++++reindexing those index+++++++\n" | |
for index in $indices; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: logging-elastic-service-old | |
labels: | |
name: logging-elastic-service-old | |
spec: | |
clusterIP: None | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: logging-elastic-service | |
labels: | |
service: logging-elastic | |
spec: | |
clusterIP: None | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: logging-kibana | |
spec: | |
replicas: 1 | |
strategy: {} | |
template: | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream node { | |
# THIS IS THE IP ADDRESS TO PROXY TO | |
server 35.222.33.12:80 max_fails=2 fail_timeout=2s; | |
} | |
server { | |
listen 80; | |
server_name _; | |
root /usr/share/nginx/html; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; |
OlderNewer