Giter Club home page Giter Club logo

docker-swarm-elastic-agent-plugin's Introduction

GoCD Elastic agent plugin for Docker Swarm

Table of Contents

Installation

Documentation for installation is available here.

Building the code base

To build the jar, run ./gradlew clean test assemble

Using your own docker image with elastic agents

More information to build custom GoCD agent docker image is available here

Troubleshooting

If you already have it running it on a mac, make sure to restart it (see docker/for-mac#17 (comment)). Time drift is known to cause the plugin to not work, because the timestamps returned by the docker API has drifted from the host.

A good way to know if there's a time drift is to run docker ps โ€”

```
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
e0754c9f4cdb        alpine:latest       "/bin/sh"           32 minutes ago      Up 17 seconds                           test
809f310ba1e4        ubuntu:trusty       "/bin/bash"         33 minutes ago      Up About a minute                       reverent_raman
```

Notice how the CREATED and STATUS are several minutes apart for a recently created container.

Enabling debug level logging

If you are on GoCD version 19.6 and above:

Edit the file wrapper-properties.conf on your GoCD server and add the following options. The location of the wrapper-properties.conf can be found in the installation documentation of the GoCD server.

# We recommend that you begin with the index `100` and increment the index for each system property
wrapper.java.additional.100=-Dplugin.cd.go.contrib.elastic-agent.docker-swarm.log.level=debug

If you're running with GoCD server 19.6 and above on docker using one of the supported GoCD server images, set the environment variable GOCD_SERVER_JVM_OPTIONS:

docker run -e "GOCD_SERVER_JVM_OPTIONS=-Dplugin.cd.go.contrib.elastic-agent.docker-swarm.log.level=debug" ...

If you are on GoCD version 19.5 and lower:

Enabling debug level logging can help you troubleshoot an issue with the elastic agent plugin. To enable debug level logs, edit the /etc/default/go-server (for Linux) to add:

export GO_SERVER_SYSTEM_PROPERTIES="$GO_SERVER_SYSTEM_PROPERTIES -Dplugin.cd.go.contrib.elastic-agent.docker-swarm.log.level=debug"

If you're running the server via ./server.sh script โ€”

$ GO_SERVER_SYSTEM_PROPERTIES="-Dplugin.cd.go.contrib.elastic-agent.docker-swarm.log.level=debug" ./server.sh

License

Copyright 2019, Thoughtworks, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

docker-swarm-elastic-agent-plugin's People

Contributors

arvindsv avatar bdpiprava avatar chadlwilson avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dhanasp avatar ganeshspatil avatar gradle-update-robot avatar ketan avatar kritika-singh3 avatar remy-tiitre avatar sloukam avatar xxbedy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-swarm-elastic-agent-plugin's Issues

Add support for constraints in profile

I'm running a swarm with nodes running on centos 7 and windows 2016 server. When I schedule a service, it usually "bounces" between various hosts because a windows container when scheduled on a linux host fails and gets re-assigned to another host until it is assigned to a windows host. Similar thing happens when a linux container is scheduled on a windows host. Depending on the number of bounces, it can take several seconds for the container to come up.

In such mixed-os swarm clusters, it is recommended that:

  • each node be "tagged" with a label:
    docker node update --label-add "os=[windows|linux]"
  • when scheduling a particular service, apply a constraint to run on a specific node(s):
    docker service create --constraint 'node.labels.os==windows'

Upgrade version of spotify docker client to V 8.3.1

Spotify docker client library is now in version 8.3.1 which supports the usage of secrets in swarm. This is important when you need to pull materials from private repos where you need an ssh private key in elastic agents for example.

Create Agent Fails when optional `Memory soft limit` or `Maximum hard limit` is not specified on EA profile

Create Agent request fails with following exception when MaxMemory or ReservedMemory is not specified:

2018-01-16 12:13:26,191 ERROR [1144@MessageListener for CreateAgentListener] DockerPlugin:82 - Failed to handle request go.cd.elastic-agent.create-agent due to:
java.lang.IllegalArgumentException: Invalid size:
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
	at cd.go.contrib.elasticagents.dockerswarm.elasticagent.utils.Size.parse(Size.java:83)
	at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerService.requirements(DockerService.java:138)
	at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerService.create(DockerService.java:111)
	at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerServices.create(DockerServices.java:49)
	at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerServices.create(DockerServices.java:34)
	at cd.go.contrib.elasticagents.dockerswarm.elasticagent.executors.CreateAgentRequestExecutor.execute(CreateAgentRequestExecutor.java:44)
	at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.handle(DockerPlugin.java:55)
	at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:167)
	at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:162)
	at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:316)
	at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:246)
	at com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:162)
	at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:48)
	at com.thoughtworks.go.plugin.access.elastic.ElasticAgentExtension.createAgent(ElasticAgentExtension.java:71)
	at com.thoughtworks.go.plugin.access.elastic.ElasticAgentPluginRegistry.createAgent(ElasticAgentPluginRegistry.java:41)
	at com.thoughtworks.go.server.messaging.elasticagents.CreateAgentListener.onMessage(CreateAgentListener.java:32)
	at com.thoughtworks.go.server.messaging.elasticagents.CreateAgentListener.onMessage(CreateAgentListener.java:22)
	at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:73)
	at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:53)
	at java.lang.Thread.run(Thread.java:745)
Possible Fix

Do not parse resource limits and resource reservations when not specified in the EA profile.

Option to map volumes

I need to map /var/run/docker.sock into agent container. Your agents probably do not execute docker commands?

Do not throw NPE when plugin is not configured

The ping message will inevitably cause the plugin to connect to a swarm instance and cause a NPE.

Ideally if the plugin is not configured, all messages should be ignored and logged at "WARN" level (without a stacktrace)

Show the max container limit exceeded error on server health messages

Right now, there is no way of knowing why an elastic agent isn't assigned to the job. We have to look at the plugin logs to figure out that the max container limit has been exceeded. I think that showing this message with the plugin id will help a bit when users don't understand why the agent hasn't been assigned.

Docker host hostname

I don't know if this is an issue or intended behaviour.

I'd like an agent container to know the hostname of the docker host it's running on.

Then agents docker-entrypoint.sh as specified in Dockerfile.erb should be able to have a CMD line passed to it. I thought that I could pass the same idea, like $HOSTNAME or something of the sort via https://hostname/go/admin/elastic_profiles under Docker command but it doesn't pass arg to ENTRYPOINT infact it actually overwrites it and tried to start the container with $HOSTNAME as command.

Should mention here I've built my own image from a fork of your repo and I'm exporting ${SWARM_NODE_HOSTNAME} from $1 when it's passed in

The way the agents are brough up I can't seem to specify additional service or run options like --args or env. I can't even use -v to mount a file from the host.

Again it'd be nice for the container to know which node it's on. The reason being that the container agent is building containers and has the docker client on it. It's connnecting through to the hosts docker daemon via tcp://. It's fine if you have one worker and know the hostname. But if you have a few workers this has to be dynamic.

I've also tried querying the remote docker api but came up short.

Any ideas?

btw I should mention that this works manually with

docker run -it --rm agent_image:ver $HOSTNAME

as this is passed as arg

It's also not enough to add the whole start up line

/docker-entrypoint.sh $HOSTNAME

to the agent_profile as it looks for /docker-entrypoint.sh locally lol and not as pid1 for the container.

Can't even find where it's been placed on the gocd /go/api/agents/ side.

Add support for configs

Just like we have a need to provide agents with secrets, we need to have an option to provide configs.

Will look into it, when I have more time. Should be easy to implement.

Allow for maximum time to keep a container alive

Currently the plugin will aggressively delete the container as soon as it sees that the agent is idle. Would like to see the ability to terminate the container only if it remains unused for X amount of period, or just put a soft and hard upper bound on how long a container should remain alive.

Soft upper bound being a point where the agent will be disabled. Hard upper bound being the point where the container will be terminated (even if it is running a build). This would be useful in cases where the agent or build that is running on the container hangs up.

Permission denied

Getting the following error on http://gocd-ip:8153/go/admin/status_reports/cd.go.contrib.elastic-agent.docker-swarm

The plugin sent a response that could not be understood by Go. Plugin returned with code '500' and the following response: 'Failed to handle request go.cd.elastic-agent.status-report due to:java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied'

In go-server.log
2017-12-11 07:28:40,282 ERROR [142@MessageListener for ServerPingListener] JMSMessageListenerAdapter:77 - Exception thrown in message handling by listener com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener@426e2cf2
java.lang.RuntimeException: Interaction with plugin with id 'cd.go.contrib.elastic-agent.docker-swarm' implementing 'elastic-agent' extension failed while requesting for 'go.cd.elastic-agent.server-ping'. Reason: [The plugin sent a response that could not be understood by Go. Plugin returned with code '500' and the following response: 'Failed to handle request go.cd.elastic-agent.server-ping due to:com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied']
at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:42)
at com.thoughtworks.go.plugin.access.elastic.ElasticAgentExtension.serverPing(ElasticAgentExtension.java:68)
at com.thoughtworks.go.plugin.access.elastic.ElasticAgentPluginRegistry.serverPing(ElasticAgentPluginRegistry.java:49)
at com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener.onMessage(ServerPingListener.java:32)
at com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener.onMessage(ServerPingListener.java:22)
at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:73)
at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:53)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: The plugin sent a response that could not be understood by Go. Plugin returned with code '500' and the following response: 'Failed to handle request go.cd.elastic-agent.server-ping due to:com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied'
at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:40)
... 7 common frames omitted

plugin-cd.go.contrib.elastic-agent.docker-swarm.log
2017-12-11 07:38:40,216 INFO [142@MessageListener for ServerPingListener] DockerPlugin:57 - Using private docker registry server my-private-registry.
2017-12-11 07:38:40,250 ERROR [142@MessageListener for ServerPingListener] DockerPlugin:82 - Failed to handle request go.cd.elastic-agent.server-ping due to:
java.lang.RuntimeException: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied
at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.refreshInstances(DockerPlugin.java:93)
at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.handle(DockerPlugin.java:57)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:167)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:162)
at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:316)
at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:246)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:162)
at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:33)
at com.thoughtworks.go.plugin.access.elastic.ElasticAgentExtension.serverPing(ElasticAgentExtension.java:68)
at com.thoughtworks.go.plugin.access.elastic.ElasticAgentPluginRegistry.serverPing(ElasticAgentPluginRegistry.java:49)
at com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener.onMessage(ServerPingListener.java:32)
at com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener.onMessage(ServerPingListener.java:22)
at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:73)
at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:53)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied
at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2657)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2588)
at com.spotify.docker.client.DefaultDockerClient.ping(DefaultDockerClient.java:501)
at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerClientFactory.createClient(DockerClientFactory.java:72)
at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerClientFactory.docker(DockerClientFactory.java:49)
at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerServices.docker(DockerServices.java:135)
at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerServices.refreshAll(DockerServices.java:118)
at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.refreshInstances(DockerPlugin.java:91)
... 14 common frames omitted
Caused by: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied
at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2586)
... 20 common frames omitted
Caused by: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:481)
at org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37)
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:487)
at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:178)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 common frames omitted
Caused by: java.io.IOException: Permission denied
at jnr.unixsocket.UnixSocketChannel.doConnect(UnixSocketChannel.java:94)
at jnr.unixsocket.UnixSocketChannel.connect(UnixSocketChannel.java:102)
at com.spotify.docker.client.ApacheUnixSocket.connect(ApacheUnixSocket.java:76)
at com.spotify.docker.client.UnixConnectionSocketFactory.connectSocket(UnixConnectionSocketFactory.java:78)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435)
... 21 common frames omitted
2017-12-11 07:38:55,271 INFO [qtp81009902-31] DockerPlugin:57 - [status-report] Generating status report

Validation of HTTPs url

I think it's time to disable URL validation on the plugin and allow passing in http:// URLs instead of https:// URLs for the server url field.

Elastic agents status report page: property content - text alignment

Issue Type
  • Bug Report
Summary

The properties in status report page is center aligned currently. The text would read better if it is left-aligned.
Existing:
image

Proposed:
image
Note: Color of the table header has been changed to be make it consistent with the rest of the application.

extension failed while requesting for 'go.cd.elastic-agent.server-ping'

I cannot get the plugin to work with GoCD server 17.5.0 and plugin version 1.1.4.

I'm getting
2017-06-27 11:51:10,991 DEBUG [132@MessageListener for ServerPingListener] Printer:113 - com.thoughtworks.go.domain.Plugin{configuration={"environment_variables":"","docker_ca_cert":"","docker_uri":"http://192.168.235.30:2375","go_server_url":"https://192.168.235.30:8154/go","docker_client_key":"","max_docker_containers":"10","docker_client_cert":"","auto_register_timeout":"2"}, pluginId=cd.go.contrib.elastic-agent.docker-swarm, id=1} 2017-06-27 11:51:11,001 DEBUG [cancelHungJobThread] GO_MODE_AWARE_TIMER:41 - Server is in active state, Running: class com.thoughtworks.go.server.service.ScheduleService#cancelHungJobs 2017-06-27 11:51:11,012 ERROR [132@MessageListener for ServerPingListener] JMSMessageListenerAdapter:77 - Exception thrown in message handling by listener com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener@333c4971 java.lang.RuntimeException: Interaction with plugin with id 'cd.go.contrib.elastic-agent.docker-swarm' implementing 'elastic-agent' extension failed while requesting for 'go.cd.elastic-agent.server-ping'. Reason: [java.lang.RuntimeException: java.lang.NullPointerException] at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:41) at com.thoughtworks.go.plugin.access.elastic.ElasticAgentExtension.serverPing(ElasticAgentExtension.java:60) at com.thoughtworks.go.plugin.access.elastic.ElasticAgentPluginRegistry.serverPing(ElasticAgentPluginRegistry.java:49) at com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener.onMessage(ServerPingListener.java:32) at com.thoughtworks.go.server.messaging.elasticagents.ServerPingListener.onMessage(ServerPingListener.java:22) at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:73) at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:53) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:317) at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:245) at com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:173) at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:32) ... 7 more Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.handle(DockerPlugin.java:78) at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:178) at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:173) at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:315) ... 10 more Caused by: java.lang.RuntimeException: java.lang.NullPointerException at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.refreshInstances(DockerPlugin.java:86) at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.handle(DockerPlugin.java:58) ... 13 more Caused by: java.lang.NullPointerException at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerServices.refreshAll(DockerServices.java:120) at cd.go.contrib.elasticagents.dockerswarm.elasticagent.DockerPlugin.refreshInstances(DockerPlugin.java:84) ... 14 more 2017-06-27 11:51:11,195 DEBUG [consumeBuildCausesThread] GO_MODE_AWARE_TIMER:41 - Server is in active state, Running: class com.thoughtworks.go.server.service.ScheduleService#autoSchedulePipelinesFromRequestBuffer 2017-06-27 11:51:12,195 DEBUG [consumeBuildCausesThread] GO_MODE_AWARE_TIMER:41 - Server is in active state, Running: class com.thoughtworks.go.server.service.ScheduleService#autoSchedulePipelinesFromRequestBuffer

Usage of `unix:///var/run/docker.sock` possible

I want to beef-up my GoCD stack and run the GoCD server in a SWARM cluster on my Macbook. Thus, I use unix:///var/run/docker.sock.

Mounting the socket into the server and using unix:///var/run/docker.sock as DOCKER_HOST in the plugin configuration leads to:
"""
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
"""
Is it possible to use a unix-socket in general?

Need an option to add network to agent container

When you enter your swarm service name into "Go Server URL (this is passed to the agents, so don't use localhost):*" and try to save it, it will give an error "We're sorry, but something went wrong."

Most likely the validation is too strict - should give better error though. Issue is most likely that swarm service names have _ in domain part, for example https://gocd_server:8154/go

At first I tried just https://server:8154/go, but that returned java.net.UnknownHostException: server: Try again in agents logs.

Argh, I think its an issue that gocd_server is in its own network and I have no option to provide the network name to agents

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.