This file contains hidden or 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
| oc rsh `oc get po -l component=es --show-labels -o name|head -n 1` \ | |
| curl --cacert /etc/elasticsearch/secret/admin-ca \ | |
| --cert /etc/elasticsearch/secret/admin-cert \ | |
| --key /etc/elasticsearch/secret/admin-key \ | |
| -XPUT 'https://logging-es:9200/_snapshot/log_backup/snapshot_20171114_1?wait_for_completion=true' |
This file contains hidden or 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/sh | |
| for secret in admin-ca admin-cert admin-key | |
| do | |
| oc rsh `oc get po -l component=es -o jsonpath='{.items[0].metadata.name}'` \ | |
| cat /etc/elasticsearch/secret/$secret > $secret | |
| done |
This file contains hidden or 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
| --- | |
| - hosts: 127.0.0.1 | |
| connection: local | |
| tasks: | |
| - name: get Elasticsearch DCs | |
| command: oc get dc -l component=es -o name | |
| register: es_components | |
| - name: pause rollout while patching DC |
This file contains hidden or 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/sh | |
| oc rsh `oc get po -l component=es -o jsonpath='{.items[0].metadata.name}'` \ | |
| curl -s -XPUT 'http://logging-es:9200/_snapshot/log_backup?pretty' -H 'Content-Type: application/json' -d' | |
| { | |
| "type": "fs", | |
| "settings": { | |
| "location": "/elasticsearch/snapshots", | |
| "compress": true | |
| } |
This file contains hidden or 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
| OSEv3: | |
| children: | |
| masters: | |
| hosts: | |
| ocp-master.int.spodon.com | |
| etcd: | |
| hosts: | |
| ocp-master.int.spodon.com | |
| nodes: | |
| hosts: |
This file contains hidden or 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
| oc get secret router-certs -o json -n default | jq '.metadata={name:"kubernetes-dashboard-certs", namespace:"kube-system"}' | oc create -f - |
This file contains hidden or 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: Template | |
| metadata: | |
| name: hello-openshift-template | |
| annotations: | |
| openshift.io/display-name: "Hello OpenShift Demo Template" | |
| description: "This is an example template used to demonstrate templating." | |
| author: "George Goh <george.goh@redhat.com>" | |
| tags: "" | |
| iconClass: "icon-apache" |
This file contains hidden or 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
| openssl x509 -noout -text -certopt ca_default,no_sigdump,no_serial,no_validity -in <name> |
This file contains hidden or 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/sh | |
| ES_VOLS=`oc get pvc -l logging-infra=support -n openshift-logging -o jsonpath='{range .items[*]}{.spec.volumeName}{"\n"}'` | |
| for pv in $ES_VOLS | |
| do | |
| oc get pv $pv -o jsonpath='{.spec.claimRef.name}{"\t"}{.spec.iscsi.portals}{"\t"}{.spec.iscsi.iqn}{"\n"}' | |
| done |
This file contains hidden or 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/sh | |
| GLUSTER_PODS=`oc get po -l glusterfs=storage-pod -n app-storage -o name` | |
| for pod in $GLUSTER_PODS | |
| do | |
| echo $pod | |
| oc -n app-storage rsh $pod targetcli ls iscsi 1 | |
| done |