Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ubccr/grendel
Browse files Browse the repository at this point in the history
  • Loading branch information
aebruno committed Jun 9, 2022
2 parents dcee394 + d806267 commit 60444f1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
8 changes: 2 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ nfpms:
deb:
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}"
scripts:
postinstall: ./scripts/nfpm/install.sh
postinstall: ./scripts/nfpm/postinstall.sh
rpm:
file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}"
scripts:
preinstall: ./scripts/nfpm/install.sh
postinstall: ./scripts/nfpm/postinstall.sh
rpm:
signature:
key_file: key.gpg
Expand All @@ -53,10 +53,6 @@ nfpms:
- src: ./scripts/nfpm/grendel.toml.default
dst: /etc/grendel/grendel.toml
type: "config|noreplace"
file_info:
mode: 0600
owner: grendel
group: grendel
- src: ./scripts/nfpm/grendel.service
dst: /usr/lib/systemd/system/grendel.service
checksum:
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## [Unreleased]

## [0.0.7] - 2022-06-09

- Fix bug in marshalling interface names
- Fix ubuntu autoinstall template
- Set root password in Ubuntu autoinstall template
- Add dhcp4 network configs for default nic
- Templatize the kernel command line for images
- Add support for translating butane configs to ignition
- Update ipxe to latest release
- Add rpm/deb package building

## [0.0.6] - 2021-10-25

- Add support for kickstarting both uefi and legacy bios nodes from the same
Expand Down Expand Up @@ -52,3 +63,4 @@
[0.0.4]: https://github.com/ubccr/grendel/releases/tag/v0.0.4
[0.0.5]: https://github.com/ubccr/grendel/releases/tag/v0.0.5
[0.0.6]: https://github.com/ubccr/grendel/releases/tag/v0.0.6
[0.0.7]: https://github.com/ubccr/grendel/releases/tag/v0.0.7
3 changes: 3 additions & 0 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ func (s *Server) Serve() error {
if err != nil {
return err
}
if err := os.Chmod(s.SocketPath, 0770); err != nil {
return err
}
e.Listener = unixListener
s.Scheme = "http"
log.Printf("Listening on unix domain socket: %s", s.SocketPath)
Expand Down
13 changes: 9 additions & 4 deletions scripts/nfpm/install.sh → scripts/nfpm/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,29 @@ cleanInstall() {
mkdir -p /var/lib/grendel/images /var/lib/grendel/repo /var/lib/grendel/templates
chown grendel:grendel /var/lib/grendel /var/lib/grendel/images /var/lib/grendel/repo /var/lib/grendel/templates
chmod 755 /var/lib/grendel
chmod 775 /var/lib/grendel/images /var/lib/grendel/repo /var/lib/grendel/templates

if [ -f "/etc/grendel/grendel.toml" ]; then
chmod 660 /etc/grendel/grendel.toml
chown grendel:grendel /etc/grendel/grendel.toml
fi

if [ -x "/usr/bin/deb-systemd-helper" ]; then
printf "\033[32m Installing grendel.service systemd using deb\033[0m\n"
deb-systemd-helper purge grendel.service >/dev/null
deb-systemd-helper unmask grendel.service >/dev/null
elif [ -x "/usr/bin/systemctl" ]; then
printf "\033[32m Enable grendel.service in systemd\033[0m\n"
systemctl daemon-reload ||:
systemctl unmask grendel.service ||:
systemctl preset grendel.service ||:
systemctl enable grendel.service ||:
systemctl restart grendel.service ||:
fi
}

upgrade() {
printf "\033[32m Upgrading grendel\033[0m\n"
if [ -x "/usr/bin/systemctl" ]; then
systemctl restart grendel.service ||:
fi
}

# Step 2, check if this is a clean install or an upgrade
Expand All @@ -45,7 +51,6 @@ case "$action" in
cleanInstall
;;
"2" | "upgrade")
printf "\033[32m Post Install of an upgrade\033[0m\n"
upgrade
;;
*)
Expand Down

0 comments on commit 60444f1

Please sign in to comment.