Python 3 / Upstream Kubernetes

This commit is contained in:
Shane McDonald
2019-01-14 17:33:01 -05:00
committed by Ryan Petrello
parent 2016798e0f
commit 04da4503db
6 changed files with 16 additions and 8 deletions

View File

@@ -7,13 +7,14 @@ RUN yum install -y bzip2 \
gettext \
git \
make \
python \
python-pip
python36-setuptools
RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
RUN yum install -y nodejs
RUN npm set progress=false
RUN ln -s /usr/bin/python36 /usr/bin/python3
WORKDIR "/awx"
ENTRYPOINT ["/bin/bash", "-c"]

View File

@@ -5,7 +5,7 @@ import os
def get_secret():
if os.path.exists("/etc/tower/SECRET_KEY"):
return file('/etc/tower/SECRET_KEY', 'rb').read().strip()
return open('/etc/tower/SECRET_KEY', 'rb').read().strip()
return os.getenv("SECRET_KEY", "privateawx")

View File

@@ -191,6 +191,7 @@
dockerfile: Dockerfile
name: "{{ web_image }}"
tag: "{{ awx_version }}"
force: yes
delegate_to: localhost
- name: Build base task image
@@ -204,6 +205,7 @@
name: "{{ task_image }}"
tag: "{{ awx_version }}"
pull: no
force: yes
delegate_to: localhost
- name: Tag task and web images as latest

View File

@@ -31,7 +31,7 @@ RUN chgrp -Rf root /var/lib/awx && chmod -Rf g+w /var/lib/awx
RUN yum -y install epel-release && \
yum -y localinstall http://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm && \
yum -y update && \
yum -y install ansible git mercurial subversion curl python-psycopg2 python-pip python-setuptools libselinux-python setools-libs yum-utils sudo acl make postgresql-devel nginx python-psutil libxml2-devel libxslt-devel libstdc++.so.6 gcc cyrus-sasl-devel cyrus-sasl openldap-devel libffi-devel python-pip xmlsec1-devel swig krb5-devel xmlsec1-openssl xmlsec1 xmlsec1-openssl-devel libtool-ltdl-devel bubblewrap gcc-c++ python-devel python36 python36-devel krb5-workstation krb5-libs libcurl-devel rsync unzip && \
yum -y install ansible git mercurial subversion curl python-psycopg2 python-pip python-setuptools libselinux-python setools-libs yum-utils sudo acl make postgresql-devel nginx python-psutil libxml2-devel libxslt-devel libstdc++.so.6 gcc cyrus-sasl-devel cyrus-sasl openldap-devel libffi-devel python-pip xmlsec1-devel swig krb5-devel xmlsec1-openssl xmlsec1 xmlsec1-openssl-devel libtool-ltdl-devel bubblewrap gcc-c++ python-devel python36-setuptools python36-devel krb5-workstation krb5-libs libcurl-devel rsync unzip && \
ln -s /usr/bin/python36 /usr/bin/python3 && \
python36 -m ensurepip && \
pip3 install virtualenv && \
@@ -47,7 +47,8 @@ RUN mkdir -p /var/log/tower
RUN chmod -R g+w /var/log/tower
RUN mkdir -p /etc/tower
COPY {{ awx_sdist_file }} /tmp/{{ awx_sdist_file }}
RUN OFFICIAL=yes pip install /tmp/{{ awx_sdist_file }}
RUN OFFICIAL=yes /var/lib/awx/venv/awx/bin/pip install /tmp/{{ awx_sdist_file }}
RUN ln -s /var/lib/awx/venv/awx/bin/awx-manage /usr/bin/awx-manage
RUN rm -rf /tmp/*
RUN echo "{{ awx_version }}" > /var/lib/awx/.tower_version