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

use centos as the base image #2

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@ dist: xenial
language: python
python: 3.7
services: docker
env:
- OS_VERSION=bionic GIT_URL=https://github.com/ceph/ceph GIT_REF=octopus IMG="popperized/ceph-builder:octopus-bionic"
- OS_VERSION=bionic GIT_URL=https://github.com/ceph/ceph GIT_REF=nautilus IMG="popperized/ceph-builder:nautilus-bionic"
- OS_VERSION=bionic GIT_URL=https://github.com/ceph/ceph GIT_REF=mimic IMG="popperized/ceph-builder:mimic-bionic"
- OS_VERSION=bionic GIT_URL=https://github.com/uccross/skyhook-ceph GIT_REF=skyhook-luminous IMG="popperized/ceph-builder:skyhook-bionic"
install:
- git clone https://github.com/systemslab/popper /tmp/popper
- export PYTHONUNBUFFERED=1
- pip install /tmp/popper/cli
script: >-
popper run -f ci/wf.yml \
--substitution "_OS_VERSION=$OS_VERSION" \
--substitution "_GIT_URL=$GIT_URL" \
--substitution "_GIT_REF=$GIT_REF" \
--substitution "_IMG=$IMG"
popper run -f ci/wf.yml
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
ARG OS_VERSION=bionic
FROM ubuntu:${OS_VERSION}
FROM centos:7.8.2003

ARG DEBIAN_FRONTEND=noninteractive
ARG GIT_URL="https://github.com/ceph/ceph"
ARG GIT_REF="master"
ARG GIT_URL="https://github.com/uccross/skyhookdm-ceph"
ARG GIT_REF="skyhook-luminous"
ARG EXTRA_PKGS=""

RUN apt-get update && \
apt-get install -y git gnupg2 ccache && \
ADD . /

RUN ./install-preq.sh && \
git clone --branch $GIT_REF --depth 1 $GIT_URL ceph && \
cd ceph && \
./install-deps.sh && \
sh -c 'if [ -n "$EXTRA_PKGS" ]; then apt-get install -y "$EXTRA_PKGS"; fi' && \
Copy link
Collaborator

Choose a reason for hiding this comment

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

for centos, apt-get cannot run. So we can remove this line

Copy link
Author

Choose a reason for hiding this comment

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

oh yeah. missed it.

apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* debian/
yum clean all

COPY entrypoint.sh /

Expand Down
17 changes: 8 additions & 9 deletions ci/wf.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
steps:
- uses: docker://docker:19.03.3
args: ['build',
'--build-arg', 'OS_VERSION=$_OS_VERSION',
'--build-arg', 'GIT_URL=$_GIT_URL',
'--build-arg', 'GIT_REF=$_GIT_REF',
'--tag', '$_IMG',
'.'
]
args: ['build',
'--build-arg', 'GIT_URL=https://github.com/uccross/skyhookdm-ceph',
'--build-arg', 'GIT_REF=skyhook-luminous',
'-t', 'jcnitdgp25/ceph-builder:skyhook-luminous-centos',
'.'
]

- uses: docker://docker:19.03.3
runs: /bin/sh
runs: ['/bin/sh']
secrets: [DOCKER_USERNAME, DOCKER_PASSWORD]
args:
- -c
- |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker push $_IMG
docker push jcnitdgp25/ceph-builder:skyhook-luminous-centos
12 changes: 12 additions & 0 deletions install-preq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -ex

# yum update -y
yum install -y centos-release-scl scl-utils epel-release
yum install -y git wget gnupg2 ccache
yum install -y python-pip
yum install -y devtoolset-8 devtoolset-7
# pip install --upgrade pip
# pip install --upgrade virtualenv
scl enable devtoolset-8 bash
scl enable devtoolset-7 bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

all these packages should be installed already by the install-deps.sh, can you expand on why you needed to install these?

Copy link
Author

@JayjeetAtGithub JayjeetAtGithub May 28, 2020

Choose a reason for hiding this comment

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

It happend that these images were not installed by themselves and errored out due to their unavailabilty. So i installed them explicitly

Copy link
Collaborator

Choose a reason for hiding this comment

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

so then we need to fix install-deps.sh. That script is taken from the upstream Ceph repo, so we need to figure out the root cause, otherwise we won't be able to explain any subsequent failure

Copy link
Author

@JayjeetAtGithub JayjeetAtGithub May 28, 2020

Choose a reason for hiding this comment

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

yeah please take a look at this. Here, removing the devtoolsets, the image build again starts failing here

Copy link
Collaborator

Choose a reason for hiding this comment

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

what I meant is that this script as a whole shouldn't be needed.

Copy link
Author

@JayjeetAtGithub JayjeetAtGithub May 28, 2020

Choose a reason for hiding this comment

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

Oh I see. Yeah thats the ideal. So, what should be done now ? Should we try to fix in the upstream or continue with patches like this ? Patching will be error prone though

Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to remove this script. Building the image should work without it. If there's a problem when building the ceph-builder image after we remove this script, then it'll very likely be something on our end. The upstream script is used extensively by the ceph community, and has some minor tweaks for skyhook (install arrow/parquet). It could still be something on the upstream script, but it's unlikely