I'm trying to create a docker image with a test instance of EC baked into it, so users can start containers and have a fresh instance of EC ready to go for testing EC projects. I've run into a problem involving the agent and the database.
The docker build runs an install that includes server, agent, apache, repository, and database. However, the EC instance on such a container cannot run jobs on the agent as it has the wrong host name. To fix the agent's name, I have to--again during the build--run a script that starts the server, modifies the agent's host name, and then stops the server.
However, now when I run a container of the image created, I must first configure the database to ignore server mismatch as the first machine to talk to the db had some hexidec hostname, and the current one has a different hexidec name. I would like the test instance to be ready to go out of the gate once the container is running. Is there a way to get the db to work with this without using the ignoreServerMismatch flag (it feels hacky)?
Answer by tanay · Jan 13, 2015 at 02:16 AM
I haven't done this with Docker but I have with other images. I think the best solution is to use localhost for the database and agent. For example, if you're using MySQL:
Answer by scott.herzinger · Sep 22, 2015 at 06:12 PM
I dealt with this a while back by capturing the hostname at the time the image is built, and storing that in the image itself. Then I have a simple bash script to restore the build-time hostname in the container when it is started up.
Not real pretty, so maybe also too hacky. But I don't have to modify anything in /opt/electriccloud.
Let me know if the details would be useful to you and I will track them down.
Anybody able to install huddle on a 32 bit version of Ubuntu 14.04 ? 1 Answer
Why does ElectricAccelerator run slower on a virtual machine? 1 Answer
For Android build, what is the recommended hardware requirement for the Electric Make machine? 1 Answer
Is it possible to install ectool on a non-ElectricCommander agent server? 1 Answer
How can I see the details of a Kubernetes Cluster Configuration? 2 Answers
Electric Cloud powers Continuous Delivery, helping organizations developing deliver better software faster by automating and accelerating build, test, and deployment processes at scale. Industry leaders like Qualcomm, SpaceX, Cisco, GE, Gap, and E*TRADE use Electric Cloud solutions to boost DevOps productivity and Agile throughput.