Open codefromthecrypt opened 5 years ago
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?
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
If anyone wants to work this please let me know and I can walk you through what is needed
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
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?
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
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