summaryrefslogtreecommitdiffstats
path: root/installer/roles
diff options
context:
space:
mode:
authorShane McDonald <me@shanemcd.com>2019-10-30 17:12:56 +0100
committerShane McDonald <me@shanemcd.com>2019-10-30 17:15:51 +0100
commit28994d4b0bde200b623354c2365735fe3555739f (patch)
treee76a12f3b64b052bb4fa16f15b05706d931f2bc7 /installer/roles
parentMerge pull request #5015 from AlanCoding/awx_awx_cp1 (diff)
downloadawx-28994d4b0bde200b623354c2365735fe3555739f.tar.xz
awx-28994d4b0bde200b623354c2365735fe3555739f.zip
Install oc and kubectl in upstream task image
Diffstat (limited to 'installer/roles')
-rw-r--r--installer/roles/image_build/files/google-cloud-sdk.repo8
-rw-r--r--installer/roles/image_build/tasks/main.yml7
-rw-r--r--installer/roles/image_build/templates/Dockerfile.j28
-rw-r--r--installer/roles/image_push/tasks/main.yml4
4 files changed, 23 insertions, 4 deletions
diff --git a/installer/roles/image_build/files/google-cloud-sdk.repo b/installer/roles/image_build/files/google-cloud-sdk.repo
new file mode 100644
index 0000000000..098f56bc25
--- /dev/null
+++ b/installer/roles/image_build/files/google-cloud-sdk.repo
@@ -0,0 +1,8 @@
+[google-cloud-sdk]
+name=Google Cloud SDK
+baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
+enabled=1
+gpgcheck=1
+repo_gpgcheck=1
+gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
+ https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg \ No newline at end of file
diff --git a/installer/roles/image_build/tasks/main.yml b/installer/roles/image_build/tasks/main.yml
index 4e6f0ad15b..10b676f931 100644
--- a/installer/roles/image_build/tasks/main.yml
+++ b/installer/roles/image_build/tasks/main.yml
@@ -130,6 +130,13 @@
mode: '0700'
delegate_to: localhost
+- name: Stage google-cloud-sdk.repo
+ copy:
+ src: google-cloud-sdk.repo
+ dest: "{{ docker_base_path }}/google-cloud-sdk.repo"
+ mode: '0700'
+ delegate_to: localhost
+
- name: Stage supervisor.conf
copy:
src: supervisor.conf
diff --git a/installer/roles/image_build/templates/Dockerfile.j2 b/installer/roles/image_build/templates/Dockerfile.j2
index b5efafa22a..8528aa26f3 100644
--- a/installer/roles/image_build/templates/Dockerfile.j2
+++ b/installer/roles/image_build/templates/Dockerfile.j2
@@ -125,6 +125,14 @@ RUN chmod +rx /usr/bin/launch_awx.sh && \
chmod +rx /usr/bin/launch_awx_task.sh && \
chmod +rx /usr/bin/config-watcher
+# Install OpenShift CLI
+RUN cd /usr/local/bin && \
+ curl -L https://github.com/openshift/origin/releases/download/v3.9.0/openshift-origin-client-tools-v3.9.0-191fece-linux-64bit.tar.gz | \
+ tar -xz --strip-components=1 --wildcards --no-anchored 'oc'
+
+ADD google-cloud-sdk.repo /etc/yum.repos.d/
+RUN yum 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 chmod g+w
diff --git a/installer/roles/image_push/tasks/main.yml b/installer/roles/image_push/tasks/main.yml
index 1d75e4d29d..ff4bd9030c 100644
--- a/installer/roles/image_push/tasks/main.yml
+++ b/installer/roles/image_push/tasks/main.yml
@@ -9,9 +9,6 @@
delegate_to: localhost
- name: Remove local images to ensure proper push behavior
- # TODO: this code will not be necessary if and when docker_image can be configured to push if the image
- # Already exists locally
- # Pull request: https://github.com/ansible/ansible/pull/31863
block:
- name: Remove web image
docker_image:
@@ -25,7 +22,6 @@
tag: "{{ awx_version }}"
state: absent
delegate_to: localhost
- when: docker_remove_local_images|default(False)|bool
- name: Tag and Push Container Images
block: