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
[jeff.cantrill@decker openshift]$ oc new-app 127.0.0.1/jcantrill/hello-openshift -o json | |
{ | |
"kind": "List", | |
"apiVersion": "v1", | |
"metadata": {}, | |
"items": [ | |
{ | |
"kind": "ImageStream", | |
"apiVersion": "v1", | |
"metadata": { |
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 new-app logging-deployer-template -p MODE=install | |
--> Deploying template "logging-deployer-template" in project "openshift" | |
logging-deployer-template | |
--------- | |
Template for running the aggregated logging deployer in a pod. Requires empowered 'logging-deployer' service account. | |
* With parameters: | |
* MODE=install | |
* IMAGE_PREFIX=docker.io/openshift/origin- |
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 new-app logging-deployer-template -p MODE=reinstall | |
--> Deploying template "logging-deployer-template" in project "openshift" | |
logging-deployer-template | |
--------- | |
Template for running the aggregated logging deployer in a pod. Requires empowered 'logging-deployer' service account. | |
* With parameters: | |
* MODE=reinstall | |
* IMAGE_PREFIX=docker.io/openshift/origin- |
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
$ cat ../jctoolbox/openshift/origin-15.inventory | |
[OSEv3:children] | |
masters | |
nodes | |
[OSEv3:vars] | |
ansible_become=true | |
ansible_ssh_user=vagrant | |
ansible_ssh_private_key_file=/home/jeff.cantrill/.ssh/id_rsa | |
ansible_user=root |
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
$ ./logging.sh | |
/data/src/github.com/openshift/origin /data/src/github.com/openshift/origin-aggregated-logging/hack/testing | |
/data/src/github.com/openshift/origin-aggregated-logging/hack/testing | |
/data/src/github.com/openshift/origin-aggregated-logging /data/src/github.com/openshift/origin-aggregated-logging/hack/testing | |
/data/src/github.com/openshift/origin-aggregated-logging/hack/testing | |
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos | |
centos-openshift-origin | 2.9 kB 00:00:00 | |
centos-paas-sig-openshift-origin13-rpms | 2.9 kB 00:00:00 | |
centos-paas-sig-openshift-origin14-rpms |
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 | |
data: | |
elasticsearch.yml: "cluster:\n name: ${CLUSTER_NAME}\n\nscript:\n inline: on\n | |
\ indexed: on\n\nindex:\n number_of_shards: \n number_of_replicas: \n unassigned.node_left.delayed_timeout: | |
2m\n translog:\n flush_threshold_size: 256mb\n flush_threshold_period: | |
5m\n\nnode:\n name: ${DC_NAME}\n master: ${IS_MASTER}\n data: ${HAS_DATA}\n | |
\ max_local_storage_nodes: 1\n\nnetwork:\n host: 0.0.0.0\n\ncloud:\n kubernetes:\n | |
\ pod_label: ${POD_LABEL}\n pod_port: 9300\n namespace: ${NAMESPACE}\n\ndiscovery:\n | |
\ type: kubernetes\n zen.ping.multicast.enabled: false\n zen.minimum_master_nodes: | |
${NODE_QUORUM}\n\ngateway:\n recover_after_nodes: ${NODE_QUORUM}\n expected_nodes: |
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/bash | |
pod=$1 | |
oc exec -c elasticsearch $pod -- es_util --query=_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED |
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/bash | |
# This script allocates all primary shards that are unassigned to a a given node using | |
# the openshift binary. The binary must be in the path and the user executing the script | |
# must have access to logging project. The inputs are: | |
# pod An Elasticsearch pod name | |
# node An node Elasticsearch cluster which should be any one of the DC's. We could | |
# probably infer this from the pod name | |
pod=$1 | |
node=$2 |
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/bash -e | |
# | |
# Copyright 2017 Red Hat, Inc. and/or its affiliates | |
# and other contributors as indicated by the @author tags. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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/bash | |
POD=$1 | |
enable=${2:-"all"} #or none | |
PERSIST=${PERSIST:-"transient"} | |
oc exec -n logging -c elasticsearch $POD -- es_util --query=_cluster/settings -XPUT -d "{\"${PERSIST}\":{\"cluster.routing.allocation.enable\":\"${enable}\"}}" |