Skip to content

Commit

Permalink
Merge f51f8cc into 30b42f2
Browse files Browse the repository at this point in the history
  • Loading branch information
vkhromov committed Jul 31, 2020
2 parents 30b42f2 + f51f8cc commit 9b7355d
Show file tree
Hide file tree
Showing 21 changed files with 79 additions and 19 deletions.
17 changes: 10 additions & 7 deletions .travis.yml
Expand Up @@ -18,13 +18,16 @@ python:
- "3.6"
sudo: required
env:
- TOXENV=py36-linux,docs,mypy,tests
- TOXENV=general_itests
- TOXENV=paasta_itests
- TOXENV=example_cluster
- MAKE_TARGET=itest_trusty
- MAKE_TARGET=itest_xenial
- MAKE_TARGET=itest_bionic
global:
- PIP_INDEX_URL=https://pypi.python.org/simple
jobs:
- TOXENV=py36-linux,docs,mypy,tests
- TOXENV=general_itests
- TOXENV=paasta_itests
- TOXENV=example_cluster
- MAKE_TARGET=itest_trusty
- MAKE_TARGET=itest_xenial
- MAKE_TARGET=itest_bionic
services:
- docker
before_install:
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
# -*- makefile -*-

PIP_INDEX_URL ?= https://pypi.python.org/simple
PIP_INDEX_URL ?= https://pypi.yelpcorp.com/simple

%:
dh $@ --with python-virtualenv
Expand Down
2 changes: 1 addition & 1 deletion example_cluster/docker-compose.override.yml
@@ -1,4 +1,4 @@
version: '2'
version: '2.4'
volumes:
ssh-data: {}
services:
Expand Down
3 changes: 3 additions & 0 deletions general_itests/fake_simple_service/Dockerfile
Expand Up @@ -13,3 +13,6 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL
2 changes: 1 addition & 1 deletion paasta_itests/docker-compose.yml
@@ -1,4 +1,4 @@
version: '2'
version: '2.4'

volumes:
nail-etc:
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Expand Up @@ -3,7 +3,7 @@ skipsdist=True
envlist=py36-linux
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true
docker_compose_version = 1.18.0
docker_compose_version = 1.26.2

[testenv]
# The Makefile and .travis.yml override the indexserver to the public one when
Expand Down Expand Up @@ -38,7 +38,7 @@ deps =
docker-compose=={[tox]docker_compose_version}
commands =
docker-compose down
docker-compose --verbose build
docker-compose --verbose build --build-arg PIP_INDEX_URL={env:PIP_INDEX_URL:https://pypi.yelpcorp.com/simple}
# Fire up the marathon cluster in background
docker-compose up -d mesosmaster mesosslave marathon marathon1 marathon2 hacheck httpdrain mesosslave2 mesosslave3 mesosslave4 mesosslave5
docker-compose scale mesosslave=3
Expand All @@ -49,7 +49,7 @@ commands =
# dnephin says we need the --rm otherwise these containers won't be cleaned
# up. I guess we only need this for run'd containers, not up'd containers?
# IDK, the docs don't really specify.
docker-compose run --rm paastatools /venv/bin/tox -i {env:PIP_INDEX_URL:https://pypi.python.org/simple} -e paasta_itests_inside_container -- --no-capture {posargs}
docker-compose run --rm paastatools /venv/bin/tox -i {env:PIP_INDEX_URL:https://pypi.yelpcorp.com/simple} -e paasta_itests_inside_container -- --no-capture {posargs}
docker-compose stop
docker-compose rm --force

Expand Down Expand Up @@ -78,7 +78,7 @@ commands =
{toxinidir}/k8s_itests/scripts/setup.sh
# Run paasta-tools k8s_itests in docker
docker-compose down
docker-compose --verbose build
docker-compose --verbose build --build-arg PIP_INDEX_URL={env:PIP_INDEX_URL:https://pypi.yelpcorp.com/simple}
docker-compose up \
--abort-on-container-exit

Expand All @@ -89,7 +89,7 @@ deps =
docker-compose=={[tox]docker_compose_version}
commands =
docker-compose down
docker-compose --verbose build
docker-compose --verbose build --build-arg PIP_INDEX_URL={env:PIP_INDEX_URL:https://pypi.yelpcorp.com/simple}
# Fire up the marathon cluster in background
# Run the paastatools container in foreground to catch the output
# the `docker-compose run` vs `docker-compose up` is important here, as docker-compose run will
Expand Down
4 changes: 2 additions & 2 deletions yelp_package/Makefile
Expand Up @@ -19,7 +19,7 @@ SHELL=/bin/bash

UID:=`id -u`
GID:=`id -g`
DOCKER_RUN=docker run -t -v $(CURDIR)/../:/work:rw yelp/paastatools_$*_container
DOCKER_RUN=docker run -t -v $(CURDIR)/../:/work:rw -e PIP_INDEX_URL=$(PIP_INDEX_URL) yelp/paastatools_$*_container

NOOP = true
ifeq ($(PAASTA_ENV),YELP)
Expand All @@ -35,7 +35,7 @@ endif
build_%_docker:
[ -d ../dist ] || mkdir ../dist
docker pull "yelp/paastatools_$*_container" || true
cd dockerfiles/$*/ && docker build -t "yelp/paastatools_$*_container" .
cd dockerfiles/$*/ && docker build --build-arg PIP_INDEX_URL=$(PIP_INDEX_URL) -t "yelp/paastatools_$*_container" .
if [ "$$TRAVIS_BRANCH" = "master" -a \
"$$TRAVIS_PULL_REQUEST" = "false" -a \
"$$DOCKER_USERNAME" != "" ]; then \
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/bionic/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:bionic

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list
RUN rm /etc/dpkg/dpkg.cfg.d/excludes
RUN apt-get update && apt-get install -yq gnupg2
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/gitremote/Dockerfile
@@ -1,4 +1,8 @@
FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list
RUN apt-get update > /dev/null && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/hacheck-sidecar/Dockerfile
@@ -1,4 +1,8 @@
FROM docker-dev.yelpcorp.com/xenial_yelp

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN apt-get update && apt-get install -y hacheck python paasta-tools=0.81.14-yelp1
RUN mkdir -p /etc/paasta
ADD ./check_smartstack_up.sh /check_smartstack_up.sh
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/itest/api/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

# Need Python 3.6
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/itest/hacheck/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

RUN apt-get update > /dev/null && \
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/itest/httpdrain/Dockerfile
@@ -1,4 +1,8 @@
FROM ubuntu:bionic

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

RUN apt-get update > /dev/null && \
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/itest/k8s/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

# Need Python 3.6
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/itest/marathon/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

RUN apt-get update > /dev/null && \
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/itest/mesos/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

# Install packages to allow apt to use a repository over HTTPS
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/itest/zookeeper/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

RUN apt-get update > /dev/null && \
Expand Down
5 changes: 4 additions & 1 deletion yelp_package/dockerfiles/mesos-paasta/Dockerfile
@@ -1,4 +1,7 @@
FROM examplecluster_mesosbase
FROM example_cluster_mesosbase

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN apt-get update > /dev/null && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
5 changes: 4 additions & 1 deletion yelp_package/dockerfiles/playground/Dockerfile
@@ -1,4 +1,7 @@
FROM examplecluster_itest_xenial
FROM example_cluster_itest_xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN apt-get update > /dev/null && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/trusty/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:trusty

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

RUN echo "deb http://repos.mesosphere.com/ubuntu trusty main" > /etc/apt/sources.list.d/mesosphere.list && \
Expand Down
4 changes: 4 additions & 0 deletions yelp_package/dockerfiles/xenial/Dockerfile
Expand Up @@ -13,6 +13,10 @@
# limitations under the License.

FROM ubuntu:xenial

ARG PIP_INDEX_URL=https://pypi.yelpcorp.com/simple
ENV PIP_INDEX_URL=$PIP_INDEX_URL

RUN sed -i 's/archive.ubuntu.com/us-east1.gce.archive.ubuntu.com/g' /etc/apt/sources.list

RUN echo "deb http://repos.mesosphere.com/ubuntu xenial main" > /etc/apt/sources.list.d/mesosphere.list && \
Expand Down

0 comments on commit 9b7355d

Please sign in to comment.