jaegertracing / jaeger-openshift

Support for deploying Jaeger into OpenShift
https://jaegertracing.io/
Apache License 2.0
57 stars 37 forks source link

Removed agent, documented how to use it as sidecar #35

Closed jpkrohling closed 7 years ago

objectiser commented 7 years ago

:red_circle: Jenkins CI Build#1: Console log: external, internal

jpkrohling commented 7 years ago

A file like this can be used for testing:

/tmp/agent-as-sidecar.yml

apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Service
  metadata:
    name: myapp
    labels:
      app: myapp
      myapp: service
  spec:
    ports:
    - name: web
      port: 80
      protocol: TCP
      targetPort: 8080
    selector:
      myapp: pod
    type: LoadBalancer
- apiVersion: v1
  kind: Route
  metadata:
    name: myapp
    labels:
      app: myapp
      myapp: route
  spec:
    tls:
      insecureEdgeTerminationPolicy: Allow
      termination: edge
    to:
      kind: Service
      name: myapp
- apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: myapp
  spec:
    template:
      metadata:
        labels:
          app: myapp
          myapp: pod
      spec:
        containers:
        - image: jpkroehling/hello-openshift
          name: myapp
          ports:
          - containerPort: 8080
        - image: jaegertracing/jaeger-agent
          name: jaeger-agent
          ports:
          - containerPort: 5775
            protocol: UDP
          - containerPort: 6831
            protocol: UDP
          - containerPort: 6832
            protocol: UDP
          command:
          - "/go/bin/agent-linux"
          - "--collector.host-port=jaeger-collector.jaeger-infra.svc:14267"

All commands:

oc new-project jaeger-infra
oc process -f production/jaeger-production-template.yml | oc create -f -
## wait for collector to come up
oc project myproject
oc create -f /tmp/agent-as-sidecar.yml

image

jpkrohling commented 7 years ago

@jkandasa , what needs to be done to get the tests to comply with this new template?

jpkrohling commented 7 years ago

By the way: the instructions are using an image from my namespace. Here's the source code for that image: https://github.com/jpkrohling/origin/tree/JPK-AddedJaegerTracingToHelloWorld/examples/hello-openshift .

Note that this is not what is on the openshift/hello-world image that is mentioned on the readme file. That image has no instrumentation at all.

jpkrohling commented 7 years ago

Jaeger Agent as sidecar

objectiser commented 7 years ago

:red_circle: Jenkins CI Build#2: Console log: external, internal

objectiser commented 7 years ago

:red_circle: Jenkins CI Build#3: Console log: external, internal

jkandasa commented 7 years ago

@jpkrohling

@jkandasa , what needs to be done to get the tests to comply with this new template?

We have to create a file(agent-as-sidecar.yml) under jenkins-ci/ and add the command(oc create -f jenkins-ci/agent-as-sidecar.yml) on the Jenkinsfile

jpkrohling commented 7 years ago

@jkandasa could you prepare a PR for that repository? Let's try to merge them at around the same time, as this is a breaking change. I believe we'd need manual testing for this PR, due to the required changes to the automated tests.

Once I get a confirmation that this works, I'll prepare a PR for Kubernetes as well and we can then coordinate the merging among all repos.

objectiser commented 7 years ago

:red_circle: Jenkins CI Build#4: Console log: external, internal

jkandasa commented 7 years ago

@jpkrohling

could you prepare a PR for that repository? Let's try to merge them at around the same time, as this is a breaking change. I believe we'd need manual testing for this PR, due to the required changes to the automated tests. Once I get a confirmation that this works, I'll prepare a PR for Kubernetes as well and we can then coordinate the merging among all repos.

Sure, I will create a PR for jenkins ci job for this change.

objectiser commented 7 years ago

:red_circle: Jenkins CI Build#1: Console log: external, internal

objectiser commented 7 years ago

:red_circle: Jenkins CI Build#2: Console log: external, internal

objectiser commented 7 years ago

:white_check_mark: Jenkins CI Build#3: Console log: external, internal