Skip to content

Commit 7908feb

Browse files
authored
Update README.md
1 parent b379f06 commit 7908feb

File tree

1 file changed

+38
-20
lines changed

1 file changed

+38
-20
lines changed

README.md

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Table of Contents
55

66
* [Installation](#installation)
77
* [Building the code base](#building-the-code-base)
8-
* [Is this production ready?](#is-this-production-ready)
98
* [Using your own docker image with elastic agents](#using-your-own-docker-image-with-elastic-agents)
109
* [Using the GoCD agent, installed via .deb/.rpm](#using-the-gocd-agent-installed-via-debrpm)
1110
* [Use a custom bootstrapper](#use-a-custom-bootstrapper)
@@ -21,18 +20,6 @@ Documentation for installation is available [here](INSTALL.md).
2120

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

24-
## Is this production ready?
25-
26-
It depends.
27-
28-
**tl;dr;**
29-
30-
If you need something simple to get started with, use this plugin. If you're looking to run a lot of builds, you probably want to look at the [docker swarm elastic agent plugin](https://github.com/gocd-contrib/docker-swarm-elastic-agents).
31-
32-
**The long answer:**
33-
34-
The plugin, as it is currently implemented is meant to be a very simple plugin to demonstrate how to get started with GoCD [elastic agent](https://plugin-api.go.cd/current/elastic-agents) feature. It does not support some of the other interesting things you can do with docker (resource limits, host file mapping etc.)
35-
3623
## Using your own docker image with elastic agents
3724

3825
The plugin executes the equivalent of the following docker command to start the agent —
@@ -75,26 +62,57 @@ See the bootstrap script and docker file here under [`contrib/scripts/bootstrap-
7562

7663
## Troubleshooting
7764

78-
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:
65+
### Enable Debug Logs
7966

80-
```bash
81-
export GO_SERVER_SYSTEM_PROPERTIES="$GO_SERVER_SYSTEM_PROPERTIES -Dplugin.cd.go.contrib.elastic-agent.docker.log.level=debug"
82-
```
67+
#### If you are on GoCD version 19.6 and above:
8368

84-
If you're running the server via `./server.sh` script —
69+
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](https://docs.gocd.org/current/installation/installing_go_server.html) of the GoCD server.
8570

71+
```properties
72+
# We recommend that you begin with the index `100` and increment the index for each system property
73+
wrapper.java.additional.100=-Dplugin.cd.go.contrib.elastic-agent.docker.log.level=debug
8674
```
87-
$ GO_SERVER_SYSTEM_PROPERTIES="-Dplugin.cd.go.contrib.elastic-agent.docker.log.level=debug" ./server.sh
75+
76+
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`:
77+
78+
```shell
79+
docker run -e "GOCD_SERVER_JVM_OPTIONS=-Dplugin.cd.go.contrib.elastic-agent.docker.log.level=debug" ...
8880
```
8981

82+
#### If you are on GoCD version 19.5 and lower:
83+
84+
* On Linux:
85+
86+
Enabling debug level logging can help you troubleshoot an issue with this plugin. To enable debug level logs, edit the file `/etc/default/go-server` (for Linux) to add:
87+
88+
```shell
89+
export GO_SERVER_SYSTEM_PROPERTIES="$GO_SERVER_SYSTEM_PROPERTIES -Dplugin.cd.go.contrib.elastic-agent.docker.log.level=debug"
90+
```
91+
92+
If you're running the server via `./server.sh` script:
93+
94+
```shell
95+
$ GO_SERVER_SYSTEM_PROPERTIES="-Dplugin.cd.go.contrib.elastic-agent.docker.log.level=debug" ./server.sh
96+
```
97+
98+
* On windows:
99+
100+
Edit the file `config/wrapper-properties.conf` inside the GoCD Server installation directory (typically `C:\Program Files\Go Server`):
101+
102+
```
103+
# config/wrapper-properties.conf
104+
# since the last "wrapper.java.additional" index is 15, we use the next available index.
105+
wrapper.java.additional.16=-Dplugin.cd.go.contrib.elastic-agent.docker.log.level=debug
106+
```
107+
90108
## Credits
91109
92110
Thanks to @konpa for the [docker icon](https://raw.githubusercontent.com/konpa/devicon/b80c6d9acb7b58b80904769015f9e0dd36fe46d2/icons/docker/docker-plain.svg) used by the plugin.
93111
94112
## License
95113
96114
```plain
97-
Copyright 2018, ThoughtWorks, Inc.
115+
Copyright 2019, ThoughtWorks, Inc.
98116
99117
Licensed under the Apache License, Version 2.0 (the "License");
100118
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)