Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better deb packaging #1575

Closed
3 tasks done
drequivalent opened this issue Feb 3, 2023 · 2 comments · Fixed by #3986
Closed
3 tasks done

Better deb packaging #1575

drequivalent opened this issue Feb 3, 2023 · 2 comments · Fixed by #3986
Labels
enhancement improve existing features

Comments

@drequivalent
Copy link

Clear and concise description of the problem

Deb packages of Woodpecker contain only a binary which basically makes the deb package near useless.

Suggested solution

Include Systemd service file and the example config into the deb package, so Woodpecker is ready to start out of the box (or at least after quick setup by changing a couple of lines in an already included config file) on the Debian systems.

Alternative

No response

Additional context

Not everyone can use Docker in their setup. LXC containers, for example, don't support Docker.

Validations

@6543 6543 added enhancement improve existing features and removed pending:feature labels Feb 4, 2023
@johanneskastl
Copy link
Contributor

I am currently packaging woodpecker for openSUSE (agent, server and CLI). I also found that the RPMs only contain the binary.

I will try to come up with a working systemd unit for agent and server. Once I have them working, I'll post them here and maybe open a PR to add them to the repo.

@johanneskastl
Copy link
Contributor

OK, so my first tests were done using the following systemd unit file woodpecker-server.service:

[Unit]
Description=Woodpecker
Documentation=https://woodpecker-ci.org/docs/administration/server-config
Requires=network.target
After=network.target
ConditionFileNotEmpty=/etc/woodpecker/woodpecker-server.env
ConditionPathExists=/etc/woodpecker/woodpecker-server.env

[Service]
Type=simple
EnvironmentFile=/etc/woodpecker/woodpecker-server.env
User=woodpecker
Group=woodpecker
ExecStart=/usr/bin/woodpecker-server
WorkingDirectory=/var/lib/woodpecker/

[Install]
WantedBy=multi-user.target

This requires to have the "environment variables", e.g. WOODPECKER_HOST in the file /etc/woodpecker/woodpecker-server.env:

WOODPECKER_ADMIN=my-admin
WOODPECKER_HOST=http://192.0.2.13:8000/
WOODPECKER_LOG_LEVEL=debug
[...]

I'll do some more testing and try to connect an agent, but I guess the service file might look similar...

@6543 6543 closed this as completed in 8768eb2 Aug 25, 2024
6543 pushed a commit to 6543-forks/woodpecker that referenced this issue Sep 5, 2024
* add systemd unit file for server (`woodpecker-server.service`)
* add systemd unit file for agent (`woodpecker-agent.service`)
* add systemd unit files to nfpm package definitions
* add etc config file examples

fixes woodpecker-ci#1575
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants