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

Add option to build image using source code directly #304

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

elfosardo
Copy link
Member

@elfosardo elfosardo commented Sep 29, 2021

This patch adds a build-time argument that allows to build the ironic container image using source code instead of RPMs
At the moment this option should only be used for testing purpose, to simplify building images using the latest code or local patches

It is possible to test it using metal3-dev-env with the patch metal3-io/metal3-dev-env#839

@metal3-io-bot metal3-io-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 29, 2021
@elfosardo
Copy link
Member Author

/test-integration

prepare-image.sh Outdated Show resolved Hide resolved
prepare-image.sh Outdated
# SOURCE install #
if [[ $INSTALL_TYPE == "source" ]]; then
dnf upgrade -y
dnf install -y python3-pip python3-devel gcc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll probably need a few other development libraries: ffi, ssl, etc.

@elfosardo
Copy link
Member Author

/test-integration

@elfosardo
Copy link
Member Author

/test-integration

@elfosardo
Copy link
Member Author

/retest

@elfosardo
Copy link
Member Author

/test-integration

@elfosardo
Copy link
Member Author

/test-inteagration

@elfosardo
Copy link
Member Author

/test-integration

@elfosardo
Copy link
Member Author

/test-integration

@elfosardo
Copy link
Member Author

/test-integration

@elfosardo
Copy link
Member Author

/test-integration

1 similar comment
@elfosardo
Copy link
Member Author

/test-integration

@elfosardo
Copy link
Member Author

it works! \o/

ironic-source-list.txt Outdated Show resolved Hide resolved
main-packages-list.txt Outdated Show resolved Hide resolved
dnf upgrade -y
dnf install -y python3-pip python3-devel gcc
pip3 install --upgrade pip
pip3 install --prefix /usr -r $IRONIC_PKG_LIST -c https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so you use the upstream constraints. This is fine, but do you realize that the services and vendor dependencies are not there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this being a PoC does not include everything
in the final version we'll have to add the rest of the dependencies that are not strictly needed in CI but instead for the real final image

@metal3-io-bot metal3-io-bot added the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2021
@metal3-io-bot metal3-io-bot removed the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2021
@elfosardo
Copy link
Member Author

/test-integration

Copy link
Member

@namnx228 namnx228 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me. Just one comment below

ironic-source-list.txt Outdated Show resolved Hide resolved
@elfosardo
Copy link
Member Author

/test-v1b1-integration

Copy link
Member

@namnx228 namnx228 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2021
@elfosardo
Copy link
Member Author

/hold I need one more test

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 4, 2021
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2021
@elfosardo
Copy link
Member Author

/unhold

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 9, 2021
@elfosardo
Copy link
Member Author

/test-v1b1-integration

@elfosardo
Copy link
Member Author

/test-v1b1-centos-integration

@namnx228
Copy link
Member

/test-v1b1-centos-integration

@namnx228
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 11, 2021
if [[ ! -z ${EXTRA_PKGS_LIST:-} ]]; then
if [[ -s /tmp/${EXTRA_PKGS_LIST} ]]; then
xargs -rtd'\n' dnf install -y < /tmp/${EXTRA_PKGS_LIST}
fi
fi
dnf install -y --enablerepo=epel inotify-tools

dnf install -y --enablerepo=epel inotify-tools python3-gunicorn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gunicorn can be installed from pypi just as well

if [[ $INSTALL_TYPE == "source" ]]; then
dnf upgrade -y
dnf install -y python3-pip python3-devel gcc git-core
pip3 install --upgrade pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather avoid an unconditional upgrade of pip, we've had enough issues with it upstream

# SOURCE install #
if [[ $INSTALL_TYPE == "source" ]]; then
dnf upgrade -y
dnf install -y python3-pip python3-devel gcc git-core
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed from the final image

@dtantsur
Copy link
Member

/approve

Works as a proof of concept, although I'd see a few things cleaned up next.

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtantsur

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2021
@metal3-io-bot metal3-io-bot merged commit a6c4bdc into metal3-io:master Nov 17, 2021
elfosardo pushed a commit to elfosardo/ironic-image that referenced this pull request Nov 22, 2022
Allow dnsmasq to work as a DNS forwarder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants