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

Fix jenkins service startup #76

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions hosts/azure-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
# enable cloud-init, so instance metadata is set accordingly and we can use
# cloud-config for ssh key management.
services.cloud-init.enable = true;
systemd.services.cloud-config.after = ["mnt-resource.mount"];
systemd.services.cloud-config.requires = ["mnt-resource.mount"];
# FUTUREWORK: below is a hack to make cloud-init usable with azure
# agent (waagent). The usage of azure agent together with cloud-init
# needs to be properly done later, perhaps by using the
# azure-scatch-store-common.nix or something similar.
systemd.services.cloud-config.serviceConfig = {
Restart = "on-failure";
};

# Use systemd-networkd for network configuration.
services.cloud-init.network.enable = true;
Expand Down
8 changes: 6 additions & 2 deletions hosts/azure/jenkins-controller/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ in {
port = 8081;
withCLI = true;
};
systemd.services.jenkins.after = ["cloud-config.service"];
systemd.services.jenkins.requires = ["cloud-config.service"];
systemd.services.jenkins.after = ["multi-user.target"];
systemd.services.jenkins.requires = ["multi-user.target"];
systemd.services.jenkins.serviceConfig = {
Restart = "on-failure";
RestartSec = 1;
};

# set StateDirectory=jenkins, so state volume has the right permissions
# and we wait on the mountpoint to appear.
Expand Down
Loading