mirror of
https://github.com/ansible/awx.git
synced 2026-03-15 07:57:29 -02:30
Python 3 / Upstream Kubernetes
This commit is contained in:
committed by
Ryan Petrello
parent
2016798e0f
commit
04da4503db
@@ -7,13 +7,14 @@ RUN yum install -y bzip2 \
|
|||||||
gettext \
|
gettext \
|
||||||
git \
|
git \
|
||||||
make \
|
make \
|
||||||
python \
|
python36-setuptools
|
||||||
python-pip
|
|
||||||
|
|
||||||
RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
|
RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
|
||||||
RUN yum install -y nodejs
|
RUN yum install -y nodejs
|
||||||
RUN npm set progress=false
|
RUN npm set progress=false
|
||||||
|
|
||||||
|
RUN ln -s /usr/bin/python36 /usr/bin/python3
|
||||||
|
|
||||||
WORKDIR "/awx"
|
WORKDIR "/awx"
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
ENTRYPOINT ["/bin/bash", "-c"]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import os
|
|||||||
|
|
||||||
def get_secret():
|
def get_secret():
|
||||||
if os.path.exists("/etc/tower/SECRET_KEY"):
|
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")
|
return os.getenv("SECRET_KEY", "privateawx")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -191,6 +191,7 @@
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
name: "{{ web_image }}"
|
name: "{{ web_image }}"
|
||||||
tag: "{{ awx_version }}"
|
tag: "{{ awx_version }}"
|
||||||
|
force: yes
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Build base task image
|
- name: Build base task image
|
||||||
@@ -204,6 +205,7 @@
|
|||||||
name: "{{ task_image }}"
|
name: "{{ task_image }}"
|
||||||
tag: "{{ awx_version }}"
|
tag: "{{ awx_version }}"
|
||||||
pull: no
|
pull: no
|
||||||
|
force: yes
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Tag task and web images as latest
|
- name: Tag task and web images as latest
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ RUN chgrp -Rf root /var/lib/awx && chmod -Rf g+w /var/lib/awx
|
|||||||
RUN yum -y install epel-release && \
|
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 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 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 && \
|
ln -s /usr/bin/python36 /usr/bin/python3 && \
|
||||||
python36 -m ensurepip && \
|
python36 -m ensurepip && \
|
||||||
pip3 install virtualenv && \
|
pip3 install virtualenv && \
|
||||||
@@ -47,7 +47,8 @@ RUN mkdir -p /var/log/tower
|
|||||||
RUN chmod -R g+w /var/log/tower
|
RUN chmod -R g+w /var/log/tower
|
||||||
RUN mkdir -p /etc/tower
|
RUN mkdir -p /etc/tower
|
||||||
COPY {{ awx_sdist_file }} /tmp/{{ awx_sdist_file }}
|
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 rm -rf /tmp/*
|
||||||
|
|
||||||
RUN echo "{{ awx_version }}" > /var/lib/awx/.tower_version
|
RUN echo "{{ awx_version }}" > /var/lib/awx/.tower_version
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ rabbitmq_erlang_cookie: ''
|
|||||||
kubernetes_base_path: "{{ local_base_config_path|default('/tmp') }}/{{ kubernetes_deployment_name }}-config"
|
kubernetes_base_path: "{{ local_base_config_path|default('/tmp') }}/{{ kubernetes_deployment_name }}-config"
|
||||||
|
|
||||||
kubernetes_task_version: "{{ tower_package_version | default(dockerhub_version) }}"
|
kubernetes_task_version: "{{ tower_package_version | default(dockerhub_version) }}"
|
||||||
kubernetes_task_image: "{{ tower_package_name | default(dockerhub_base+'/awx_task') }}"
|
kubernetes_task_image: "{{ tower_package_name | default('ansible/awx_task') }}"
|
||||||
|
|
||||||
kubernetes_web_version: "{{ tower_package_version | default(dockerhub_version) }}"
|
kubernetes_web_version: "{{ tower_package_version | default(dockerhub_version) }}"
|
||||||
kubernetes_web_image: "{{ tower_package_name | default(dockerhub_base+'/awx_web') }}"
|
kubernetes_web_image: "{{ tower_package_name | default('ansible/awx_web') }}"
|
||||||
|
|
||||||
web_mem_request: 1
|
web_mem_request: 1
|
||||||
web_cpu_request: 500
|
web_cpu_request: 500
|
||||||
@@ -44,3 +44,5 @@ kubernetes_deployment_name: awx
|
|||||||
kubernetes_deployment_replica_size: 1
|
kubernetes_deployment_replica_size: 1
|
||||||
|
|
||||||
postgress_activate_wait: 60
|
postgress_activate_wait: 60
|
||||||
|
|
||||||
|
insights_url_base: "https://example.org"
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ data:
|
|||||||
SYSTEM_TASK_ABS_CPU = {{ ((task_cpu_request|int / 1000) * 4)|int }}
|
SYSTEM_TASK_ABS_CPU = {{ ((task_cpu_request|int / 1000) * 4)|int }}
|
||||||
SYSTEM_TASK_ABS_MEM = {{ ((task_mem_request|int * 1024) / 100)|int }}
|
SYSTEM_TASK_ABS_MEM = {{ ((task_mem_request|int * 1024) / 100)|int }}
|
||||||
|
|
||||||
|
INSIGHTS_URL_BASE = "{{ insights_url_base }}"
|
||||||
|
|
||||||
#Autoprovisioning should replace this
|
#Autoprovisioning should replace this
|
||||||
CLUSTER_HOST_ID = socket.gethostname()
|
CLUSTER_HOST_ID = socket.gethostname()
|
||||||
SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
|
SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
|
||||||
@@ -30,7 +32,7 @@ data:
|
|||||||
STATIC_ROOT = '/var/lib/awx/public/static'
|
STATIC_ROOT = '/var/lib/awx/public/static'
|
||||||
PROJECTS_ROOT = '/var/lib/awx/projects'
|
PROJECTS_ROOT = '/var/lib/awx/projects'
|
||||||
JOBOUTPUT_ROOT = '/var/lib/awx/job_status'
|
JOBOUTPUT_ROOT = '/var/lib/awx/job_status'
|
||||||
SECRET_KEY = file('/etc/tower/SECRET_KEY', 'rb').read().strip()
|
SECRET_KEY = open('/etc/tower/SECRET_KEY', 'rb').read().strip()
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
INTERNAL_API_URL = 'http://127.0.0.1:8052'
|
INTERNAL_API_URL = 'http://127.0.0.1:8052'
|
||||||
SERVER_EMAIL = 'root@localhost'
|
SERVER_EMAIL = 'root@localhost'
|
||||||
|
|||||||
Reference in New Issue
Block a user