mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
Update AWX images to CentOS 8
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
[ansible]
|
|
||||||
name=Ansible for Enterprise Linux 7 - $basearch
|
|
||||||
baseurl=https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/
|
|
||||||
enabled=1
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ansible-release
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[google-cloud-sdk]
|
[google-cloud-sdk]
|
||||||
name=Google Cloud SDK
|
name=Google Cloud SDK
|
||||||
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
|
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=1
|
gpgcheck=1
|
||||||
repo_gpgcheck=1
|
repo_gpgcheck=1
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ stderr_logfile=/dev/stderr
|
|||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
[program:uwsgi]
|
[program:uwsgi]
|
||||||
command = /usr/bin/scl enable rh-postgresql10 '/var/lib/awx/venv/awx/bin/uwsgi --socket 127.0.0.1:8050 --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --master-fifo=/var/lib/awx/awxfifo --lazy-apps -b 32768'
|
command = /var/lib/awx/venv/awx/bin/uwsgi --socket 127.0.0.1:8050 --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --master-fifo=/var/lib/awx/awxfifo --lazy-apps -b 32768
|
||||||
directory = /var/lib/awx
|
directory = /var/lib/awx
|
||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
@@ -25,7 +25,7 @@ stderr_logfile=/dev/stderr
|
|||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
[program:daphne]
|
[program:daphne]
|
||||||
command = /usr/bin/scl enable rh-postgresql10 '/var/lib/awx/venv/awx/bin/daphne -b 127.0.0.1 -p 8051 --websocket_timeout -1 awx.asgi:channel_layer'
|
command = /var/lib/awx/venv/awx/bin/daphne -b 127.0.0.1 -p 8051 --websocket_timeout -1 awx.asgi:channel_layer
|
||||||
directory = /var/lib/awx
|
directory = /var/lib/awx
|
||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
|
|||||||
@@ -173,18 +173,6 @@
|
|||||||
dest: "{{ docker_base_path }}/Makefile"
|
dest: "{{ docker_base_path }}/Makefile"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Stage ansible repo
|
|
||||||
copy:
|
|
||||||
src: 'ansible.repo'
|
|
||||||
dest: '{{ docker_base_path }}/ansible.repo'
|
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: Stage ansible repo key
|
|
||||||
copy:
|
|
||||||
src: 'RPM-GPG-KEY-ansible-release'
|
|
||||||
dest: '{{ docker_base_path }}/RPM-GPG-KEY-ansible-release'
|
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: Build base web image
|
- name: Build base web image
|
||||||
docker_image:
|
docker_image:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -1,75 +1,57 @@
|
|||||||
FROM centos:7
|
FROM centos:8
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ADD ansible.repo /etc/yum.repos.d/ansible.repo
|
# sync with installer/roles/image_build/templates/Dockerfile.j2
|
||||||
ADD RPM-GPG-KEY-ansible-release /etc/pki/rpm-gpg/RPM-GPG-KEY-ansible-release
|
RUN dnf -y update && \
|
||||||
|
dnf -y install epel-release 'dnf-command(config-manager)' && \
|
||||||
|
dnf module -y enable 'postgresql:10' && \
|
||||||
# add rhscl repo for rh-postgresql-devel
|
dnf config-manager --set-enabled PowerTools && \
|
||||||
RUN yum -y install centos-release-scl
|
dnf -y install acl \
|
||||||
RUN yum-config-manager --enable rhel-server-rhscl-7-rpms
|
|
||||||
|
|
||||||
RUN yum -y update && yum -y install epel-release && yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
|
||||||
|
|
||||||
# sync with tools/docker-compose/Dockerfile
|
|
||||||
RUN yum -y install acl \
|
|
||||||
ansible \
|
ansible \
|
||||||
bubblewrap \
|
bubblewrap \
|
||||||
curl \
|
curl \
|
||||||
cyrus-sasl \
|
|
||||||
cyrus-sasl-devel \
|
|
||||||
gcc \
|
gcc \
|
||||||
gcc-c++ \
|
gcc-c++ \
|
||||||
git2u \
|
git-core \
|
||||||
git2u-core \
|
|
||||||
krb5-devel \
|
|
||||||
krb5-libs \
|
|
||||||
krb5-workstation \
|
krb5-workstation \
|
||||||
libcurl-devel \
|
libcurl-devel \
|
||||||
libffi-devel \
|
libffi-devel \
|
||||||
libselinux-python \
|
|
||||||
libstdc++.so.6 \
|
libstdc++.so.6 \
|
||||||
libtool-ltdl-devel \
|
libtool-ltdl-devel \
|
||||||
libxml2-devel \
|
libcgroup-tools \
|
||||||
libxslt-devel \
|
|
||||||
make \
|
make \
|
||||||
mercurial \
|
mercurial \
|
||||||
mg \
|
|
||||||
nginx \
|
nginx \
|
||||||
nodejs \
|
nodejs \
|
||||||
|
nss \
|
||||||
openldap-devel \
|
openldap-devel \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
rh-postgresql10-postgresql-devel \
|
patch \
|
||||||
rh-postgresql10-postgresql-server-syspaths \
|
@postgresql:10 \
|
||||||
scl-utils-build \
|
postgresql-devel \
|
||||||
scl-utils \
|
python3-devel \
|
||||||
python-devel \
|
python3-libselinux \
|
||||||
python-pip \
|
python3-pip \
|
||||||
python-psutil \
|
python3-setuptools \
|
||||||
python-psycopg2 \
|
|
||||||
python-setuptools \
|
|
||||||
python36-devel \
|
|
||||||
python36-setuptools \
|
|
||||||
rsync \
|
rsync \
|
||||||
setools-libs \
|
|
||||||
subversion \
|
subversion \
|
||||||
sudo \
|
sudo \
|
||||||
swig \
|
swig \
|
||||||
tmux \
|
tmux \
|
||||||
unzip \
|
unzip \
|
||||||
vim \
|
vim-minimal \
|
||||||
xmlsec1 \
|
xmlsec1 \
|
||||||
xmlsec1-devel \
|
xmlsec1-devel \
|
||||||
xmlsec1-openssl \
|
xmlsec1-openssl \
|
||||||
xmlsec1-openssl-devel \
|
xmlsec1-openssl-devel \
|
||||||
yum-utils
|
dnf-utils
|
||||||
|
|
||||||
ADD https://github.com/krallin/tini/releases/download/v0.14.0/tini /tini
|
ADD https://github.com/krallin/tini/releases/download/v0.14.0/tini /tini
|
||||||
RUN chmod +x /tini
|
RUN chmod +x /tini
|
||||||
|
|
||||||
RUN python3 -m ensurepip && pip3 install virtualenv
|
RUN python3 -m ensurepip && pip3 install virtualenv
|
||||||
RUN pip install supervisor
|
RUN pip3 install supervisor
|
||||||
|
|
||||||
ADD Makefile /tmp/Makefile
|
ADD Makefile /tmp/Makefile
|
||||||
RUN mkdir /tmp/requirements
|
RUN mkdir /tmp/requirements
|
||||||
@@ -80,30 +62,19 @@ ADD requirements/requirements_ansible.txt \
|
|||||||
requirements/requirements_tower_uninstall.txt \
|
requirements/requirements_tower_uninstall.txt \
|
||||||
requirements/requirements_git.txt \
|
requirements/requirements_git.txt \
|
||||||
/tmp/requirements/
|
/tmp/requirements/
|
||||||
RUN scl enable rh-postgresql10 'cd /tmp && VENV_BASE="/var/lib/awx/venv" make requirements'
|
RUN cd /tmp && VENV_BASE="/var/lib/awx/venv" make requirements_awx requirements_ansible_py3
|
||||||
|
|
||||||
RUN yum -y remove cyrus-sasl-devel \
|
RUN dnf -y remove *-devel \
|
||||||
gcc \
|
gcc \
|
||||||
gcc-c++ \
|
gcc-c++ \
|
||||||
krb5-devel \
|
nodejs
|
||||||
libtool-ltdl-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
libxslt-devel \
|
|
||||||
openldap-devel \
|
|
||||||
rh-postgresql10-postgresql-devel \
|
|
||||||
python-devel \
|
|
||||||
python36-devel \
|
|
||||||
nodejs \
|
|
||||||
xmlsec1-devel \
|
|
||||||
xmlsec1-openssl-devel
|
|
||||||
|
|
||||||
# makes postgres available for data migrations when upgrading
|
# makes postgres available for data migrations when upgrading
|
||||||
RUN export PATH=/usr/pgsql-10/bin:$PATH
|
RUN export PATH=/usr/pgsql-10/bin:$PATH
|
||||||
|
|
||||||
RUN yum -y clean all
|
RUN dnf -y clean all
|
||||||
RUN rm -rf /root/.cache
|
RUN rm -rf /root/.cache
|
||||||
|
|
||||||
RUN localedef -c -i en_US -f UTF-8 en_US.UTF-8
|
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
ENV LANGUAGE en_US:en
|
ENV LANGUAGE en_US:en
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LC_ALL en_US.UTF-8
|
||||||
@@ -131,7 +102,7 @@ RUN cd /usr/local/bin && \
|
|||||||
tar -xz --strip-components=1 --wildcards --no-anchored 'oc'
|
tar -xz --strip-components=1 --wildcards --no-anchored 'oc'
|
||||||
|
|
||||||
ADD google-cloud-sdk.repo /etc/yum.repos.d/
|
ADD google-cloud-sdk.repo /etc/yum.repos.d/
|
||||||
RUN yum install -y kubectl
|
RUN dnf install -y kubectl
|
||||||
|
|
||||||
RUN find /var/lib/awx -not -path '/var/lib/awx/venv*' | xargs chgrp root
|
RUN find /var/lib/awx -not -path '/var/lib/awx/venv*' | xargs chgrp root
|
||||||
RUN find /var/lib/awx -not -path '/var/lib/awx/venv*' | xargs chmod g+w
|
RUN find /var/lib/awx -not -path '/var/lib/awx/venv*' | xargs chmod g+w
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM {{ web_image }}:{{ awx_version }}
|
FROM {{ web_image }}:{{ awx_version }}
|
||||||
USER 0
|
USER 0
|
||||||
RUN sudo yum -y remove nginx
|
RUN sudo dnf -y remove nginx
|
||||||
USER 1000
|
USER 1000
|
||||||
EXPOSE 8052
|
EXPOSE 8052
|
||||||
CMD /usr/bin/launch_awx_task.sh
|
CMD /usr/bin/launch_awx_task.sh
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
Reference in New Issue
Block a user