From c9c265045633e3160a30e3ed178caf65d2842ca5 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 20 Oct 2017 15:34:11 +1300 Subject: [PATCH 1/8] [ci-workers] Install Python modules in a virtualenv --- contrib/ci-workers/files/bashrc | 2 ++ .../templates/buildbot-worker.service.j2 | 6 ++--- contrib/ci-workers/unix.yml | 24 +++++++++++++++---- contrib/ci-workers/vars/Archlinux.yml | 1 - contrib/ci-workers/vars/CentOS.yml | 1 - contrib/ci-workers/vars/default.yml | 7 +++--- 6 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 contrib/ci-workers/files/bashrc diff --git a/contrib/ci-workers/files/bashrc b/contrib/ci-workers/files/bashrc new file mode 100644 index 000000000..aaad18b92 --- /dev/null +++ b/contrib/ci-workers/files/bashrc @@ -0,0 +1,2 @@ +export PATH=$HOME/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +export EDITOR=vim diff --git a/contrib/ci-workers/templates/buildbot-worker.service.j2 b/contrib/ci-workers/templates/buildbot-worker.service.j2 index ffe497bcf..d77e9559d 100644 --- a/contrib/ci-workers/templates/buildbot-worker.service.j2 +++ b/contrib/ci-workers/templates/buildbot-worker.service.j2 @@ -7,9 +7,9 @@ After=network.target Type=forking PIDFile=/home/{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/twistd.pid WorkingDirectory=/home/{{ buildbot_worker_user }} -ExecStart={{ pip_bin_dir }}/buildbot-worker start {{ buildbot_worker_name }} -ExecReload={{ pip_bin_dir }}/buildbot-worker restart {{ buildbot_worker_name }} -ExecStop={{ pip_bin_dir }}/buildbot-worker stop {{ buildbot_worker_name }} +ExecStart=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker start {{ buildbot_worker_name }} +ExecReload=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker restart {{ buildbot_worker_name }} +ExecStop=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker stop {{ buildbot_worker_name }} Restart=always User={{ buildbot_worker_user }} diff --git a/contrib/ci-workers/unix.yml b/contrib/ci-workers/unix.yml index 6e6cc49c4..17c46d6e0 100644 --- a/contrib/ci-workers/unix.yml +++ b/contrib/ci-workers/unix.yml @@ -88,12 +88,11 @@ include: tasks/install-pip.yml when: ansible_distribution == 'CentOS' - - name: Install required Python modules + - name: Install required Python system modules pip: name: "{{ item }}" state: latest - with_items: "{{ python_modules }}" - notify: restart buildbot-worker + with_items: "{{ system_modules }}" - name: Set up the Buildbot worker user user: @@ -102,9 +101,18 @@ shell: /bin/bash state: present + - name: Install required Python modules + pip: + name: "{{ item }}" + state: latest + virtualenv: "~{{ buildbot_worker_user }}/venv" + with_items: "{{ python_modules }}" + become_user: "{{ buildbot_worker_user }}" + notify: restart buildbot-worker + - name: Create Buildbot worker command: > - buildbot-worker create-worker ~/{{ buildbot_worker_name }} + ~{{ buildbot_worker_user }}/venv/bin/buildbot-worker create-worker ~/{{ buildbot_worker_name }} {{ buildbot_master_host }}:{{ buildbot_master_port }} {{ buildbot_worker_name|quote }} {{ buildbot_worker_password|quote }} args: @@ -127,6 +135,14 @@ group: "{{ buildbot_worker_user }}" mode: "0644" + - name: Install custom bashrc for virtualenv + copy: + src: bashrc + dest: "~{{ buildbot_worker_user }}/.bashrc" + owner: "{{ buildbot_worker_user }}" + group: "{{ buildbot_worker_user }}" + mode: "0644" + - name: Copy Buildbot worker systemd service unit template: src: templates/buildbot-worker.service.j2 diff --git a/contrib/ci-workers/vars/Archlinux.yml b/contrib/ci-workers/vars/Archlinux.yml index ac4a44e5b..896a10304 100644 --- a/contrib/ci-workers/vars/Archlinux.yml +++ b/contrib/ci-workers/vars/Archlinux.yml @@ -4,4 +4,3 @@ buildbot_deps: build_deps: - multilib/gcc - make -pip_bin_dir: /usr/bin diff --git a/contrib/ci-workers/vars/CentOS.yml b/contrib/ci-workers/vars/CentOS.yml index 7e09b0717..906f53a42 100644 --- a/contrib/ci-workers/vars/CentOS.yml +++ b/contrib/ci-workers/vars/CentOS.yml @@ -10,4 +10,3 @@ dist_deps: - pkgconfig # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in - python-devel - redhat-rpm-config -pip_bin_dir: /usr/bin diff --git a/contrib/ci-workers/vars/default.yml b/contrib/ci-workers/vars/default.yml index 38c5afc8e..b3e861932 100644 --- a/contrib/ci-workers/vars/default.yml +++ b/contrib/ci-workers/vars/default.yml @@ -34,6 +34,10 @@ grind_deps: - lcov - valgrind +# Python modules required on the system +system_modules: + - virtualenv + # Python modules required for a Zcash Buildbot worker buildbot_modules: - pip # Needs to be updated first so Buildbot installs @@ -44,6 +48,3 @@ buildbot_modules: rpc_test_modules: - pyblake2 - pyzmq - -# Environment variables -pip_bin_dir: /usr/local/bin From 8bdabdb37ea1e7c3ad609b92c749904c3c9f4697 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 20 Oct 2017 13:37:46 +1300 Subject: [PATCH 2/8] [ci-workers] Handle user home directories outside /home --- .../ci-workers/templates/buildbot-worker.service.j2 | 10 +++++----- contrib/ci-workers/unix.yml | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/contrib/ci-workers/templates/buildbot-worker.service.j2 b/contrib/ci-workers/templates/buildbot-worker.service.j2 index d77e9559d..625323be6 100644 --- a/contrib/ci-workers/templates/buildbot-worker.service.j2 +++ b/contrib/ci-workers/templates/buildbot-worker.service.j2 @@ -5,11 +5,11 @@ After=network.target [Service] Type=forking -PIDFile=/home/{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/twistd.pid -WorkingDirectory=/home/{{ buildbot_worker_user }} -ExecStart=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker start {{ buildbot_worker_name }} -ExecReload=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker restart {{ buildbot_worker_name }} -ExecStop=/home/{{ buildbot_worker_user }}/venv/bin/buildbot-worker stop {{ buildbot_worker_name }} +PIDFile={{ buildbot_worker_dir }}/{{ buildbot_worker_name }}/twistd.pid +WorkingDirectory={{ buildbot_worker_dir }} +ExecStart={{ buildbot_worker_dir }}/venv/bin/buildbot-worker start {{ buildbot_worker_name }} +ExecReload={{ buildbot_worker_dir }}/venv/bin/buildbot-worker restart {{ buildbot_worker_name }} +ExecStop={{ buildbot_worker_dir }}/venv/bin/buildbot-worker stop {{ buildbot_worker_name }} Restart=always User={{ buildbot_worker_user }} diff --git a/contrib/ci-workers/unix.yml b/contrib/ci-workers/unix.yml index 17c46d6e0..8f2a2f239 100644 --- a/contrib/ci-workers/unix.yml +++ b/contrib/ci-workers/unix.yml @@ -101,6 +101,15 @@ shell: /bin/bash state: present + - name: Get absolute path to Buildbot worker home directory + command: echo ~ + register: homedir + become_user: "{{ buildbot_worker_user }}" + + - name: Save absolute path to Buildbot worker home directory + set_fact: + buildbot_worker_dir: "{{ homedir.stdout }}" + - name: Install required Python modules pip: name: "{{ item }}" From 62ac481806bc37f06ccf6917ad4e72794c2cc14a Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 20 Oct 2017 18:22:33 +1300 Subject: [PATCH 3/8] [ci-workers] Handle ansible_processor being either a string or a list --- contrib/ci-workers/templates/host.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ci-workers/templates/host.j2 b/contrib/ci-workers/templates/host.j2 index 3a5abb0c2..65c4cb709 100644 --- a/contrib/ci-workers/templates/host.j2 +++ b/contrib/ci-workers/templates/host.j2 @@ -1,3 +1,3 @@ OS: {{ ansible_distribution }} {{ ansible_distribution_version }} Memory: {{ ansible_memtotal_mb }} MB -CPU: {{ ansible_processor[1] }} +CPU: {{ ansible_processor if ansible_processor is string else ansible_processor[1] }} ({{ ansible_processor_cores }} cores) From 9d1c37f79354c4f3ba88759d100dc08bde87ac62 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 20 Oct 2017 18:23:25 +1300 Subject: [PATCH 4/8] [ci-workers] Add support for MacOSX --- contrib/ci-workers/tasks/install-brew.yml | 10 +++++ .../templates/buildbot-worker.plist.j2 | 23 +++++++++++ contrib/ci-workers/unix.yml | 38 ++++++++++++++++--- contrib/ci-workers/vars/MacOSX.yml | 5 +++ 4 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 contrib/ci-workers/tasks/install-brew.yml create mode 100644 contrib/ci-workers/templates/buildbot-worker.plist.j2 create mode 100644 contrib/ci-workers/vars/MacOSX.yml diff --git a/contrib/ci-workers/tasks/install-brew.yml b/contrib/ci-workers/tasks/install-brew.yml new file mode 100644 index 000000000..5faedad0b --- /dev/null +++ b/contrib/ci-workers/tasks/install-brew.yml @@ -0,0 +1,10 @@ +--- +- name: Check if brew is installed + stat: + path: /usr/local/bin/brew + register: brew_check + +- name: Fail if brew is unavailable + fail: + msg: 'brew is not installed! Please install Homebrew: https://docs.brew.sh/Installation.html' + when: not brew_check.stat.exists diff --git a/contrib/ci-workers/templates/buildbot-worker.plist.j2 b/contrib/ci-workers/templates/buildbot-worker.plist.j2 new file mode 100644 index 000000000..225c73b8a --- /dev/null +++ b/contrib/ci-workers/templates/buildbot-worker.plist.j2 @@ -0,0 +1,23 @@ + + + + + Label + net.buildbot.worker + ProgramArguments + + {{ buildbot_worker_dir }}/venv/bin/buildbot-worker + start + {{ buildbot_worker_name }} + + WorkingDirectory + {{ buildbot_worker_dir }} + UserName + {{ buildbot_worker_user }} + KeepAlive + + NetworkState + + + + diff --git a/contrib/ci-workers/unix.yml b/contrib/ci-workers/unix.yml index 8f2a2f239..7588362be 100644 --- a/contrib/ci-workers/unix.yml +++ b/contrib/ci-workers/unix.yml @@ -72,6 +72,10 @@ package_deps: "{{ buildbot_deps + fetch_deps + conf_deps + build_deps + link_deps + dist_deps }}" python_modules: "{{ buildbot_modules + rpc_test_modules }}" + - name: Install Homebrew [MacOSX] + include: tasks/install-brew.yml + when: ansible_distribution == 'MacOSX' + - name: Update rolling release [Arch Linux] pacman: update_cache: yes @@ -83,15 +87,17 @@ name: "{{ item }}" state: present with_items: "{{ package_deps }}" + become_user: "{{ ansible_ssh_user if ansible_distribution == 'MacOSX' else 'root' }}" - - name: Install pip [CentOS] + - name: Install pip [CentOS, MacOSX] include: tasks/install-pip.yml - when: ansible_distribution == 'CentOS' + when: ansible_distribution in ['CentOS', 'MacOSX'] - name: Install required Python system modules pip: name: "{{ item }}" state: latest + executable: "{{ '/usr/local/bin/pip' if ansible_distribution == 'MacOSX' else omit }}" with_items: "{{ system_modules }}" - name: Set up the Buildbot worker user @@ -115,6 +121,7 @@ name: "{{ item }}" state: latest virtualenv: "~{{ buildbot_worker_user }}/venv" + virtualenv_command: "{{ '/usr/local/bin/virtualenv' if ansible_distribution == 'MacOSX' else omit }}" with_items: "{{ python_modules }}" become_user: "{{ buildbot_worker_user }}" notify: restart buildbot-worker @@ -133,7 +140,7 @@ content: "{{ buildbot_worker_admin }}" dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/admin" owner: "{{ buildbot_worker_user }}" - group: "{{ buildbot_worker_user }}" + group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}" mode: "0644" - name: Set host details for Buildbot worker @@ -141,7 +148,7 @@ src: "{{ buildbot_worker_host_template }}" dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/host" owner: "{{ buildbot_worker_user }}" - group: "{{ buildbot_worker_user }}" + group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}" mode: "0644" - name: Install custom bashrc for virtualenv @@ -149,7 +156,7 @@ src: bashrc dest: "~{{ buildbot_worker_user }}/.bashrc" owner: "{{ buildbot_worker_user }}" - group: "{{ buildbot_worker_user }}" + group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}" mode: "0644" - name: Copy Buildbot worker systemd service unit @@ -159,13 +166,32 @@ owner: root group: root mode: "0644" + when: ansible_distribution != 'MacOSX' notify: reload systemd - - name: Start Buildbot worker. + - name: Copy Buildbot worker launchd service unit + template: + src: templates/buildbot-worker.plist.j2 + dest: "/Library/LaunchDaemons/net.buildbot.worker.plist" + owner: root + group: wheel + mode: "0644" + when: ansible_distribution == 'MacOSX' + + - name: Start Buildbot worker service: name: buildbot-worker state: started enabled: yes + when: ansible_distribution != 'MacOSX' + + - name: Load Buildbot worker service [MacOSX] + command: launchctl load /Library/LaunchDaemons/net.buildbot.worker.plist + when: ansible_distribution == 'MacOSX' + + - name: Start Buildbot worker [MacOSX] + command: launchctl start net.buildbot.worker + when: ansible_distribution == 'MacOSX' handlers: - name: restart buildbot-worker diff --git a/contrib/ci-workers/vars/MacOSX.yml b/contrib/ci-workers/vars/MacOSX.yml new file mode 100644 index 000000000..8e2eaa158 --- /dev/null +++ b/contrib/ci-workers/vars/MacOSX.yml @@ -0,0 +1,5 @@ +--- +buildbot_deps: + - coreutils # For gnproc etc. +# Already installed +build_deps: [] From 8d4eebc7f305c1d6a5a04d55134c028fcac447e9 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 29 Oct 2017 11:22:15 +1300 Subject: [PATCH 5/8] [ci-workers] Add a tag for updating dependencies --- contrib/ci-workers/unix.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/ci-workers/unix.yml b/contrib/ci-workers/unix.yml index 7588362be..cbb693401 100644 --- a/contrib/ci-workers/unix.yml +++ b/contrib/ci-workers/unix.yml @@ -50,6 +50,7 @@ - name: Gathering Facts setup: + tags: deps - name: Fail if Python is the wrong version fail: @@ -66,21 +67,25 @@ - "vars/{{ ansible_distribution }}.yml" - "vars/{{ ansible_os_family }}.yml" skip: true + tags: deps - name: Collate dependencies set_fact: package_deps: "{{ buildbot_deps + fetch_deps + conf_deps + build_deps + link_deps + dist_deps }}" python_modules: "{{ buildbot_modules + rpc_test_modules }}" + tags: deps - name: Install Homebrew [MacOSX] include: tasks/install-brew.yml when: ansible_distribution == 'MacOSX' + tags: deps - name: Update rolling release [Arch Linux] pacman: update_cache: yes upgrade: yes when: ansible_distribution == 'Archlinux' + tags: deps - name: Install required packages package: @@ -88,6 +93,7 @@ state: present with_items: "{{ package_deps }}" become_user: "{{ ansible_ssh_user if ansible_distribution == 'MacOSX' else 'root' }}" + tags: deps - name: Install pip [CentOS, MacOSX] include: tasks/install-pip.yml From 52d5b293903fcc30faff13c210942f830da0a3d8 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 29 Nov 2017 18:04:42 +0000 Subject: [PATCH 6/8] [ci-workers] Add curl and cmake to dependencies --- contrib/ci-workers/vars/Archlinux.yml | 1 + contrib/ci-workers/vars/CentOS.yml | 1 + contrib/ci-workers/vars/Debian.yml | 1 + contrib/ci-workers/vars/Fedora.yml | 1 + contrib/ci-workers/vars/FreeBSD.yml | 1 + contrib/ci-workers/vars/MacOSX.yml | 5 +++-- contrib/ci-workers/vars/Ubuntu.yml | 1 + contrib/ci-workers/vars/default.yml | 2 ++ 8 files changed, 11 insertions(+), 2 deletions(-) diff --git a/contrib/ci-workers/vars/Archlinux.yml b/contrib/ci-workers/vars/Archlinux.yml index 896a10304..50e5577c3 100644 --- a/contrib/ci-workers/vars/Archlinux.yml +++ b/contrib/ci-workers/vars/Archlinux.yml @@ -2,5 +2,6 @@ buildbot_deps: - python2-pip build_deps: + - cmake - multilib/gcc - make diff --git a/contrib/ci-workers/vars/CentOS.yml b/contrib/ci-workers/vars/CentOS.yml index 906f53a42..f577af5c0 100644 --- a/contrib/ci-workers/vars/CentOS.yml +++ b/contrib/ci-workers/vars/CentOS.yml @@ -2,6 +2,7 @@ buildbot_deps: [] # Empty to remove python-pip build_deps: - bzip2 + - cmake - gcc - gcc-c++ - make diff --git a/contrib/ci-workers/vars/Debian.yml b/contrib/ci-workers/vars/Debian.yml index 992224721..5e3e34690 100644 --- a/contrib/ci-workers/vars/Debian.yml +++ b/contrib/ci-workers/vars/Debian.yml @@ -1,6 +1,7 @@ --- build_deps: - build-essential # Depends on g++, libc6-dev, make + - cmake dist_deps: - pkg-config # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in - python-dev diff --git a/contrib/ci-workers/vars/Fedora.yml b/contrib/ci-workers/vars/Fedora.yml index 1c6b0e0f3..2a7351c69 100644 --- a/contrib/ci-workers/vars/Fedora.yml +++ b/contrib/ci-workers/vars/Fedora.yml @@ -1,5 +1,6 @@ --- build_deps: + - cmake - gcc - gcc-c++ - make diff --git a/contrib/ci-workers/vars/FreeBSD.yml b/contrib/ci-workers/vars/FreeBSD.yml index 65909d71d..4b1f01997 100644 --- a/contrib/ci-workers/vars/FreeBSD.yml +++ b/contrib/ci-workers/vars/FreeBSD.yml @@ -2,6 +2,7 @@ buildbot_deps: - py27-pip build_deps: + - cmake - gcc - gmake dist_deps: diff --git a/contrib/ci-workers/vars/MacOSX.yml b/contrib/ci-workers/vars/MacOSX.yml index 8e2eaa158..80b1ae608 100644 --- a/contrib/ci-workers/vars/MacOSX.yml +++ b/contrib/ci-workers/vars/MacOSX.yml @@ -1,5 +1,6 @@ --- buildbot_deps: - coreutils # For gnproc etc. -# Already installed -build_deps: [] +# Most are already installed +build_deps: + - cmake diff --git a/contrib/ci-workers/vars/Ubuntu.yml b/contrib/ci-workers/vars/Ubuntu.yml index 4acca499b..2cc9fa3ec 100644 --- a/contrib/ci-workers/vars/Ubuntu.yml +++ b/contrib/ci-workers/vars/Ubuntu.yml @@ -1,5 +1,6 @@ --- build_deps: - build-essential # Depends on g++, libc6-dev, make + - cmake dist_deps: - pkg-config # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in diff --git a/contrib/ci-workers/vars/default.yml b/contrib/ci-workers/vars/default.yml index b3e861932..cc0ae7c98 100644 --- a/contrib/ci-workers/vars/default.yml +++ b/contrib/ci-workers/vars/default.yml @@ -7,6 +7,7 @@ buildbot_deps: # Dependencies required to download files fetch_deps: + - curl # For depends/ - git - wget # For zcutil/fetch-params.sh @@ -18,6 +19,7 @@ conf_deps: # Dependencies required to compile Zcash build_deps: + - cmake - g++ - gcc - make From 574750005f8a78ddf1594252ab1a0ecf0ea041a0 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 29 Nov 2017 18:08:39 +0000 Subject: [PATCH 7/8] [ci-workers] README cleanups --- contrib/ci-workers/README.md | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/contrib/ci-workers/README.md b/contrib/ci-workers/README.md index 37f7ad833..8ce9dc764 100644 --- a/contrib/ci-workers/README.md +++ b/contrib/ci-workers/README.md @@ -5,29 +5,29 @@ installation for use as a Buildbot worker in Zcash's CI. # Criteria for Adding Workers -a. Don't add workers until users complain about a problem on a platform - that doesn't yet have workers or if we anticipate many users will use - a platform, we may pre-emptively add an unsupported worker for it. +a. Don't add workers until users complain about a problem on a platform that + doesn't yet have workers. However, if we anticipate many users will use a + platform, we may pre-emptively add an unsupported worker for it. b. Prioritize the platforms that seem to have the most users. -c. When adding workers start by adding workers for the "most common" - variant of any distro, then if users later encounter problems with a - sub-variant, we can consider adding new workers at that point. - Example: add Ubuntu Desktop before Xubuntu, on the assumption the - former has a larger population base. +c. When adding workers, start by adding workers for the "most common" variant of + any distro. Then if users later encounter problems with a sub-variant, we can + consider adding new workers at that point. Example: add Ubuntu Desktop before + Xubuntu, on the assumption the former has a larger population base, and the + latter only materially differs in the GUI. # Setting up a latent worker on Amazon EC2 -- Add a regular (non-latent) worker to the master.cfg for dev-ci.z.cash, and - deploy the changes. +1. Add a regular (non-latent) worker to the master.cfg for dev-ci.z.cash, and + deploy the changes. - This enables the Ansible playbook to run to completion, ending in the worker connecting to the master. -- Start a basic EC2 instance using the template AMI for the target OS. +2. Start a basic EC2 instance using the template AMI for the target OS. - Choose the smallest instance size, it won't be used for building Zcash. -- Figure out which user to log into the instance with. +3. Figure out which user to log into the instance with. - E.g. for the Ubuntu template, use "ubuntu" instead of "root" - If you get an Ansible error later with a message like "Failed to connect to the host via ssh: Received message too long 1349281121\r\n", that means the @@ -35,28 +35,28 @@ c. When adding workers start by adding workers for the "most common" Ansible protocol is balking. Try manually logging in with the same credentials to diagnose. -- Create `inventory/hosts` containing the following: +4. Create `inventory/hosts` containing the following: [zcash-ci-worker-unix] some-name ansible_host= ansible_ssh_user= -- Run `ansible-playbook -e buildbot_worker_host_template=templates/host.ec2.j2 -i inventory/hosts unix.yml`, - passing in the worker's Buildbot name and password. +5. Run `ansible-playbook -e buildbot_worker_host_template=templates/host.ec2.j2 -i inventory/hosts unix.yml`, + passing in the worker's Buildbot name and password. - After a successful run, the worker should be connected to dev-ci.z.cash and visible in its worker list. -- Create an AMI from the instance. This is the worker AMI to put into the - master.cfg for dev-ci.z.cash. +6. Create an AMI from the instance. This is the worker AMI to put into the + master.cfg for dev-ci.z.cash. - 16 GB of storage should be sufficient. -- SSH into the instance, and edit the worker config to connect to ci.z.cash. +7. SSH into the instance, and edit the worker config to connect to ci.z.cash. -- Create an AMI from the instance. This is the worker AMI to put into the - master.cfg for ci.z.cash. +8. Create an AMI from the instance. This is the worker AMI to put into the + master.cfg for ci.z.cash. - 16 GB of storage should be sufficient. -- Delete the instance (it is no longer needed). +9. Delete the instance (it is no longer needed). -- Edit the master.cfg to turn the new worker into a latent (using the new AMI - IDs), add it to the appropriate worker groups, set up new builders etc. +10. Edit the master.cfg to turn the new worker into a latent (using the new AMI + IDs), add it to the appropriate worker groups, set up new builders etc. - Deploy this via the normal PR review process. From 50eaefed4c905a1adc02e1e3e659da25abcd3f01 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 1 Dec 2017 12:25:19 +0000 Subject: [PATCH 8/8] [ci-workers] Add pkg-config to general dependencies --- contrib/ci-workers/vars/Debian.yml | 1 - contrib/ci-workers/vars/Ubuntu.yml | 2 -- contrib/ci-workers/vars/default.yml | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/ci-workers/vars/Debian.yml b/contrib/ci-workers/vars/Debian.yml index 5e3e34690..b6a46f0cd 100644 --- a/contrib/ci-workers/vars/Debian.yml +++ b/contrib/ci-workers/vars/Debian.yml @@ -3,5 +3,4 @@ build_deps: - build-essential # Depends on g++, libc6-dev, make - cmake dist_deps: - - pkg-config # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in - python-dev diff --git a/contrib/ci-workers/vars/Ubuntu.yml b/contrib/ci-workers/vars/Ubuntu.yml index 2cc9fa3ec..0d0f584b4 100644 --- a/contrib/ci-workers/vars/Ubuntu.yml +++ b/contrib/ci-workers/vars/Ubuntu.yml @@ -2,5 +2,3 @@ build_deps: - build-essential # Depends on g++, libc6-dev, make - cmake -dist_deps: - - pkg-config # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in diff --git a/contrib/ci-workers/vars/default.yml b/contrib/ci-workers/vars/default.yml index cc0ae7c98..a0b0da9e6 100644 --- a/contrib/ci-workers/vars/default.yml +++ b/contrib/ci-workers/vars/default.yml @@ -16,6 +16,7 @@ conf_deps: - autoconf - automake - m4 + - pkg-config # Dependencies required to compile Zcash build_deps: