-
Notifications
You must be signed in to change notification settings - Fork 27
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
Updating to base off of 'python:2.7.14-alpine3.6' instead of just 'alpine:3.6' #55
base: master
Are you sure you want to change the base?
Conversation
…he file `playbooks/requirements.txt` exists
@udondan It looks like there might be a problem with your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so time is of the essence to get this merged if you approve of the changes.
Yeaaaah, so... that didn't work out very well. :)
I looked at the PR when you sent it but because of the shuffling of all the packages in the base Dockerfile it was really really hard for me to see through. Then forgot to about it. Sorry.
I am about to work on a 3.0 release soonish. Before that I would like to complete this one to not completely make this PR unmergable and give you credit.
I'm happy to switch to the python-alpine based image and adding some commonly used python modules. But I added a couple of comments for other changes.
It looks like there might be a problem with your .travis.yml
Yeah, I got to look into that.
|
||
# Give the user a custom shell prompt | ||
echo 'export PS1="[ansible-silo $SILO_VERSION|\w]\\$ "' > /home/user/.bashrc &&\ | ||
|
||
# Add alias for 'ls -l' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to not have this. Instead we should provide a way for the user to mount a custom profile so any alias, function or what not can be set up as required. Something for another PR I can take care of.
|
||
# Create directory for storing ssh ControlPath | ||
mkdir -p /home/user/.ssh/tmp &&\ | ||
RUN mkdir -p /home/user/.ssh/tmp &&\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe moving the lines around and splitting into separate layers was beneficial during development/experimenting to speed up builds. Is there a need for this to be merged? The number of layers should be as small as possible.
@echo " docker run --interactive --tty --rm --volume \"${HOME}/bin:/silo_install_path\" ${SILO_IMG}:${SILO_VERSION} --install" | ||
@echo "" | ||
@echo "To install '${SILO_IMG}:${SILO_VERSION}' for all users, run the following command:" | ||
@echo " docker run --interactive --tty --rm --volume \"/usr/local/bin:/silo_install_path\" ${SILO_IMG}:${SILO_VERSION} --install" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
|
||
ansible-silo: validate-version | ||
@docker build --build-arg "v=$(SILO_VERSION)" --tag "${SILO_IMG}:$(SILO_VERSION)" . | ||
@echo "" | ||
@echo "To install '${SILO_IMG}:${SILO_VERSION}' for just your user, run the following command:" | ||
@echo " docker run --interactive --tty --rm --volume \"${HOME}/bin:/silo_install_path\" ${SILO_IMG}:${SILO_VERSION} --install" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${HOME}
Should be
\$${HOME}
so the output would be
docker run --interactive --tty --rm --volume "${HOME}/bin:/silo_install_path" grpn/ansible-silo:3.0.0 --install
This way the user can easily copy and share the command.
pip install -r requirements.txt || exit | ||
cd .. | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is installing python modules on the host.
Shouldn't this be added to the Dockerfile of the bundle instead?
enum34==1.1.6\ | ||
idna==2.5\ | ||
ipaddress==1.0.18\ | ||
ncclient==0.5.3\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ncclient Is missing now, which is used by many networking modules. #31
https://github.com/ansible/ansible/search?q=ncclient&unscoped_q=ncclient
pycparser==2.18\ | ||
pycrypto==2.6.1\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pycrypto is missing.
@@ -127,7 +127,6 @@ RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/ | |||
isl\ | |||
libgomp\ | |||
libatomic\ | |||
pkgconf\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correct this package is required, because you have junos-eznc
in your bundles pip requirements and installing that requires pkgconf
. Is that correct? Wouldn't it make more sense then to install it per the bundles Dockerfile?
sshpass=1.06-r0 &&\ | ||
|
||
# Install some required python modules which need compiling | ||
apk add --no-cache gcc=6.3.0-r4\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep this block as is. Ideally this apk command would create a virtual package, which later in the Dockerfile can be deleted. This is just not implemented as it was not working together with version pinning at the time of writing. See gliderlabs/docker-alpine#205
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | ||
|
||
# Install common libraries | ||
RUN apk add --no-cache libssl1.0==1.0.2n-r0\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore original grouping. This makes it really hard to review. Some packages have been removed, some have been added, required version upgrades - but everything has been shuffled so it is really hard to see what actually happened and for what reason.
Yeah, I don't really care about getting credit, I just had to make the changes I did to get the
and
Why don't you go ahead and make the changes you'd like. Does that work for you? |
Hi Brady, sure, I'll take care of that. I'll make sure to switch to the python-alpine image and add the packages of your PR. Thanks, |
This is an update to both
ansible-silo-base
andansible-silo
.I was having really weird issues getting the
--bundle
to work with certain python libraries as were described in issues #53 and #54.Some minor enhancements that I made were the following:
bundle
, several instructional lines were added to thebuild
script so the user could easily copy / paste after the script ran.Makefile
foransible-silo
.bcrypt
andnapalm
(for managing networking devices). That last requirement necessitated leavingpkgconf
,libxml2
, andlibxslt
around to connect to Juniper devices viajunos-eznc
. The additional space for this inansible-silo-base
is only an additional 29% (155MB for2.0.1
and 201MB for3.0.0
). This size could be reduced further, but didn't want to spend time optimizing for diminishing returns unless it was a real issue.bundle
if there was arequirements.txt
file in theThis builds and runs just fine for me, but as you know Alpine Linux likes to not keep their libraries around for very long once a new version is released, so time is of the essence to get this merged if you approve of the changes.