vividcortex / docker Goto Github PK
View Code? Open in Web Editor NEWDocker container for VividCortex agents
Docker container for VividCortex agents
It's bad onboarding experience when one first has to build and publish the docker image.
Hi,
currently it appears the agent writes the logs into a file inside the container which makes them hard to access and inspect and eventually hard to debug when something is going wrong (i.e. connection issues). Imho writing to a file makes little sense in combination with -foreground
. It is very typical for containers (i.e. in kubernetes) to simply log to stdout / stderr.
Via a bit of try and error I found the agent inside the container actually has a parameter -log-type
and when setting this to -log-type=stderr
it actually writes logs to stderr which is more or less what I need (although I would prefer if it writes to stdout).
So two requests:
Please change the default dockerfile to already include -log-type=stderr
or something equivalent.
Is the -log-type
parameter documented somewhere? What are the possible values it has (i.e. is there something like stdout instead)?
Thanks
Current image:
We should use our vanilla install script on top of a light-weight base to create an image customized for an API token (== customer environment). Then that image may be launched multiple times with different hostnames and RDS credentials.
We should use statically linked binaries.
The image used in the base default docker image is alpine 3.8 which is officially EOL.
I tried to PR a change to 3.12, and didn't have access. I am testing this version of alpine in a current environment. Feel free to reach out to me, and I can give you the details if you want to pull logs from this instance and agent to determine viability.
I ran this build command as described in alpine/README.md:
docker build --force-rm --build-arg VC_API_TOKEN=... -t vcimage https://raw.githubusercontent.com/VividCortex/docker/master/alpine/Dockerfile
And got the following output:
Downloading build context from remote url: https://raw.githubusercontent.com/VividCortex/docker/master/alpine/Dockerfile 1.629kB
Sending build context to Docker daemon 3.584kB
Step 1/7 : FROM alpine:3.4
---> c7fc7faf8c28
Step 2/7 : MAINTAINER VividCortex <[email protected]>
---> Using cache
---> edfa4b137b93
Step 3/7 : LABEL app=vividcortex
---> Using cache
---> eb68c49ff718
Step 4/7 : ARG VC_API_TOKEN
---> Using cache
---> f122332099e4
Step 5/7 : WORKDIR /
---> Using cache
---> 0bc0926e1461
Step 6/7 : ENTRYPOINT ["/usr/local/bin/vc-agent-007","-foreground","-forbid-restarts"]
---> Using cache
---> 51dbb759e094
Step 7/7 : RUN test -n "${VC_API_TOKEN}" && apk add --no-cache openssl && rm -f install && wget https://download.vividcortex.com/install && sh install --token=${VC_API_TOKEN} --batch --init=None --static --proxy=dyn --skip-certs && rm -f install && sed '1 a "log-max-size":"5",' /etc/vividcortex/global.conf > /etc/vividcortex/tempconf && sed '1 a "log-max-backups":"1",' /etc/vividcortex/tempconf > /etc/vividcortex/global.conf && rm -f /etc/vividcortex/tempconf && chmod 600 /etc/vividcortex/global.conf
---> Running in a31416056e05
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/1) Installing openssl (1.0.2n-r0)
Executing busybox-1.24.2-r14.trigger
OK: 5 MiB in 12 packages
Connecting to download.vividcortex.com (52.84.237.56:443)
wget: error getting response: Connection reset by peer
Removing intermediate container a31416056e05
The command '/bin/sh -c test -n "${VC_API_TOKEN}" && apk add --no-cache openssl && rm -f install && wget https://download.vividcortex.com/install && sh install --token=${VC_API_TOKEN} --batch --init=None --static --proxy=dyn --skip-certs && rm -f install && sed '1 a "log-max-size":"5",' /etc/vividcortex/global.conf > /etc/vividcortex/tempconf && sed '1 a "log-max-backups":"1",' /etc/vividcortex/tempconf > /etc/vividcortex/global.conf && rm -f /etc/vividcortex/tempconf && chmod 600 /etc/vividcortex/global.conf' returned a non-zero code: 1
I can run wget https://download.vividcortex.com/install
just fine outside of the container so I'm assuming there's some SSL configuration incompatibility now. It also fails with a base image of 3.5, but it seems to work OK in 3.6. I haven't yet verified that the resulting image is usable.
/docker/phusion/Readme.md line 4
/docker/alpine/Readme.md line 4
/docker/scratch/Readme.md line 4
They should all go here: https://docs.vividcortex.com/getting-started/off-host-installation/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.