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
from boto.connection import AWSAuthConnection | |
class ESConnection(AWSAuthConnection): | |
def __init__(self, region, **kwargs): | |
super(ESConnection, self).__init__(**kwargs) | |
self._set_auth_region_name(region) | |
self._set_auth_service_name("es") | |
def _required_auth_capability(self): |
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
[root@ip-10-91-41-215 elk]# curl -XGET 'http://localhost:9200/_snapshot/es-backups/_all?pretty' | |
{ | |
"snapshots" : [ | |
{ | |
"snapshot" : "mysnapshot", | |
"uuid" : "cGP2-NLtT5e9no7ThRP9jQ", | |
"version_id" : 5050299, | |
"version" : "5.5.2", | |
"indices" : [ | |
"store_zone_pivots1520", |
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
[root@ip-10-91-41-215 elk]# curl -XDELETE 'http://localhost:9200/_all' | |
{"acknowledged":true} | |
[root@ip-10-91-41-215 elk]# curl -XPOST 'http://localhost:9200/_snapshot/es-backups/mysnapshot/_restore' | |
[root@ip-10-91-41-215 elk]# curl -XGET 'http://localhost:9200/_cat/indices?v' | |
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size | |
yellow open store_zone_pivots1520 ojStgKkbT8Wx1G_CE8XZKw 10 5 457845 0 964.7mb 964.7mb | |
yellow open store_zone_pivots1532 nNb0lnM2QpiFZPsFA1GS6Q 10 7 21122 0 65.5mb 65.5mb | |
yellow open store_zone_pivots1545 s41e_9wzRKGAojZ4L2amFA 10 8 457937 0 964.8mb 964.8mb | |
yellow open store_zone_pivots1541 OQvZFYflTI6vv8Bjc0YBJw 10 5 628574 46450 1.6gb 1.6gb |
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
[root@ip-10-91-41-215 elk]# curl -X POST "http://localhost:9200/_snapshot/es-backups/mysnapshot/_restore" -d '{ | |
"indices": [ | |
"store_zone_pivots1520" | |
], | |
"ignore_unavailable": true, | |
"include_global_state": false | |
}' | |
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
[root@ip-10-91-41-215 elk]# curl -XPUT 'localhost:9200/store_zone_pivots1520/_settings' -d '{"number_of_replicas": 0}' | |
[root@ip-10-91-41-215 elk]# curl -XGET 'http://localhost:9200/_cat/indices?v | |
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size | |
green open store_zone_pivots1520 ojStgKkbT8Wx1G_CE8XZKw 10 0 457845 0 964.7mb 964.7mb | |
green open fluentd-20181228 nNb0lnM2QpiFZPsFA1GS6Q 10 0 21122 0 65.5mb 65.5mb |
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
Later, The reconfigured all indices with corrects replica the result is: | |
[root@ip-10-91-41-215 elk]# curl -XGET 'http://localhost:9200/_cat/indices?v' | |
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size | |
green open store_zone_pivots1520 ojStgKkbT8Wx1G_CE8XZKw 10 0 457845 0 64.7mb 64.7mb | |
green open store_zone_pivots1532 nNb0lnM2QpiFZPsFA1GS6Q 10 0 21122 0 65.5mb 65.5mb | |
green open store_zone_pivots1545 s41e_9wzRKGAojZ4L2amFA 10 0 457937 0 964.8mb 964.8mb | |
green open store_zone_pivots1541 OQvZFYflTI6vv8Bjc0YBJw 10 0 628574 46450 1.6gb 1.6gb | |
green open zones33 PuevnPN5QjK9crXabb9ggA 1 0 13 0 267.3kb 267.3kb | |
green open .kibana QqPVdBAETziTLQvFiN96pw 1 0 3 0 15.1kb 15.1kb |
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
[root@ip-10-91-41-215 elk]# curl -XGET 'http://localhost:9200/_cluster/allocation/explain' | jq | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 728 100 728 0 0 728 0 0:00:01 --:--:-- 0:00:01 118k | |
{ | |
"index": "fluentd-20181229", | |
"shard": 4, | |
"primary": false, | |
"current_state": "unassigned", | |
"unassigned_info": { |
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
root@jenkins:/haproxy-ansible-kubernetes/ansible/inventory/group_vars# cat haproxy/haproxy.yml | |
--- | |
haproxy_global_maxconn: 50000 | |
haproxy_global_ulimit: 100042 | |
haproxy_frontends: | |
- name: 'openshift_router_http' | |
bind: '*:80' | |
backends: | |
- 'openshift_router80' |
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
provider "vsphere" { | |
user = "Administrator@vsphere.local" | |
password = "PEPITOOOO" | |
vsphere_server = "VCENTER_IP" | |
allow_unverified_ssl = "true" | |
} | |
data "vsphere_datacenter" "dc" { | |
name = "DATACENTER" | |
} |
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
root@jenkins:/kubespray# git diff roles/container-engine/docker/handlers/main.yml | |
diff - git a/roles/container-engine/docker/handlers/main.yml b/roles/container-engine/docker/handlers/main.yml | |
index a43d843..6172d79 100644 | |
- - a/roles/container-engine/docker/handlers/main.yml | |
+++ b/roles/container-engine/docker/handlers/main.yml | |
@@ -17,10 +17,17 @@ | |
state: restarted | |
when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] | |
- name: Docker | reload docker | |
service: |
OlderNewer