Rackspace-DOT / nova-agent

Other
4 stars 18 forks source link

Add Alpine support #68

Closed JourdanClark closed 3 years ago

JourdanClark commented 5 years ago

I mostly just copy/pasted what is in debian but deleted everything related to netplan. I added a post install command to setup.py so that it could easily be installed with

pip install git+https://github.com/JourdanClark/nova-agent

It just copies etc/nova-agent.alpine to /etc/init.d/nova-agent and makes it executable.

I used this to install it on a fresh Alpine Virtual image

echo "Writing /etc/apk/repositories" ; \
cat <<'CONFIG' > /etc/apk/repositories
#/media/cdrom/apks
http://dl-3.alpinelinux.org/alpine/v3.8/main
http://dl-3.alpinelinux.org/alpine/v3.8/community
#http://dl-3.alpinelinux.org/alpine/edge/main
#http://dl-3.alpinelinux.org/alpine/edge/community
#http://dl-3.alpinelinux.org/alpine/edge/testing
CONFIG

echo "Installing pyxs for nova-agent" ; \
apk add \
    git \
    py-pip ; \
pip install git+https://github.com/selectel/pyxs.git --user pyxs

echo "Installing nova-agent" ; \
apk add \
    py-crypto \
    py-netifaces \
    py-yaml \
    xe-guest-utilities ; \
pip install git+https://github.com/JourdanClark/nova-agent ; \
rc-update add xe-guest-utilities boot ; \
rc-update add nova-agent boot
carlwgeorge commented 5 years ago

I don't know if the @Rackspace-DOT maintainers are even interested in nova-agent supporting Alpine, but I wanted to comment on one specific thing. setup.py doesn't handle the init script/unit file for any other distro. That is the responsibility of system packages. The code related to that should be removed from this pull request so it can be reviewed without that.

JourdanClark commented 5 years ago

setup.py doesn't handle the init script/unit file for any other distro. That is the responsibility of system packages. The code related to that should be removed from this pull request so it can be reviewed without that.

Thank you for letting me know. I wasn't sure if it belonged. I have removed my additions to setup.py