Skip to content

Commit

Permalink
feature(hydra): move to formal python:3.8 image
Browse files Browse the repository at this point in the history
centos7 isn't formally support python3
and were getting python3.6 out of iusrepo
and
iusrepo/announce#18
seem like a good reason to move to formal python image
  • Loading branch information
fruch committed May 21, 2020
1 parent e611baf commit 5f9ece7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
additional_dependencies:
- 'requests==2.20.0'
- 'fabric==2.4.0'
- 'PyYAML==3.11'
- 'PyYAML==5.1'
- 'boto3==1.13.5'
- 'boto3-stubs[s3,ec2,dynamodb,pricing]==1.13.5'
- 'apache-libcloud==2.6.0'
Expand All @@ -52,7 +52,6 @@ repos:
- 'click==7.0'
- 'click-completion==0.5.0'
- 'PTable==0.9.2'
- 'backports.datetime-timestamp==1.2'
- 'pytest==4.6.4'
- 'selenium==3.141.0'
- 'mysql-connector-python==8.0.19'
Expand Down
27 changes: 21 additions & 6 deletions docker/env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
FROM centos:7
FROM python:3.8

ADD install-prereqs.sh install-prereqs.sh
RUN ./install-prereqs.sh docker
RUN yum update -y \
&& yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
&& yum install -y python36u python36u-libs python36u-devel python36u-pip
#ADD install-prereqs.sh install-prereqs.sh
#RUN ./install-prereqs.sh docker

RUN DEBIAN_FRONTEND=noninteractive apt update && \
apt install -y git openssl iproute2 sudo apt-transport-https \
ca-certificates curl gnupg2 software-properties-common rsync

# Install Docker cli only
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - && \
DEBIAN_FRONTEND=noninteractive add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" && \
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y docker-ce-cli && \
sudo groupadd docker && \
sudo usermod -aG docker `whoami`

ADD requirements-python.txt requirements-python.txt
RUN pip3 install setuptools==40.8.0 pip==19.1.1
RUN pip3 install -r requirements-python.txt

# update locales
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y locales \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=en_US.UTF-8

ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV PYTHONWARNINGS ignore:unclosed
2 changes: 1 addition & 1 deletion docker/env/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.66
0.67-python3.8-1
2 changes: 1 addition & 1 deletion test-cases/PR-provision-test-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ nemesis_filter_seeds: false

user_prefix: 'PR-provision-docker'

scylla_version: 3.3.rc1
scylla_version: 4.0.0
system_auth_rf: 0
monitor_swap_size: 0
2 changes: 1 addition & 1 deletion test-cases/PR-provision-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gce_image_db: 'https://www.googleapis.com/compute/v1/projects/centos-cloud/globa

use_mgmt: true

scylla_version: "3.3"
scylla_version: "4.0.0"
workaround_kernel_bug_for_iotune: true

post_behavior_db_nodes: "destroy"
Expand Down
6 changes: 3 additions & 3 deletions unit_tests/test_seed_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_reflector_node_not_exists(self):
self.setup_cluster(nodes_number=1)
self.cluster.set_test_params(seeds_selector='reflector', seeds_num=1, db_type='scylla')
sdcm.cluster.SCYLLA_YAML_PATH = os.path.join(os.path.dirname(__file__), 'test_data', 'scylla.yaml')
self.assertRaisesRegex(expected_exception=RetryError,
expected_regex='Waiting for seed is selected by reflector',
callable_obj=self.cluster.set_seeds,
self.assertRaisesRegex(RetryError,
r'Waiting for seed is selected by reflector',
self.cluster.set_seeds,
wait_for_timeout=5)

0 comments on commit 5f9ece7

Please sign in to comment.