Skip to content

Instantly share code, notes, and snippets.

@mpiscaer
Created May 4, 2020 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpiscaer/2e731c8becea781c4521cc15b5cfeabe to your computer and use it in GitHub Desktop.
Save mpiscaer/2e731c8becea781c4521cc15b5cfeabe to your computer and use it in GitHub Desktop.
apt install zookeeper zookeeperd python3-pip python-pip
apt-get install -d $(bindep -b compile)
# install nodepool
sudo groupadd --system nodepool
sudo useradd --system nodepool --home-dir /var/lib/nodepool --create-home -g nodepool
ssh-keygen -t rsa -m PEM -b 2048 -f nodepool_rsa -N ''
sudo mkdir /etc/nodepool/
sudo mkdir /var/log/nodepool
sudo chgrp -R nodepool /var/log/nodepool/
sudo chmod 775 /var/log/nodepool/
git clone https://opendev.org/zuul/nodepool
pushd nodepool/
apt-get install -d $(bindep -b compile)
sudo pip3 install .
sudo cp etc/nodepool-launcher.service /etc/systemd/system/nodepool-launcher.service
sudo chmod 0644 /etc/systemd/system/nodepool-launcher.service
popd
# install zuul
sudo groupadd --system zuul
sudo useradd --system zuul --home-dir /var/lib/zuul --create-home -g zuul
sudo mkdir /etc/zuul/
sudo mkdir /var/log/zuul/
sudo chown zuul:zuul /var/log/zuul/
sudo mkdir /var/lib/zuul/.ssh
sudo chmod 0700 /var/lib/zuul/.ssh
sudo mv nodepool_rsa /var/lib/zuul/.ssh
sudo chown -R zuul:zuul /var/lib/zuul/.ssh
git clone https://opendev.org/zuul/zuul
pushd zuul/
apt-get install -d $(bindep -b compile)
tools/install-js-tools.sh
sudo pip3 install .
sudo zuul-manage-ansible
sudo cp etc/zuul-scheduler.service /etc/systemd/system/zuul-scheduler.service
sudo cp etc/zuul-executor.service /etc/systemd/system/zuul-executor.service
sudo cp etc/zuul-web.service /etc/systemd/system/zuul-web.service
sudo chmod 0644 /etc/systemd/system/zuul-scheduler.service
sudo chmod 0644 /etc/systemd/system/zuul-executor.service
sudo chmod 0644 /etc/systemd/system/zuul-web.service
popd
"cat > /etc/zuul/zuul.conf <<EOF
[gearman]
server=127.0.0.1
[gearman_server]
start=true
[zookeeper]
hosts=localhost
[executor]
private_key_file=/var/lib/zuul/.ssh/nodepool_rsa
[merger]
git_user_name=username
git_user_email=username@cgm.com
[web]
listen_address=0.0.0.0
[scheduler]
tenant_config=/etc/zuul/main.yaml
[connection zuul-git]
driver=git
baseurl=https://opendev.org/
[connection gitlab]
driver=gitlab
webhook_token=shared_secret
cloneurl=https://username:gitlab_personal_token@git.domain.tld
server=git.domain.tld
#baseurl = http://git.domain.tld
# cloneurl = https://server/
# canonical_hostname = git.domain.tld
api_token = gitlab_personal_token
EOF"
sudo bash -c "cat > /etc/zuul/main.yaml <<EOF
- tenant:
name: quickstart
EOF"
sudo systemctl daemon-reload
sudo systemctl start nodepool-launcher.service
sudo systemctl status nodepool-launcher.service
sudo systemctl enable nodepool-launcher.service
sudo systemctl start zuul-scheduler.service
sudo systemctl status zuul-scheduler.service
sudo systemctl enable zuul-scheduler.service
sudo systemctl start zuul-executor.service
sudo systemctl status zuul-executor.service
sudo systemctl enable zuul-executor.service
sudo systemctl start zuul-web.service
sudo systemctl status zuul-web.service
sudo systemctl enable zuul-web.service
@anoopefx
Copy link

`zuul-scheduler.service - Zuul Scheduler Service
Loaded: loaded (/etc/systemd/system/zuul-scheduler.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-06-26 05:26:08 UTC; 7s ago
Process: 8773 ExecStart=/usr/local/bin/zuul-scheduler (code=exited, status=1/FAILURE)
Main PID: 8773 (code=exited, status=1/FAILURE)
CPU: 109ms

Jun 26 05:26:08 zuul-server systemd[1]: Started Zuul Scheduler Service.
Jun 26 05:26:08 zuul-server zuul-scheduler[8773]: Traceback (most recent call last):
Jun 26 05:26:08 zuul-server zuul-scheduler[8773]: File "/usr/local/bin/zuul-scheduler", line 5, in
Jun 26 05:26:08 zuul-server zuul-scheduler[8773]: from zuul.cmd.scheduler import main
Jun 26 05:26:08 zuul-server zuul-scheduler[8773]: ModuleNotFoundError: No module named 'zuul'
Jun 26 05:26:08 zuul-server systemd[1]: zuul-scheduler.service: Main process exited, code=exited, status=1/>
Jun 26 05:26:08 zuul-server systemd[1]: zuul-scheduler.service: Failed with result 'exit-code'.`

Can you tell me if there is anything additional to make the scheduler running? I followed your instructions as well cross checked the main zuul documentation - https://zuul-ci.org/docs/zuul/4.11.0//howtos/zuul-from-scratch.html#zuul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment