Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/README.md
Show All 9 Lines | |||||
## Create a new, empty VM | ## Create a new, empty VM | ||||
Select the following options: | Select the following options: | ||||
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 | ## Setup user to run builds | ||||
``` | ``` | ||||
# Create the build user | # As root, install sudo | ||||
sudo useradd teamcity | apt-get install sudo | ||||
# Still as root, create the build user... | |||||
adduser teamcity | |||||
# .. and add it to the sudo group | |||||
adduser teamcity sudo | |||||
# 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) |