How to start a new worker and register it with ATC?


#1

How to start a new worker and register it with ATC? I want to start 2-3 workers and register it with ATC? Also, how do we login to containers created by the workers. I would need this to debug any issue in the containers for that task that it is executing.


#2

Hello,

I suggest to start by reading the documentation at https://concourse-ci.org/index.html, which gives an answer very quickly to your questions. More in details: https://concourse-ci.org/setup-and-operations.html

If you find the documentation too dry, you can start with https://concoursetutorial.com/, where you will learn abut fly intercept.


#3

I have gone through all the docs. I am not very clear about the following.

  • How do I start a new worker?
  • How can I login to a container created by the worker? I need this for debugging purpose.

Unfortunately, the tutorial is not very intuitive on the above topics. If you can give me a command that would be great. This will also help others searching the forums. Thanks and appreciate your help.


#4

what does this mean?

$ fly -t tutorial intercept -j ranjith-pipeline4/job-hello-world-ranman -s job-hello-world-ranman

no containers matched your search parameters!

they may have expired if your build hasn’t recently finished.


#5

Containers only hang around for a limited amount of time before garbage collection picks them off. Your error occurs when you try to intercept a container that is no longer there. In my experience successful task containers are removed almost immediately while failures stay around for a few minutes.


#6

To start a new worker, you need to:

  1. Generate a new worker key, and put the public key into worker node’s authorized_keys file. Based on my test, you will have to restart concourse web in order to reload the authorized_keys file. So in my practice, I pre-generate a lot of worker keys, so that when I need to add a new worker, I just take a key without restart concourse web.

  2. Then you can start a new worker by running concourse web with the following options:

    • --name <worker name> The name shows in fly workers
    • --work-dir <a dir with enough space>
    • --tsa-host <web node's ip>
    • --tsa-public-key <tsa-public-key-file> This key should be generated when you started web node.
    • --tsa-worker-private-key <worker key file you just generated for this worker>