Changeset View
Standalone View
contrib/teamcity/README.md
Show All 12 Lines | |||||
1. OS: Debian (Stretch; Ubuntu works as a backup option) | 1. OS: Debian (Stretch; Ubuntu works as a backup option) | ||||
2. Disk Space: 20GB (Disk space can be increased later. Always start with the smallest disk space necessary to reduce overhead costs) | 2. Disk Space: 20GB (Disk space can be increased later. Always start with the smallest disk space necessary to reduce overhead costs) | ||||
3. CPUs: 4+ (recommended 8+ for IBD and gitian builds) | 3. CPUs: 4+ (recommended 8+ for IBD and gitian builds) | ||||
4. Memory: 8GB+ (minimum 32GB for running IBD) | 4. Memory: 8GB+ (minimum 32GB for running IBD) | ||||
## Stepup user to run builds | ## Stepup user to run builds | ||||
``` | ``` | ||||
# As root, install sudo | |||||
apt-get install sudo | |||||
jasonbcox: Does this really need to be part of this README? Installing sudo on a fresh machine seems… | |||||
FabienAuthorUnsubmitted Done Inline ActionsIt depends on the goal of the document. If the goal of this document is to provide help for installing an agent on any linux, with Debian as an example and not a guide, I agree this is overkill. Let me know what you think is the right approach here. Fabien: It depends on the goal of the document.
If this is intended to be a step by step guide, sudo… | |||||
jasonbcoxUnsubmitted Not Done Inline ActionsI suppose it's ok since the doc explicitly states a clean-slate VM. jasonbcox: I suppose it's ok since the doc explicitly states a clean-slate VM. | |||||
# Create the build user | # Create the build user | ||||
sudo useradd teamcity | adduser teamcity | ||||
# Add the user to the sudo group | |||||
adduser teamcity sudo | |||||
jasonbcoxUnsubmitted Not Done Inline Actionsadduser needs sudo (both lines) jasonbcox: adduser needs sudo (both lines) | |||||
FabienAuthorUnsubmitted Done Inline ActionsNot yet, as the teamcity user is not in the sudo group these commands should be run when logged as root. Fabien: Not yet, as the `teamcity` user is not in the sudo group these commands should be run when… | |||||
jasonbcoxUnsubmitted Not Done Inline ActionsAh, right. Thanks for fixing the comments. jasonbcox: Ah, right. Thanks for fixing the comments. | |||||
# Login to this user for the next step | # Login to this user for the next step | ||||
sudo su teamcity | sudo su teamcity | ||||
cd ~ | cd ~ | ||||
``` | ``` | ||||
## Install TeamCity Agent Software | ## Install TeamCity Agent Software | ||||
In general, the instructions provided by TeamCity may be followed for setting up a new agent image: https://confluence.jetbrains.com/display/TCD18/Setting+up+and+Running+Additional+Build+Agents | In general, the instructions provided by TeamCity may be followed for setting up a new agent image: https://confluence.jetbrains.com/display/TCD18/Setting+up+and+Running+Additional+Build+Agents | ||||
However, the instructions are not step-by-step and require a lot of decision making. Below is an attempt to break the instructions down so they can be executed quickly: | However, the instructions are not step-by-step and require a lot of decision making. Below is an attempt to break the instructions down so they can be executed quickly: | ||||
``` | ``` | ||||
# Install Java JRE | # Install Java JRE | ||||
sudo apt-get install default-jre | sudo apt-get install default-jre | ||||
sudo vim /etc/environment | sudo vim /etc/environment | ||||
# Add the following line to /etc/environment: | # Add the following line to /etc/environment: | ||||
JAVA_HOME="/usr/lib/jvm/default-java" | JAVA_HOME="/usr/lib/jvm/default-java" | ||||
# If this link is not available, it can be found at: | # If this link is not available, it can be found at: | ||||
# https://build.bitcoinabc.org/agents.html -> "Install Build Agents" | # https://build.bitcoinabc.org/agents.html -> "Install Build Agents" | ||||
wget https://build.bitcoinabc.org/update/buildAgent.zip | wget https://build.bitcoinabc.org/update/buildAgent.zip | ||||
# Location of where to untar this is up to you, but home directory works fine | # Location of where to unzip this is up to you, here buildAgent is assumed: | ||||
tar xf buildAgent.tar.gz | sudo apt-get install unzip | ||||
cd conf | unzip -d buildAgent buildAgent.zip | ||||
cd buildAgent/conf | |||||
cp buildAgent.dist.properties buildAgent.properties | cp buildAgent.dist.properties buildAgent.properties | ||||
vim buildAgent.properties | vim buildAgent.properties | ||||
# Edit the serverUrl line to the following: | # Edit the serverUrl line to the following: | ||||
serverUrl=https://build.bitcoinabc.org/ | serverUrl=https://build.bitcoinabc.org/ | ||||
# Make sure agent.sh is executable | # Make sure agent.sh is executable | ||||
cd ../bin | cd ../bin | ||||
chmod +x agent.sh | chmod +x agent.sh | ||||
# Setup automatic start for the TeamCity agent | # Setup automatic start for the TeamCity agent | ||||
cd /etc/init.d | cd /etc/init.d | ||||
sudo vim buildAgent | sudo vim buildAgent | ||||
# Copy the contents of the buildAgent-autostart script in the directory of | # Copy the contents of the buildAgent-autostart script in the directory of | ||||
# this README into buildAgent. Modify the cd ~/bin and/or USER as needed. | # this README into buildAgent. Modify the AGENT_PATH and/or USER as needed. | ||||
sudo chmod 755 buildAgent | sudo chmod 755 buildAgent | ||||
sudo update-rc.d buildAgent defaults | sudo update-rc.d buildAgent defaults | ||||
# Reboot the machine or manually start the service | |||||
/etc/init.d/buildAgent start | |||||
# Ensure the agent is RUNNING | |||||
/etc/init.d/buildAgent status | |||||
``` | ``` | ||||
## Install necessary build dependencies for bitcoin-abc | ## Install necessary build dependencies for bitcoin-abc | ||||
See [build-unix.md](doc/build-unix.md) | See [build-unix.md](doc/build-unix.md) |
Does this really need to be part of this README? Installing sudo on a fresh machine seems intuitive enough and expected for any fresh machine you're setting up.