Skip to content

Commit

Permalink
Configure release drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrarimarco committed Sep 29, 2022
1 parent b33d6f4 commit 222d21e
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 16 deletions.
41 changes: 41 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: |
# Changelog
$CHANGES
See details of [all code changes](https://github.com/ferrarimarco/docker-pxe/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since the previous release
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
labels:
- 'infrastructure'
- 'automation'
- 'documentation'
- title: '🏎 Performance'
label: 'performance'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
labels:
- 'type: breaking'
minor:
labels:
- 'type: enhancement'
patch:
labels:
- 'type: bug'
- 'type: maintenance'
- 'type: documentation'
default: patch
22 changes: 22 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Release Drafter

on:
push:
branches:
- master

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write # for release-drafter/release-drafter to create a github release
pull-requests: write # for release-drafter/release-drafter to add label to PR
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 changes: 31 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ using Docker, you can add the `--net=host` option when running the container:
docker run -it --rm --net=host ferrarimarco/pxe
```

The container image is also available on GitHub container registry: [`ghcr.io/ferrarimarco/pxe`](https://github.com/ferrarimarco/docker-pxe/pkgs/container/pxe).

This container image is multi-platform, and supports the following platforms:

- `linux/amd64`
- `linux/arm64`

### Integrated DHCP server

If you want to enable the integrated DHCP server for a given IP address range add a `dhcp-range` option: `dhcp-range=x.x.x.x,y.y.y.y,z.z.z.z` where `x.x.x.x` is the start of the range, `y.y.y.y` is the end and `z.z.z.z` is the subnet mask.
Expand Down Expand Up @@ -69,22 +76,30 @@ LABEL ubuntu-16-04-amd64

### How to run the test environment

1. Check the IP address ranged configured by the Virtualbox DHCP server and configure your `dhcp-range` and `/var/lib/tftpboot/pxelinux.cfg/default` accordingly.
1. Run the container with a suitable DHCP configuration and the `--net=host` option
1. Run `vagrant up` from the root of the directory where you cloned this repository. A Virtualbox VM (with a NATed network adapter) will boot from the given PXE.
1. Check the IP address ranged configured by the Virtualbox DHCP server and
configure your `dhcp-range` and `/var/lib/tftpboot/pxelinux.cfg/default` accordingly.
1. Run the container with a suitable DHCP configuration and the `--net=host` option.
1. Run `vagrant up` from the root of the directory where you cloned this
repository. A Virtualbox VM (with a NATed network adapter) will boot from
the given PXE.

#### Example

Virtualbox runs a DHCP server by default in each virtual network. If you want to test the PXE feature you have to run a
container based on this image with dnsmasq as a DHCP proxy (see [Standalone Mode](#standalone-dhcp-server)) and with the
host network stack (see the `--net=host` option) so you know in advance the IP address of the container running dnsmasq:
it's the same as the Docker host!

For example, if Virtualbox DHCP server assigns addresses in the `192.168.56.0/24` subnet (check the virtual network
configuration of the Host-only network assigned to a VM to gather this information),
then the `dhcp-range` option to enable a DHCP proxy could be: `dhcp-range=192.168.56.2,proxy`,
where `192.168.56.2` is the address assigned to the Docker host running the container based on this image in "host network" mode.

Remember to also update any IP address in `/var/lib/tftpboot/pxelinux.cfg/default` you may have configured, if you serve any
content from the TFTP server (like a `preseed.cfg` for example) to point to the IP address of the container running this PXE.
**For this reason it could be useful to manually assign (or reserve) IP addresses (or better, hostnames!) for containers running this PXE.**
Virtualbox runs a DHCP server by default in each virtual network. If you want to
test the PXE feature you have to run a container based on this image with
dnsmasq as a DHCP proxy (see [Standalone Mode](#standalone-dhcp-server)) and
with the host network stack (see the `--net=host` option) so you know in advance
the IP address of the container running dnsmasq: it's the same as the Docker host!

For example, if Virtualbox DHCP server assigns addresses in the
`192.168.56.0/24` subnet (check the virtual network configuration of the
host-only network assigned to a VM to gather this information), then the
`dhcp-range` option to enable a DHCP proxy could be: `dhcp-range=192.168.56.2,proxy`,
where `192.168.56.2` is the address assigned to the Docker host running the
container based on this image in "host network" mode.

Remember to also update any IP address in `/var/lib/tftpboot/pxelinux.cfg/default`
you may have configured, if you serve any content from the TFTP server (like a
`preseed.cfg` for example) to point to the IP address of the container running
this PXE. For this reason, it could be useful to manually assign (or reserve)
IP addresses (or better, hostnames!) for containers running this PXE.

0 comments on commit 222d21e

Please sign in to comment.