-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Adds ironic IPA image build tools #308
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| name: build-ironic-images | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - 'ironic-images/**' | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'ironic-images/**' | ||
|
|
||
| jobs: | ||
| build-ironic-images: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: ironic-images/ipa-debian-bookworm | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| id: setup-python | ||
| with: | ||
| python-version: '3.11' | ||
| cache: 'pip' | ||
| - run: sudo apt update && sudo apt install -y debootstrap qemu-utils | ||
| - run: pip install -r requirements.txt | ||
| working-directory: ironic-images | ||
| - name: Build the IPA image | ||
| run: bash ipa-debian-bookworm.sh | ||
| env: | ||
| ELEMENTS_PATH: ${{ env.pythonLocation }}/share/ironic-python-agent-builder/dib:${{ github.workspace }}/ironic-images/custom_elements | ||
| - name: Dynamically set timestamp environment variable | ||
| run: echo "TIMESTAMP=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_ENV | ||
| - name: Publish IPA Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| name: undercloud-ironic-ipa | ||
| tag_name: undercloud-ironic-ipa-${{ env.TIMESTAMP }} | ||
| make_latest: true | ||
| fail_on_unmatched_files: true | ||
| files: | | ||
| ironic-images/ipa-debian-bookworm/ipa-debian-bookworm.initramfs | ||
| ironic-images/ipa-debian-bookworm/ipa-debian-bookworm.kernel | ||
| if: ${{ github.ref == 'refs/heads/main' }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Undercloud Ironic Image Build | ||
|
|
||
| The image build process is in github actions: `.github/workflows/build-ironic-images.yaml` |
23 changes: 23 additions & 0 deletions
23
ironic-images/custom_elements/undercloud-ipa/install.d/50-sysctl-arp-ignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
|
|
||
| # dib-lint: disable=set setu setpipefail indent | ||
| if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then | ||
| set -x | ||
| fi | ||
| set -e | ||
|
|
||
| cat > /etc/sysctl.d/99-undercloud-ipa-sysctl-arp-ignore.conf <<EOF | ||
| # arp_ignore - INTEGER | ||
| # Define different modes for sending replies in response to | ||
| # received ARP requests that resolve local target IP addresses: | ||
| # 0 - (default): reply for any local target IP address, configured | ||
| # on any interface | ||
| # 1 - reply only if the target IP address is local address | ||
| # configured on the incoming interface | ||
| # 2 - reply only if the target IP address is local address | ||
| # configured on the incoming interface and both with the | ||
| # sender's IP address are part from same subnet on this interface | ||
| # 3 - do not reply for local addresses configured with scope host, | ||
| # only resolutions for global and link addresses are replied | ||
| net.ipv4.conf.all.arp_ignore=2 | ||
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| - Need to install package: debootstrap | ||
| - Create virtualenv | ||
| - pip install diskimage-builder ironic-python-agent-builder | ||
| - ./ipa-debian-bookworm.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
|
|
||
| # elements path - need to include both the ironic-python-agent-builder DIB packages | ||
| # and our custom_elements packages | ||
| # export ELEMENTS_PATH=/path/to/venv/share/ironic-python-agent-builder/dib:/path/to/custom_elements | ||
|
|
||
| # distro version | ||
| export DIB_RELEASE=bookworm | ||
|
|
||
| diskimage-builder ipa-debian-bookworm.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| - imagename: ipa-debian-bookworm | ||
| elements: | ||
| - ironic-python-agent-ramdisk | ||
| - debian-minimal | ||
| - dynamic-login | ||
| - journal-to-console | ||
| - undercloud-ipa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| inetutils-ping: | ||
| inetutils-telnet: | ||
| mtr-tiny: | ||
| tcpdump: | ||
| systemd-timesyncd: | ||
| bind9-dnsutils: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| diskimage-builder==3.33.0 | ||
| ironic-python-agent-builder==5.3.0 | ||
| python-keystoneclient==5.4.0 | ||
| python-swiftclient==4.6.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.