mirror of
https://github.com/ansible/awx-operator.git
synced 2026-04-26 00:16:45 +00:00
Get 3.7 booting and running jobs
There's still some polishing that needs to happen, but this gets things running
This commit is contained in:
@@ -19,7 +19,7 @@ tower_web_image: registry.redhat.io/ansible-tower-37/ansible-tower-rhel7:3.7.0
|
||||
|
||||
tower_create_preload_data: true
|
||||
|
||||
tower_task_replicas: "1"
|
||||
tower_replicas: "1"
|
||||
|
||||
tower_task_mem_request: 1Gi
|
||||
tower_task_cpu_request: 500m
|
||||
@@ -38,4 +38,4 @@ tower_postgres_storage_class: ''
|
||||
|
||||
tower_postgres_data_path: '/var/lib/postgresql/data/pgdata'
|
||||
|
||||
uwsgi_bash: "bash -c"
|
||||
uwsgi_bash: "scl enable rh-postgresql10"
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
definition: "{{ lookup('template', item) | from_yaml_all | list }}"
|
||||
register: k8s_defs_result
|
||||
with_items:
|
||||
- tower_memcached.yaml.j2
|
||||
- tower_postgres.yaml.j2
|
||||
- tower_config.yaml.j2
|
||||
- tower_redis.yaml.j2
|
||||
- launch_awx.yaml.j2
|
||||
- supervisor.yaml.j2
|
||||
- tower_web.yaml.j2
|
||||
- tower.yaml.j2
|
||||
|
||||
- name: Get the Tower pod information.
|
||||
k8s_info:
|
||||
@@ -53,16 +51,16 @@
|
||||
|
||||
- include_tasks: initialize.yml
|
||||
|
||||
- name: Scale the tower_task deployment to 0 replicas after migration.
|
||||
- name: Scale the tower deployment to 0 replicas after migration.
|
||||
k8s:
|
||||
definition: "{{ lookup('template', 'tower_task.yaml.j2') | from_yaml_all | list }}"
|
||||
definition: "{{ lookup('template', 'tower.yaml.j2') | from_yaml_all | list }}"
|
||||
vars:
|
||||
tower_task_replicas: "0"
|
||||
tower_replicas: "0"
|
||||
when: migrate_result and migrate_result.changed
|
||||
|
||||
- name: Scale the tower_task deployment back to 1 replica after migration.
|
||||
- name: Scale the tower deployment back to 1 replica after migration.
|
||||
k8s:
|
||||
definition: "{{ lookup('template', 'tower_task.yaml.j2') | from_yaml_all | list }}"
|
||||
definition: "{{ lookup('template', 'tower.yaml.j2') | from_yaml_all | list }}"
|
||||
vars:
|
||||
tower_task_replicas: "1"
|
||||
tower_replicas: "1"
|
||||
when: migrate_result and migrate_result.changed
|
||||
|
||||
@@ -14,12 +14,12 @@ data:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: '{{ meta.name }}-tower-web'
|
||||
name: '{{ meta.name }}'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
labels:
|
||||
app: tower
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: {{ tower_replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tower
|
||||
@@ -44,17 +44,18 @@ spec:
|
||||
mountPath: "/var/run/memcached"
|
||||
- image: '{{ tower_redis_image }}'
|
||||
name: redis
|
||||
args: ["redis-server", "/etc/redis.conf"]
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
volumeMounts:
|
||||
- name: {{ meta.name }}-redis-config
|
||||
mountPath: "/usr/local/etc/redis/redis.conf"
|
||||
mountPath: "/etc/redis.conf"
|
||||
subPath: redis.conf
|
||||
readOnly: true
|
||||
- name: {{ meta.name }}-redis-socket
|
||||
mountPath: "/var/run/redis"
|
||||
- image: '{{ tower_web_image }}'
|
||||
name: tower
|
||||
name: '{{ meta.name }}-web'
|
||||
ports:
|
||||
- containerPort: 8052
|
||||
volumeMounts:
|
||||
@@ -91,7 +92,7 @@ spec:
|
||||
memory: '{{ tower_web_mem_request }}'
|
||||
cpu: '{{ tower_web_cpu_request }}'
|
||||
- image: '{{ tower_task_image }}'
|
||||
name: tower-task
|
||||
name: '{{ meta.name }}-task'
|
||||
{% if tower_task_privileged == true %}
|
||||
securityContext:
|
||||
privileged: true
|
||||
@@ -100,32 +100,9 @@ data:
|
||||
if os.getenv("DATABASE_SSLMODE", False):
|
||||
DATABASES['default']['OPTIONS'] = {'sslmode': os.getenv("DATABASE_SSLMODE")}
|
||||
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
||||
'LOCATION': '{}:{}'.format("{{ meta.name }}-memcached.{{ meta.namespace }}.svc.cluster.local", "11211")
|
||||
},
|
||||
'ephemeral': {
|
||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
||||
},
|
||||
}
|
||||
|
||||
BROKER_URL = 'redis://{}:{}/'.format(
|
||||
'{{ meta.name }}-redis.{{ meta.namespace }}.svc.cluster.local',
|
||||
'6379')
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
"default": {
|
||||
"BACKEND": "channels_redis.core.RedisChannelLayer",
|
||||
"CONFIG": {
|
||||
"hosts": [BROKER_URL],
|
||||
"capacity": 10000,
|
||||
"group_expiry": 157784760, # 5 years
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
USE_X_FORWARDED_PORT = True
|
||||
BROADCAST_WEBSOCKET_PORT = 8052
|
||||
BROADCAST_WEBSOCKET_PROTOCOL = 'http'
|
||||
|
||||
nginx_conf: |
|
||||
worker_processes 1;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Memcached Service.
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{{ meta.name }}-memcached'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
labels:
|
||||
app: tower-memcached
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- port: 11211
|
||||
protocol: TCP
|
||||
targetPort: 11211
|
||||
selector:
|
||||
app: tower-memcached
|
||||
@@ -1,16 +0,0 @@
|
||||
# Redis Service.
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{{ meta.name }}-redis'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
labels:
|
||||
app: tower-redis
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
protocol: TCP
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: tower-redis
|
||||
Reference in New Issue
Block a user