Sunday, August 16, 2015

Installing ThoughtWorks Go Server & Agent on a Digital Ocean droplet

Today I experimented with installing ThoughtWorks Go CD Server and agent on a Digital Ocean droplet. Here are the steps (pretty simple!):

Step 1: Create a CentOS 6.7x64 droplet. Give it some name, e.g: "centos-droplet". Ensure that you choose a minimum of 1GB RAM, and enable Private Networking option while creating the droplet.

Step 2: Login as root to your new droplet.
ssh root@
Step 3: Add host entry for your droplet name. For instance, if your droplet is called "centos-droplet":
vi /etc/hosts
centos-droplet     localhost   
Step 4: Install Open JDK7 (you can also install just the JRE)
sudo yum install java-1.7.0-openjdk-devel
Step 5: Ensure that java is installed
java -version
Step 6: Now register ThoughtWorks Go YUM repo by executing the following command:
echo "
[gocd]
name            = GoCD YUM Repository
baseurl         = http://dl.bintray.com/gocd/gocd-rpm
enabled         = 1
gpgcheck        = 0
" > /etc/yum.repos.d/thoughtworks-go.repo
Step 7: Install the Go Server
yum install -y go-server

Step 8: Check if Go Server service is running. If not, start the service. 
service go-server status 
service go-server start 
Step 9:  The server should now be running on port 8153. You should be able to open a browser on your laptop, and connect to the remote Digital Ocean droplet Go server UI on http://ip-of-your-droplet:8153/go

Step 10: Install the Go Agent (on the same droplet)
yum install -y go-agent
Step 11: Check if Go Agent service is running. If not, start the service. 
service go-agent status 
service go-agent start 
On the droplet you can run 'ps -ef | grep java' to see the server, and agent processes.

At this point, both your Go server and agent should be up and running. If you go to the "Agents" tab in your Go Server UI, you should be able to see this agent registered (with the same name as your droplet machine name).

That's it. You should be good to Go! If there are any issues, you can check server logs at /var/log/go-server and agent logs at /var/log/go-agent folder.

Related Links

  1. https://www.digitalocean.com/community/tutorials/how-to-install-java-on-centos-and-fedora
  2. http://www.go.cd/documentation/user/current/installation/install/server/linux.html
  3. http://www.go.cd/documentation/user/current/installation/install/agent/linux.html

No comments: