Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

xray support isn't documented or valid #11

Open
codefromthecrypt opened this issue May 28, 2019 · 6 comments
Open

xray support isn't documented or valid #11

codefromthecrypt opened this issue May 28, 2019 · 6 comments

Comments

@codefromthecrypt
Copy link

xray is here, but the amazon daemon is not present on the image. This means it is probably not a valid setup. AFAICT can either remove the xray module from this image, or add the x-ray daemon to it with instructions for how to configure it.

https://github.com/openzipkin/zipkin-aws/tree/master/autoconfigure/storage-xray#configuration

@mjallday
Copy link

what's the purpose of this image if it doesn't include the daemon by default? is it better to run the daemon as a separate sidecar or should we try to build it into this image?

@devinsba
Copy link
Collaborator

At my previous company, we ran the daemon as a system service on the App servers and used the sender component in the apps instead. There is certainly some missing configuration here to support zipkin server doing the same so that should be addressed

@devinsba
Copy link
Collaborator

If anyone wants to work this please let me know and I can walk you through what is needed

@mjallday
Copy link

can this be done by doing something similar to this in the container

~$ mkdir xray-daemon && cd xray-daemon
~/xray-daemon$ curl https://s3.dualstack.us-west-2.amazonaws.com/aws-xray-assets.us-west-2/xray-daemon/aws-xray-daemon-linux-2.x.zip -o ./aws-xray-daemon-linux-2.x.zip
~/xray-daemon$ unzip -o aws-xray-daemon-linux-2.x.zip -d .

i took these commands from the x-ray setup page

image

@mjallday
Copy link

mjallday commented Jun 2, 2019

Built an image like this

FROM ubuntu:18.04

WORKDIR /xray-daemon

RUN apt-get update
RUN apt-get install unzip

ADD https://s3.dualstack.us-west-2.amazonaws.com/aws-xray-assets.us-west-2/xray-daemon/aws-xray-daemon-linux-2.x.zip /xray-daemon/aws-xray-daemon-linux-2.x.zip
RUN unzip -o aws-xray-daemon-linux-2.x.zip -d .

EXPOSE 2000

CMD ["/xray-daemon/xray", "--bind=0.0.0.0:2000", "--log-file=/dev/stdout", "--log-level=prod"]

And running it like this

docker run -e AWS_PROFILE=some-profile -e AWS_REGION=us-west-2 -v ~/.aws/:/root/.aws/:ro -t xrayd

Comes up with

2019-06-02T19:44:08Z [Info] Initializing AWS X-Ray daemon 2.1.3
2019-06-02T19:44:08Z [Info] Using buffer memory limit of 19 MB
2019-06-02T19:44:08Z [Info] 304 segment buffers allocated
2019-06-02T19:44:08Z [Info] Using region: us-west-2
2019-06-02T19:44:14Z [Error] Get instance id metadata failed: RequestError: send request failed
caused by: Get http://169.254.169.254/latest/meta-data/instance-id: dial tcp 169.254.169.254:80: getsockopt: connection refused

I guess the next step is to figure out how to make the openzipkin server talk to this thing. Seems like it should be just

      STORAGE_TYPE: xray
      AWS_XRAY_DAEMON_ADDRESS: x-rayd:2000

amirite?

@codefromthecrypt
Copy link
Author

looks like a good start! next step would be that if x-ray is enabled you'll want to start two processes on entrypoint instead of one. we have something like this in our demo kafka image. https://github.com/openzipkin/docker-zipkin/blob/master/kafka/start.sh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants