Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions ansible-navigator.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
2024-02-21T02:45:59.620155+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
2024-02-21T02:46:52.742202+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
2024-02-21T03:10:37.498730+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
2024-02-21T03:17:05.721138+00:00 CRITICAL 'ansible_navigator.actions._actions.run_interactive' Subcommand 'select' encountered a fatal error.
2024-02-21T03:17:05.721505+00:00 ERROR 'ansible_navigator.actions._actions.run_interactive' Logging an uncaught exception
Traceback (most recent call last):
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/_actions.py", line 154, in run_interactive
return run_action(app=app, interaction=interaction)
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/select.py", line 41, in run
app.steps.append(app.steps.current.select_func()) # add next
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/images.py", line 319, in _build_image_content
self._images.selected["python"]["details"],
KeyError: 'details'
2024-02-21T03:17:32.690950+00:00 CRITICAL 'ansible_navigator.actions._actions.run_interactive' Subcommand 'select' encountered a fatal error.
2024-02-21T03:17:32.691084+00:00 ERROR 'ansible_navigator.actions._actions.run_interactive' Logging an uncaught exception
Traceback (most recent call last):
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/_actions.py", line 154, in run_interactive
return run_action(app=app, interaction=interaction)
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/select.py", line 41, in run
app.steps.append(app.steps.current.select_func()) # add next
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/images.py", line 319, in _build_image_content
self._images.selected["python"]["details"],
KeyError: 'details'
2024-02-21T03:21:32.941863+00:00 CRITICAL 'ansible_navigator.actions._actions.run_interactive' Subcommand 'select' encountered a fatal error.
2024-02-21T03:21:32.943153+00:00 ERROR 'ansible_navigator.actions._actions.run_interactive' Logging an uncaught exception
Traceback (most recent call last):
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/_actions.py", line 154, in run_interactive
return run_action(app=app, interaction=interaction)
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/select.py", line 41, in run
app.steps.append(app.steps.current.select_func()) # add next
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/images.py", line 319, in _build_image_content
self._images.selected["python"]["details"],
KeyError: 'details'
2024-02-21T03:34:09.468488+00:00 CRITICAL 'ansible_navigator.actions._actions.run_interactive' Subcommand 'select' encountered a fatal error.
2024-02-21T03:34:09.469256+00:00 ERROR 'ansible_navigator.actions._actions.run_interactive' Logging an uncaught exception
Traceback (most recent call last):
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/_actions.py", line 154, in run_interactive
return run_action(app=app, interaction=interaction)
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/select.py", line 41, in run
app.steps.append(app.steps.current.select_func()) # add next
File "/home/alexb/.local/lib/python3.10/site-packages/ansible_navigator/actions/images.py", line 319, in _build_image_content
self._images.selected["python"]["details"],
KeyError: 'details'
2024-02-21T03:34:24.646435+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' Image inspection failed, image assumed to be corrupted or missing
2024-02-21T03:34:24.646644+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' stdout: []

2024-02-21T03:34:24.646682+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' stderr: Error: localhost/ee-supported-rel8:latest: image not known

2024-02-21T03:34:27.728648+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
2024-02-21T03:34:42.140903+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' Image inspection failed, image assumed to be corrupted or missing
2024-02-21T03:34:42.141124+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' stdout: []

2024-02-21T03:34:42.141165+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' stderr: Error: localhost/ee-supported-rhel8:latest: image not known

2024-02-21T03:34:45.224683+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
2024-02-21T03:35:08.539292+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' Image inspection failed, image assumed to be corrupted or missing
2024-02-21T03:35:08.539536+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' stdout: []

2024-02-21T03:35:08.539575+00:00 WARNING 'ansible_navigator.image_manager.puller._log_message' stderr: Error: localhost/ee-supported-rhel8:latest: image not known

2024-02-21T03:35:11.618073+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
2024-02-21T17:10:13.782460+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
2024-02-21T17:11:54.322009+00:00 ERROR 'ansible_navigator.image_manager.puller._log_message' Execution environment pull failed
9 changes: 5 additions & 4 deletions create-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
- hosts: "all"
connection: "local"
- hosts: all
connection: local
vars_files:
- vars/main.yaml
- vars/main.yaml

roles:
- name: roles/azure-auth
- name: roles/infra-create
- name: roles/cluster-create
- name: roles/jumphost-create
Expand All @@ -17,7 +18,7 @@
# rerun infra-create as we need to update routes for egress lockdown
- name: roles/infra-create
when:
- azr_aro_egress_lockdown | bool
- azr_aro_egress_lockdown | bool
- name: roles/add-pull-secret
when:
- azr_aro_pull_secret != ""
Expand Down
Binary file not shown.
31 changes: 17 additions & 14 deletions roles/add-pull-secret/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@
name: pull-secret
namespace: openshift-config
register: _cluster_pull_secret
no_log: True
no_log: false # TODO - Change me back after troubleshooting

# - debug:
# var: _cluster_pull_secret

- set_fact:
- name: Set pull secrets
ansible.builtin.set_fact:
_orig_pull_secret: "{{ _cluster_pull_secret.resources[0].data['.dockerconfigjson'] | b64decode | from_json }}"
_new_pull_secret: "{{ lookup('file', azr_aro_pull_secret) | from_json }}"
no_log: True
- set_fact:
no_log: false # TODO - Change me back after troubleshooting

- name: Set joint secrets
set_fact:
_joint_pull_secret: "{{ _orig_pull_secret | combine(_new_pull_secret, recursive=True) }}"
no_log: True
no_log: false # TODO - Change me back after troubleshooting

- name: Set the new OpenShift Pull Secret
kubernetes.core.k8s:
Expand All @@ -33,7 +36,7 @@
namespace: openshift-config
data:
.dockerconfigjson: "{{ _joint_pull_secret | to_json | b64encode }}"
no_log: True
no_log: false # TODO - Change me back after troubleshooting

- name: Configure sample operators
kubernetes.core.k8s:
Expand All @@ -59,11 +62,11 @@
name: cluster
spec:
sources:
- disabled: false
name: certified-operators
- disabled: false
name: community-operators
- disabled: false
name: redhat-marketplace
- disabled: false
name: redhat-operators
- disabled: false
name: certified-operators
- disabled: false
name: community-operators
- disabled: false
name: redhat-marketplace
- disabled: false
name: redhat-operators
Empty file added roles/ansible-navigator.log
Empty file.
38 changes: 38 additions & 0 deletions roles/azure-auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Role Name
=========

A brief description of the role goes here.

Requirements
------------

Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.

Role Variables
--------------

A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.

Dependencies
------------

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
roles:
- { role: username.rolename, x: 42 }

License
-------

BSD

Author Information
------------------

An optional section for the role authors to include contact information, or a website (HTML is not allowed).
9 changes: 9 additions & 0 deletions roles/azure-auth/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# defaults file for azure-auth
ansible_python_interpreter: /usr/bin/python3.9
staging_dir: "{{ playbook_dir }}/staging"

subscription_id: 027076cc-4655-484c-b43e-6aca6eb5f52c
tenant_id: 64dc69e4-d083-49fc-9569-ebece1dd1408
client_id: 7c90d97e-1e96-4344-84d5-9da8340d0f0f
client_password: qaJ8Q~scwWImadhGISKkOqXjAlMiLSXJVN9IOcG3 # TODO - move this into ansible vault
2 changes: 2 additions & 0 deletions roles/azure-auth/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# handlers file for azure-auth
52 changes: 52 additions & 0 deletions roles/azure-auth/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
galaxy_info:
author: your name
description: your role description
company: your company (optional)

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)

min_ansible_version: 2.1

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:

#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99

galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
22 changes: 22 additions & 0 deletions roles/azure-auth/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# tasks file for azure-auth
- name: Ensure required variables are set and not equal to "CHANGE_ME"
ansible.builtin.assert:
that:
- subscription_id is defined and subscription_id != "CHANGE_ME"
- tenant_id is defined and tenant_id != "CHANGE_ME"
- client_id is defined and client_id != "CHANGE_ME"
- client_password is defined and client_password != "CHANGE_ME"
fail_msg: "One or more required variables are not set or equal to 'CHANGE_ME'"

- name: Ensure .azure directory exists
ansible.builtin.file:
path: "~/.azure"
state: directory
mode: '0755'

- name: Generate azureProfile.json file
ansible.builtin.template:
src: azureProfile.json.j2
dest: "~/.azure/credentials"
mode: '0600'
5 changes: 5 additions & 0 deletions roles/azure-auth/templates/azureProfile.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[default]
subscription_id={{ subscription_id }}
client_id={{ client_id }}
secret={{ client_password }}
tenant={{ tenant_id }}
2 changes: 2 additions & 0 deletions roles/azure-auth/tests/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
localhost

5 changes: 5 additions & 0 deletions roles/azure-auth/tests/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: localhost
connection: local
roles:
- ../../azure-auth
3 changes: 3 additions & 0 deletions roles/azure-auth/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# vars file for azure-auth
#ansible_python_interpreter: /usr/bin/python3.9
49 changes: 27 additions & 22 deletions roles/cluster-create/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
---
- name: check cluster
- name: Check cluster
azure.azcollection.azure_rm_openshiftmanagedcluster_info:
resource_group: "{{ azr_resource_group }}"
name: "{{ azr_aro_cluster }}"
register: _aro_check
failed_when: False
changed_when: False
failed_when: false
changed_when: false

- debug:
- name: Output cluster result
ansible.builtin.debug:
msg: |
A cluster with the name {{ azr_aro_cluster }} already exists.
Skipping RBAC and Cluster Creation.

- fail:
- name: Fail logs
ansible.builtin.fail:
msg: |
Cluster {{ azr_aro_cluster }} failed to provision.
Cluster Status:
{{ _aro_check }}
when: (_aro_check.clusters != {}) and
(_aro_check.clusters.properties.provisioningState == "Failed")

- include_tasks: rbac.yml
- name: Run rbac tasks
ansible.builtin.include_tasks: rbac.yml
when:
- _aro_check.clusters == {}

- block:
- name: what cluster am i creating?
debug:
msg: |
***************************************
Preparing to create {{ azr_aro_cluster }}.
This task may take up to an hour.
***************************************
verbosity: 0
- name: Create ocp cluster
when:
- _aro_check.clusters == {}
block:
- name: What cluster am i creating?
ansible.builtin.debug:
msg: |
***************************************
Preparing to create {{ azr_aro_cluster }}.
This task may take up to an hour.
***************************************
verbosity: 0

- name: Create openshift cluster
azure.azcollection.azure_rm_openshiftmanagedcluster:
Expand All @@ -51,15 +57,14 @@
pod_cidr: "10.128.0.0/14"
service_cidr: "172.30.0.0/16"
worker_profiles:
- vm_size : "Standard_D4s_v3"
subnet_id : "{{ _machine_subnet.state.id }}"
disk_size : 128
count : 3
- vm_size: "Standard_D4s_v3"
subnet_id: "{{ _machine_subnet.state.id }}"
disk_size: 128
count: 3
master_profile:
vm_size : "Standard_D8s_v3"
vm_size: "Standard_D8s_v3"
subnet_id: "{{ _control_subnet.state.id }}"
when:
- _aro_check.clusters == {}

# - name: create aro cluster
# shell: |
# az aro create \
Expand Down
2 changes: 1 addition & 1 deletion roles/cluster-create/tasks/main.yml.stuart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
azure.azcollection.azure_rm_adserviceprincipal_info:
app_id: "{{ aro_service_principal.appId }}"
tenant: "{{ aro_service_principal.tenant }}"
no_log: true
no_log: false # TODO - Change me back after troubleshooting
register: _aro_sp_info

- set_fact:
Expand Down
Loading