Some of the configuration is already done in the installation step. There we opted to publish the server on port 8111 and we also pointed the agent to the server.
Open the Teamcity-server in browser at the same address and port as the agent uses. In this example its
http://192.168.0.100:8111. You should be greeted with the following splash screen. Location of the Data Directory should be
/data/teamcity_server/datadir, this is mapped to
~/tc_data/server/datadir on the host. Proceed
Select the database type: PostgreSQL. There is an "issue" causing it to not find the embedded JDBC-drivers (as we don't have them in the default location).
Refresh JDBC drivers and you should be greeted with the following form. Fill in the required information. The database host name is the Postgres service name. As Teamcity and Postgres is sharing the same network
teamcity_network Docker will resolve this properly. Proceed
Create Administrator Account
After some initialization you should be greeted with a license to accept and an admin account creation form. When done you should see the My Settings & Tools page. Even though we don't email configured, I am a good boy and fill in my information.
Under Agents you should have an unauthorized agent. Authorize it and associate it with the Default-pool.
This is it!
It might be tempting to add build agents by using replicas, but this will lead to problems.
agent: # Don't do this deploy: replicas: 3
Remember.. in the Swarm world these are supposed to be interchangable copies but we need a different name on all agents, so you will get an error on all but the first agent container to start up. I know cz I tried without thinking it through.
[2018-05-29 12:09:15,359] WARN - buildServer.AGENT.registration - Agent id=<unknown>. Another agent with name "ip_10.0.2.3"(id=1) is registered on the server. Please check you do not have two agents with the same name.