Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2105056: CI 4.11 backport #12412

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
approvers:
- jstuever
- patrickdillon
- barbacbd
# review == this code is good /lgtm
reviewers:
- jstuever
- patrickdillon
- barbacbd
9 changes: 4 additions & 5 deletions images/installer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos:7
FROM quay.io/centos/centos:stream8

MAINTAINER OpenShift Team <dev@lists.openshift.redhat.com>

Expand All @@ -21,12 +21,11 @@ ENV USER_UID=1001 \

# Add image scripts and files for running as a system container
COPY images/installer/root /
# Add origin repo for including the oc client
COPY images/installer/origin-extra-root /
# Install openshift-ansible RPMs
RUN yum install -y epel-release && \
yum-config-manager --enable built > /dev/null && \
RUN yum install -y centos-release-ansible-29 epel-release && \
yum config-manager --enable built > /dev/null && \
yum install --setopt=tsflags=nodocs -y \
'ansible < 2.10' \
openshift-ansible-test && \
yum clean all

Expand Down
2 changes: 1 addition & 1 deletion images/installer/README_CONTAINER_IMAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ORIGIN-ANSIBLE IMAGE INSTALLER
===============================

Contains Dockerfile information for building an openshift/origin-ansible image
based on `centos:7` or `rhel7.3:7.3-released`.
based on `quay.io/centos/centos:stream8` or `registry.access.redhat.com/ubi8`.

Read additional setup information for this image at: https://hub.docker.com/r/openshift/origin-ansible/

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 9 additions & 9 deletions images/installer/root/usr/local/bin/generate
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/env python
#!/usr/libexec/platform-python

"""
Attempts to read 'master-config.yaml' and extract remote
Expand All @@ -17,7 +17,7 @@ import yaml
try:
HOME = os.environ['HOME']
except KeyError:
print 'A required environment variable "$HOME" has not been set'
print('A required environment variable "$HOME" has not been set')
exit(1)

DEFAULT_USER_CONFIG_PATH = '/etc/inventory-generator-config.yaml'
Expand Down Expand Up @@ -222,7 +222,7 @@ def main():
if not user_config:
user_config = dict()
except IOError as err:
print "Unable to find or read user configuration file '{}': {}".format(USER_CONFIG, err)
print("Unable to find or read user configuration file '{}': {}".format(USER_CONFIG, err))
exit(1)

master_config_path = user_config.get('master_config_path', DEFAULT_MASTER_CONFIG_PATH)
Expand All @@ -236,14 +236,14 @@ def main():
try:
file_obj = open(master_config_path, 'r')
except IOError as err:
print "Unable to find or read host master configuration file '{}': {}".format(master_config_path, err)
print("Unable to find or read host master configuration file '{}': {}".format(master_config_path, err))
exit(1)

raw_text = file_obj.read()

y = yaml.load(raw_text)
if y.get("kind", "") != "MasterConfig":
print "Bind-mounted host master configuration file is not of 'kind' MasterConfig. Aborting..."
print("Bind-mounted host master configuration file is not of 'kind' MasterConfig. Aborting...")
exit(1)

# finish reading config file and begin gathering
Expand Down Expand Up @@ -272,13 +272,13 @@ def main():
# gather enough information to generate the rest of the inventory file.
if not master_config:
msg = "'kubernetesMasterConfig' missing from '{}'; unable to gather all necessary host information..."
print msg.format(master_config_path)
print(msg.format(master_config_path))
exit(1)

master_public_url = y.get("masterPublicURL")
if not master_public_url:
msg = "'kubernetesMasterConfig.masterPublicURL' missing from '{}'; Unable to connect to master host..."
print msg.format(master_config_path)
print(msg.format(master_config_path))
exit(1)

oc = OpenShiftClient(admin_kubeconfig_path)
Expand All @@ -290,7 +290,7 @@ def main():
msg = ("Unable to obtain user information using the provided kubeconfig file. "
"Current context does not appear to be able to authenticate to the server. "
"Error returned from server:\n\n{}")
print msg.format(str(err))
print(msg.format(str(err)))
exit(1)

# connect to remote host using the provided config and extract all possible node information
Expand Down Expand Up @@ -350,7 +350,7 @@ def main():
try:
inv_file_obj = open(INVENTORY_FULL_PATH, 'w+')
except IOError as err:
print "Unable to create or open generated inventory file: {}".format(err)
print("Unable to create or open generated inventory file: {}".format(err))
exit(1)

inv_file_obj.write("[OSEv3:children]\n")
Expand Down
2 changes: 1 addition & 1 deletion images/installer/root/usr/local/bin/usage
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OpenShift environment. The inventory and ssh keys are mounted as volumes
in the key file via :Z so they can be accessed) and the PLAYBOOK_FILE
environment variable is set to point to the playbook within the image:

docker run -tu `id -u` \
podman run -tu `id -u` \
-v $HOME/.ssh/id_rsa:/opt/app-root/src/.ssh/id_rsa:Z,ro \
-v /etc/ansible/hosts:/tmp/inventory:Z,ro \
-e INVENTORY_FILE=/tmp/inventory \
Expand Down
1 change: 0 additions & 1 deletion inventory/dynamic/gcp/README.md

This file was deleted.