Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Update to IML 5 repo #915

Merged
merged 1 commit into from
May 6, 2019
Merged
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
Update to IML 5 repo
Update to the IML 5 Copr repo.

In addtion remove module-tools and use the Docker builder.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
  • Loading branch information
jgrund committed May 6, 2019
commit dcc132ffafd57c86e54b5f48180fcb19aea0cf72
39 changes: 39 additions & 0 deletions .copr/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
BUILDROOT:=$(shell [ -d "/build" ] && echo "/build" || echo ".")
TMPDIR:=$(shell mktemp -d)

MFL_COPR_REPO=managerforlustre/manager-for-lustre-5.0
MFL_REPO_OWNER := $(firstword $(subst /, ,$(MFL_COPR_REPO)))
MFL_REPO_NAME := $(word 2,$(subst /, ,$(MFL_COPR_REPO)))

base.repo: base.repo.in
sed -e 's/@MFL_COPR_REPO@/$(subst /,\/,$(MFL_COPR_REPO))/g' \
-e 's/@MFL_REPO_OWNER@/$(MFL_REPO_OWNER)/g' \
-e 's/@MFL_REPO_NAME@/$(MFL_REPO_NAME)/g' < $< > $@

srpm:
mkdir -p ${TMPDIR}/_topdir/SOURCES
mkdir -p ${TMPDIR}/_topdir/SPECS
Expand All @@ -24,3 +33,33 @@ srpm:
rpmbuild -bs -D "_topdir ${TMPDIR}/_topdir" ${TMPDIR}/_topdir/SPECS/rust-iml.spec
cp -rf ${TMPDIR}/_topdir ${BUILDROOT}/
cp -f _topdir/SRPMS/*.rpm $(outdir)

iml-deps:
yum copr enable -y managerforlustre/buildtools
yum install -y python2-devel python2-setuptools ed

iml-srpm: iml-deps base.repo
mkdir -p ${TMPDIR}/_topdir/{SOURCES,SPECS}
mkdir -p ${TMPDIR}/scratch
rm -rf ${BUILDROOT}/_topdir

cp -r ${BUILDROOT}/{chroma_*,chroma-*,__init__.py,manage.py,scm_version.py,setup.py,settings.py,urls.py,wsgi.py,agent-bootstrap-script.template,*.profile} ${TMPDIR}/scratch
cp -r ${BUILDROOT}/{*.repo,README.*,licenses,polymorphic,example_storage_plugin_package,tests,MANIFEST.in} ${TMPDIR}/scratch
cp ${BUILDROOT}/python-iml-manager.spec ${TMPDIR}/_topdir/SPECS
cp ${BUILDROOT}/iml-*.service \
${BUILDROOT}/rabbitmq-env.conf \
${BUILDROOT}/iml-manager-redirect.conf \
${BUILDROOT}/iml-manager.target \
${BUILDROOT}/chroma-config.1 \
${BUILDROOT}/logrotate.cfg \
${BUILDROOT}/chroma-host-discover-init.sh \
${TMPDIR}/_topdir/SOURCES

cd ${TMPDIR}/scratch; \
python setup.py sdist -d ${TMPDIR}/_topdir/SOURCES/

rpmbuild -bs -D "_topdir ${TMPDIR}/_topdir" ${TMPDIR}/_topdir/SPECS/python-iml-manager.spec

cp -rf ${TMPDIR}/_topdir ${BUILDROOT}/
cp -r ${TMPDIR}/_topdir/SRPMS/* $(outdir)
rm -rf ${TMPDIR}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set_state.prof
*.pem
*.rpm
*.stamp
dev_nginx
.idea
settings.json
*~
Expand All @@ -20,7 +19,6 @@ settings.json
*.orig
*.rej
local_settings.py
scm_version.py*
database.db
.DS_Store
dist/
Expand All @@ -38,7 +36,6 @@ tests/framework/chroma_support.repo
id_rsa
id_rsa.pub
install_build_deps-stamp
python-iml-manager.spec
localenv
storage_server.repo
base.repo
Expand Down
30 changes: 25 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,22 @@ jobs:
- pip install black
script:
- black --check ./
- stage: test
name: "copr build test"
script:
- export SPEC=python-iml-manager.spec
- export SRPM_TASK=iml-srpm
- docker run -it -e SPEC="$SPEC" -e SRPM_TASK="$SRPM_TASK" -e LOCAL_ONLY="True" -v $(pwd):/build:rw imlteam/copr
- ((`find _topdir/RPMS -name *.rpm | wc -l` > 0))
- stage: cd
git:
depth: 999999
name: "Continuous Deployment (Copr)"
name: "Continuous Deployment"
script:
- include/travis/copr-deploy.sh prepare
- ./travis_wait "./include/travis/run_in_centos7_docker.sh include/travis/copr-deploy.sh build_srpm"
- export OWNER=managerforlustre
- export PROJECT=manager-for-lustre-devel
- export PACKAGE=python-iml-manager
- export SPEC=python-iml-manager.spec
- export SRPM_TASK=iml-srpm
- docker run -it -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e SPEC="$SPEC" -e SRPM_TASK="$SRPM_TASK" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr
- stage: cd
git:
depth: 999999
Expand All @@ -87,7 +96,18 @@ jobs:
- docker push imlteam/manager-nginx
- docker-compose build
- docker-compose push
- stage: deploy-copr-r5.0
name: "Copr 5.0 deploy"
script:
- export OWNER=managerforlustre
- export PROJECT=manager-for-lustre-5.0
- export PACKAGE=python-iml-manager
- export SPEC=python-iml-manager.spec
- export SRPM_TASK=iml-srpm
- docker run -it -e PROD="true" -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e SPEC="$SPEC" -e SRPM_TASK="$SRPM_TASK" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr
stages:
- test
- name: cd
if: branch = master AND type = push AND fork = false
- name: deploy-copr-r5.0
if: branch =~ ^v\d+\.\d+\.\d+-.+-r5\.0$
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include tests/sample_data/*.json
include tests/integration/run_tests
include tests/integration/*/*.json
include tests/integration/core/clear_ha_el?.sh
include scm_version.py
include *.repo
include *.profile
graft licenses
Expand Down
37 changes: 9 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
NAME := iml-manager
#SUBPACKAGES := management
#TEST_DEPS := python2-tablib python2-iml-common1.4 python-netaddr \
# python2-toolz python-django
MODULE_SUBDIR = chroma_manager
DEVELOP_DEPS := version
DEVELOP_POST := ./manage.py dev_setup
DIST_DEPS := base.repo version $(COPR_REPO_TARGETS)
DIST_DEPS := version $(COPR_REPO_TARGETS)

MFL_COPR_REPO=managerforlustre/manager-for-lustre-devel
MFL_COPR_REPO=managerforlustre/manager-for-lustre-5.0
MFL_REPO_OWNER := $(firstword $(subst /, ,$(MFL_COPR_REPO)))
MFL_REPO_NAME := $(word 2,$(subst /, ,$(MFL_COPR_REPO)))

Expand All @@ -18,18 +15,6 @@ TAGS_ARGS := --exclude=chroma-manager/_topdir \
--exclude=chroma_unit_test_env \
--exclude=workspace


#include ../include/Makefile.version
include include/python-localsrc.mk

# Fixup proxies if needed
PREFIXED_PROXIES := if [ -n "$(HTTP_PROXY)" ] && [[ "$(HTTP_PROXY)" != "http://"* ]]; then \
export HTTP_PROXY=http://$(HTTP_PROXY); \
export http_proxy=http://$(HTTP_PROXY); \
export HTTPS_PROXY=http://$(HTTPS_PROXY); \
export https_proxy=http://$(HTTPS_PROXY); \
fi;

# Always nuke the DB when running tests?
ALWAYS_NUKE_DB ?= false

Expand All @@ -55,26 +40,24 @@ ZIP_TYPE := $(shell if [ "$(ZIP_DEV)" == "true" ]; then echo '-dev'; else echo '
MFL_REPO_OWNER := $(firstword $(subst /, ,$(MFL_COPR_REPO)))
MFL_REPO_NAME := $(word 2,$(subst /, ,$(MFL_COPR_REPO)))

COPR_REPO_TARGETS := base.repo tests/framework/utils/defaults.sh tests/framework/chroma_support.repo
COPR_REPO_TARGETS := tests/framework/utils/defaults.sh tests/framework/chroma_support.repo

SUBSTS := $(COPR_REPO_TARGETS)

all: copr-rpms rpms

rpms:
$(MAKE) -f .copr/Makefile iml-srpm outdir=.
rpmbuild -D "_topdir $(CURDIR)/_topdir" -bb _topdir/SPECS/python-iml-manager.spec

copr-rpms:
$(MAKE) -f .copr/Makefile srpm outdir=.
rpmbuild -D "_topdir $(pwd)/_topdir" -bb _topdir/SPECS/rust-iml.spec

cleandist:
rm -rf dist
rm -rf dist
mkdir dist

version:
echo 'VERSION = "$(VERSION)"' > scm_version.py
echo 'PACKAGE_VERSION = "$(PACKAGE_VERSION)"' >> scm_version.py
echo 'BUILD = "$(BUILD_NUMBER)"' >> scm_version.py
echo 'IS_RELEASE = $(IS_RELEASE)' >> scm_version.py

nuke_db:
@$(ALWAYS_NUKE_DB) && { \
echo "Wiping $(DB_NAME) DB..."; \
Expand Down Expand Up @@ -129,8 +112,6 @@ feature_tests:

tests test: unit_tests feature_tests integration_tests service_tests

base.repo: base.repo.in Makefile

tests/framework/chroma_support.repo: tests/framework/chroma_support.repo.in Makefile

tests/framework/utils/defaults.sh: tests/framework/utils/defaults.sh.in Makefile
Expand Down Expand Up @@ -268,7 +249,7 @@ tests/framework/utils/defaults.sh chroma-bundles/chroma_support.repo.in: substs
# make TESTS=tests/integration/shared_storage_configuration/test_example_api_client.py:TestExampleApiClient.test_login ssi_tests
# set NOSE_ARGS="-x" to stop on the first failure
ssi_tests: tests/framework/utils/defaults.sh chroma-bundles/chroma_support.repo.in
CHROMA_DIR=$$PWD tests/framework/integration/shared_storage_configuration/full_cluster/jenkins_steps/main $@
tests/framework/integration/shared_storage_configuration/full_cluster/jenkins_steps/main $@

upgrade_tests: tests/framework/utils/defaults.sh chroma-bundles/chroma_support.repo.in
tests/framework/integration/installation_and_upgrade/jenkins_steps/main $@
Expand Down
31 changes: 0 additions & 31 deletions chroma_manager/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions chroma_manager/scm_version.py

This file was deleted.

8 changes: 4 additions & 4 deletions chroma_support.repo
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[managerforlustremanager-for-lustre-devel]
name=Copr repo for manager-for-lustre-devel owned by managerforlustre
baseurl=https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre-devel/epel-7-$basearch/
[managerforlustre-manager-for-lustre-5.0]
name=Copr repo for manager-for-lustre-5.0 owned by managerforlustre
baseurl=https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre-5.0/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre-devel/pubkey.gpg
gpgkey=https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre-5.0/pubkey.gpg
repo_gpgcheck=0
enabled=1

Expand Down
2 changes: 1 addition & 1 deletion docker/base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WORKDIR /build
COPY . .
RUN yum update -y
RUN yum install -y rpmdevtools make git
RUN make base.repo
RUN make -f .copr/Makefile base.repo

FROM centos:7

Expand Down
12 changes: 0 additions & 12 deletions include/.gitrepo

This file was deleted.

21 changes: 0 additions & 21 deletions include/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion include/Makefile

This file was deleted.

48 changes: 0 additions & 48 deletions include/Makefile.version

This file was deleted.

25 changes: 0 additions & 25 deletions include/README.md

This file was deleted.

Loading