Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864816
D6989.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D6989.diff
View Options
diff --git a/doc/gitian-building/gitian-building-setup-gitian-debian.md b/doc/gitian-building/gitian-building-setup-gitian-debian.md
--- a/doc/gitian-building/gitian-building-setup-gitian-debian.md
+++ b/doc/gitian-building/gitian-building-setup-gitian-debian.md
@@ -2,7 +2,6 @@
-----------------
- [Setting up Debian for Gitian building](#setting-up-debian-for-gitian-building)
-- [Installing Gitian](#installing-gitian)
- [Setting up the Gitian image](#setting-up-the-gitian-image)
@@ -12,6 +11,12 @@
In this section we will be setting up the Debian installation for Gitian building.
We assume that a user `gitianuser` was previously added.
+There are various options for running the Gitian builds. Building with LXC or
+Docker containers are documented below, but other options exist.
+
+
+**Using a LXC container:**
+
First we need to set up dependencies. Type/paste the following in the terminal:
```bash
@@ -54,37 +59,41 @@
reboot
```
-At the end Debian is rebooted to make sure that the changes take effect. The steps in this
-section only need to be performed once.
-**Note**: When sudo asks for a password, enter the password for the user `gitianuser` not for `root`.
+**Using a Docker container:**
-Installing Gitian
------------------
+First we need to set up dependencies. Type/paste the following in the terminal:
-Re-login as the user `gitianuser` that was created during installation.
-The rest of the steps in this guide will be performed as that user.
+```bash
+sudo apt-get install apt-cacher-ng curl docker.io firewalld git make ruby wget
+```
-There is no `python-vm-builder` package in Debian, so we need to install it from source ourselves,
+Then a few steps are required to complete the configuration:
```bash
-wget http://archive.ubuntu.com/ubuntu/pool/universe/v/vm-builder/vm-builder_0.12.4+bzr494.orig.tar.gz
-echo "76cbf8c52c391160b2641e7120dbade5afded713afaa6032f733a261f13e6a8e vm-builder_0.12.4+bzr494.orig.tar.gz" | sha256sum -c
-# (verification -- must return OK)
-tar -zxvf vm-builder_0.12.4+bzr494.orig.tar.gz
-cd vm-builder-0.12.4+bzr494
-sudo python setup.py install
-cd ..
-```
+# Make sure the apt-cacher-ng, docker and firewalld services are enabled
+sudo systemctl enable apt-cacher-ng
+sudo systemctl enable docker
+sudo systemctl enable firewalld
-**Note**: When sudo asks for a password, enter the password for the user `gitianuser` not for `root`.
+# Add the gitianuser to the docker group (required to connect to the daemon)
+sudo usermod -aG docker gitianuser
-Clone the git repository for Bitcoin ABC which contains the Gitian sources.
+# Add a firewall rule to allow docker access to apt-cacher-ng
+sudo firewall-cmd --permanent --zone=trusted --add-interface=docker0
-```bash
-git clone https://github.com/Bitcoin-ABC/bitcoin-abc.git
+# Make sure that USE_DOCKER is always set when logging in as gitianuser
+echo 'export USE_DOCKER=1' >> /home/gitianuser/.profile
+
+# Reboot to apply the changes
+reboot
```
+At the end Debian is rebooted to make sure that the changes take effect. The steps in this
+section only need to be performed once.
+
+**Note**: When sudo asks for a password, enter the password for the user `gitianuser` not for `root`.
+
Setting up the Gitian image
---------------------------
@@ -97,7 +106,14 @@
Execute the following as user `gitianuser`:
```bash
+git clone https://github.com/Bitcoin-ABC/bitcoin-abc.git
cd bitcoin-abc/contrib/gitian-builder
+```
+
+
+**For LXC:**
+
+```bash
bin/make-base-vm --lxc --arch amd64 --distro debian --suite buster
```
@@ -105,6 +121,13 @@
**Note**: When sudo asks for a password, enter the password for the user `gitianuser` not for `root`.
+
+**For Docker:**
+
+```bash
+bin/make-base-vm --docker --arch amd64 --distro debian --suite buster
+```
+
Downloading dependencies
------------------------
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 22:36 (20 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5866071
Default Alt Text
D6989.diff (3 KB)
Attached To
D6989: [GITIAN] Add documentation for building using Docker
Event Timeline
Log In to Comment