This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from jkandasa/es_image_change
Es image change
- Loading branch information
Showing
9 changed files
with
217 additions
and
85 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2018 The Jaeger Authors | ||
# | ||
# 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations under | ||
# the License. | ||
# | ||
|
||
# enable set -x if you want to print commands on console | ||
# set -x | ||
|
||
echo -e "\n\n------------------------- Logs -------------------------" | ||
|
||
echo -e "\n----------------------- Elasticsearch logs -----------------------" | ||
oc get pods -l app=elasticsearch -o name | xargs -n1 -I@ sh -c 'echo "---------------------- @ --------------------------"; oc logs @; echo -e "------------------------------------------------------------------\n"' | ||
|
||
echo -e "\n---------------------- Jaeger logs --------------------------" | ||
oc get pods -l app=jaeger -o name | xargs -n1 -I@ sh -c 'echo "---------------------- @ --------------------------"; oc logs @; echo -e "------------------------------------------------------------------\n"' | ||
|
||
echo -e "\n---------------------- oc describe pods,services,events,configmaps,deployments -l name!=jenkins--------------------------" | ||
oc describe pods,services,events,configmaps,deployments -l name!=jenkins | ||
echo -e "------------------------------------------------------------------\n\n" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2018 The Jaeger Authors | ||
# | ||
# 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations under | ||
# the License. | ||
# | ||
|
||
# | ||
# Need to add // --collector.num-workers=50 --collector.queue-size=2000 | ||
# | ||
set -x | ||
|
||
# download config map from master branch | ||
cp standalone/templates/configmap-elasticsearch.yml configmap-elasticsearch.yml | ||
# update configmap | ||
sed -i 's;${COLLECTOR_NUM_WORKERS};'${COLLECTOR_NUM_WORKERS}';g' configmap-elasticsearch.yml | ||
sed -i 's;${COLLECTOR_QUEUE_SIZE};'${COLLECTOR_QUEUE_SIZE}';g' configmap-elasticsearch.yml | ||
sed -i 's;${ES_BULK_SIZE};'${ES_BULK_SIZE}';g' configmap-elasticsearch.yml | ||
sed -i 's;${ES_BULK_WORKERS};'${ES_BULK_WORKERS}';g' configmap-elasticsearch.yml | ||
sed -i 's;${ES_BULK_FLUSH_INTERVAL};'${ES_BULK_FLUSH_INTERVAL}';g' configmap-elasticsearch.yml | ||
if [ ${#QUERY_STATIC_FILES} -gt 0 ] | ||
then | ||
sed -i 's;${QUERY_STATIC_FILES};'${QUERY_STATIC_FILES}';g' configmap-elasticsearch.yml | ||
else | ||
sed -i '/${QUERY_STATIC_FILES}/d' configmap-elasticsearch.yml | ||
fi | ||
# create configmap | ||
oc create -f configmap-elasticsearch.yml | ||
rm configmap-elasticsearch.yml | ||
|
||
# download jaeger production template from master branch | ||
curl https://raw.githubusercontent.com/jaegertracing/jaeger-openshift/master/production/jaeger-production-template.yml --output jaeger-production-template.yml | ||
# update jaeger collector image | ||
sed -i 's;jaegertracing/jaeger-collector:${IMAGE_VERSION};'${JAEGER_COLLECTOR_IMAGE}';g' jaeger-production-template.yml | ||
# update jaeger query image | ||
sed -i 's;jaegertracing/jaeger-query:${IMAGE_VERSION};'${JAEGER_QUERY_IMAGE}';g' jaeger-production-template.yml | ||
# print selected images on the console | ||
grep "image:" jaeger-production-template.yml | ||
|
||
# | ||
# HACK alert. Change the number of replicas for the collector here if desired. This script currently depends | ||
# on the entry for the jaeger-collector occuring in the template (and specifically the line 'replicas: 1' | ||
# occuring before the 'replicas: 1' entry for anything else, such as the jaeger-ui | ||
# update parameters | ||
sed -i 's;parameters:.*$;\0\n- description: Number of collector pods\n displayName: Jaeger Collector Pods\n name: COLLECTOR_PODS\n required: false\n value: "1";g' jaeger-production-template.yml | ||
sed -i '0,/replicas: 1/s/replicas: 1/replicas: ${COLLECTOR_PODS}/' jaeger-production-template.yml | ||
|
||
# deploy jaeger template | ||
oc process ${DEPLOYMENT_PARAMETERS} -f jaeger-production-template.yml | oc create -n ${PROJECT_NAME} -f - |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2018 The Jaeger Authors | ||
# | ||
# 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations under | ||
# the License. | ||
# | ||
|
||
|
||
# Unable to add multiline sed replace with Jenkins pipeline file, hence created this script as a workaround, | ||
# and moved all the commands to this file. | ||
|
||
set -x | ||
curl https://raw.githubusercontent.com/RHsyseng/docker-rhel-elasticsearch/5.x/es-cluster-deployment.yml --output es-cluster-deployment.yml | ||
sed -i 's/512Mi/'${ES_MEMORY}'/g' es-cluster-deployment.yml | ||
sed -i 's/registry.centos.org\/rhsyseng\/elasticsearch:5.6.10/'${ES_IMAGE//\//\\/}' \ | ||
importPolicy: \ | ||
insecure: '${ES_IMAGE_INSECURE}'/g' es-cluster-deployment.yml | ||
oc create -f es-cluster-deployment.yml | ||
while true; do | ||
replicas=$(oc get statefulset/elasticsearch -o=jsonpath='{.status.readyReplicas}') | ||
((replicas > 1)) && break | ||
sleep 1 | ||
done |
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# | ||
# Copyright 2017-2018 The Jaeger Authors | ||
# | ||
# 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations under | ||
# the License. | ||
# | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: jaeger-configuration | ||
labels: | ||
app: jaeger | ||
jaeger-infra: configuration | ||
data: | ||
span-storage-type: elasticsearch | ||
collector: | | ||
collector: | ||
num-workers: ${COLLECTOR_NUM_WORKERS} | ||
queue-size: ${COLLECTOR_QUEUE_SIZE} | ||
zipkin: | ||
http-port: 9411 | ||
es: | ||
server-urls: http://elasticsearch:9200 | ||
bulk: | ||
size: ${ES_BULK_SIZE} | ||
workers: ${ES_BULK_WORKERS} | ||
flush-interval: ${ES_BULK_FLUSH_INTERVAL} | ||
query: | | ||
query: | ||
static-files: ${QUERY_STATIC_FILES} | ||
port: 16686 | ||
es: | ||
server-urls: http://elasticsearch:9200 | ||
bulk: | ||
size: ${ES_BULK_SIZE} | ||
workers: ${ES_BULK_WORKERS} | ||
flush-interval: ${ES_BULK_FLUSH_INTERVAL} |
Oops, something went wrong.