7 Commits

Author SHA1 Message Date
willtome
6ff1b81715 Merge branch 'main' into usr_app 2024-08-27 07:47:24 -04:00
null
67274d5ee6 yml != yaml 2023-10-24 17:17:18 +00:00
null
17bc815c84 add USR App 2023-10-24 17:15:07 +00:00
willtome
b701cc5103 use creator-ee 2023-10-24 12:54:15 -04:00
willtome
4a62ecd0fa add install oc file 2023-10-24 12:45:09 -04:00
willtome
3266a94ff8 update devfile 2023-10-24 12:33:24 -04:00
willtome
06ad796cea update devfile 2023-10-24 12:32:20 -04:00
4 changed files with 74 additions and 151 deletions

View File

@@ -3,11 +3,23 @@ schemaVersion: 2.2.0
metadata:
name: product-demos
components:
- name: product-demos-ee
- name: tooling-container
container:
image: quay.io/mloriedo/ansible-creator-ee:latest # workaround for https://github.com/eclipse/che/issues/21778
image: quay.io/devspaces/ansible-creator-ee@sha256:04c7aa48f34ab28dc21f36acfe472b249f29c24d1a52d98b2c8da75dd6587d79
memoryRequest: 256M
memoryLimit: 5Gi
memoryLimit: 6Gi
cpuRequest: 250m
cpuLimit: 2000m
args: ['tail', '-f', '/dev/null']
commands:
- id: oc-install
exec:
commandLine: '/usr/local/bin/ansible-playbook ${PROJECT_SOURCE}/.install_oc.yaml'
workingDir: ${PROJECT_SOURCE}
group:
kind: build
isDefault: true
component: tooling-container
events:
postStart:
- "oc-install"

39
.install_oc.yaml Normal file
View File

@@ -0,0 +1,39 @@
---
- name: Create
hosts: localhost
connection: local
gather_facts: false
no_log: false
vars:
molecule_pip_dependencies:
- kubernetes
tasks:
- name: Store user ENVs
ansible.builtin.set_fact:
molecule_user_home_dir: "{{ lookup('ansible.builtin.env', 'HOME') }}"
molecule_user_path: "{{ lookup('ansible.builtin.env', 'PATH') }}"
- name: Create local bin directory
ansible.builtin.file:
path: "{{ molecule_user_home_dir }}/bin"
state: directory
mode: 0770
- name: Download oc binary from OCP downloads svc endpoint
ansible.builtin.get_url:
url: http://downloads.openshift-console.svc.cluster.local/amd64/linux/oc
dest: "{{ molecule_user_home_dir }}/bin/oc"
mode: '0770'
- name: Add another bin dir to system-wide $PATH.
ansible.builtin.lineinfile:
path: "{{ molecule_user_home_dir }}/.bashrc"
line: 'PATH=$PATH:{{ molecule_user_home_dir }}/bin'
state: present
- name: Ensure python dependencies are installed
ansible.builtin.pip:
name: "{{ molecule_pip_dependencies }}"
state: present
when: molecule_pip_dependencies is defined

View File

@@ -1,12 +1,18 @@
---
controller_components:
- execution_environments
- credential_types
- projects
- credentials
- inventory_sources
- job_templates
- workflow_job_templates
controller_projects:
- name: USR App
organization: Default
scm_type: git
wait: true
scm_url: https://github.com/willtome/usr-workshop
controller_credentials:
- name: OpenShift Credential
organization: Default
@@ -186,6 +192,17 @@ controller_templates:
credentials:
- "OpenShift Credential"
- name: OpenShift / USR App
job_type: run
inventory: "Demo Inventory"
project: "USR App"
playbook: "ansible_playbooks/deploy.yaml"
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- "OpenShift Credential"
controller_workflows:
- name: OpenShift / CNV / Infra Stack
description: A workflow to deploy Virtualized infra in OCP Virtalization
@@ -235,3 +252,4 @@ controller_workflows:
unified_job_template: 'SUBMIT FEEDBACK'
extra_data:
feedback: Failed to create CNV instance

View File

@@ -7,20 +7,6 @@ controller_projects:
organization: Default
scm_type: git
scm_url: 'https://github.com/ansible/awx-facts-playbooks.git'
- name: ansible-windows-0-day-bsod-recovery-fix
organization: Default
scm_type: git
scm_url: https://github.com/oatakan/ansible-windows-0-day-bsod-recovery.git
scm_branch: main
- name: aap-openshift-inventory-source
organization: Default
scm_type: git
scm_url: https://github.com/oatakan/ansible-openshift-virtualization-inventory-source.git
scm_branch: main
controller_execution_environments:
- name: ansible-base-ee-dev
image: quay.io/oatakan/ansible-base-ee-dev:latest
controller_templates:
- name: "WINDOWS / Install IIS"
@@ -320,135 +306,3 @@ controller_templates:
type: text
variable: HOSTS
required: false
- name: WINDOWS / BSOD / Provision Infrastructure
description: Provisions the required infrastructure
organization: Default
project: ansible-windows-0-day-bsod-recovery-fix
playbook: provision_infra_multi.yml
inventory: Demo Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
extra_vars:
provider: kubevirt
scenario: winpe
infra_template_name: windows-2022-standard
execution_environment: ansible-base-ee-dev
ask_credential_on_launch: true
ask_variables_on_launch: true
- name: WINDOWS / BSOD / Remove Infrastructure
description: Removes the provisioned systems
organization: Default
project: ansible-windows-0-day-bsod-recovery-fix
playbook: remove_infra_multi.yml
inventory: Demo Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
extra_vars:
provider: kubevirt
scenario: winpe
execution_environment: ansible-base-ee-dev
ask_credential_on_launch: true
ask_inventory_on_launch: true
ask_limit_on_launch: true
ask_variables_on_launch: true
- name: WINDOWS / BSOD / Generate WinPE
description: Generates WinPE image on the provisioned Windows system
organization: Default
project: ansible-windows-0-day-bsod-recovery-fix
playbook: generate_winpe.yml
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
extra_vars:
create_winpe_destination_file_location: iso_upload
create_winpe_enable_autostart: true
create_winpe_enable_powershell_modules: false
create_winpe_enable_script_debug: false
create_winpe_load_drivers: false
execution_environment: ansible-base-ee-dev
ask_credential_on_launch: true
ask_inventory_on_launch: true
ask_limit_on_launch: true
ask_variables_on_launch: true
- name: WINDOWS / BSOD / Upload WinPE ISO
description: Uploads the generated WinPE ISO to VMware/OpenShift Virtualization
organization: Default
project: ansible-windows-0-day-bsod-recovery-fix
playbook: upload_winpe_iso.yml
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
extra_vars:
provider: vmware
execution_environment: ansible-base-ee-dev
ask_credential_on_launch: true
ask_inventory_on_launch: true
ask_limit_on_launch: true
ask_variables_on_launch: true
controller_workflows:
- name: WINDOWS / BSOD / Generate WinPE Image Scenario
description: >
This workflow provisions a Windows system, generates a WinPE image,
uploads it to OpenShift Virtualization, and then removes the provisioned VM.
It demonstrates the process of creating and deploying a WinPE image
in an OpenShift Virtualization Environment.
organization: Default
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
extra_vars:
infra_template_name: windows-2022-standard
simplified_workflow_nodes:
- identifier: Provision Infrastructure
unified_job_template: WINDOWS / BSOD / Provision Infrastructure
credentials:
- OpenShift Credential
- Demo Credential
extra_data:
provider: kubevirt
scenario: winpe
infra_template_name: windows-2022-standard
success_nodes:
- Generate WinPE
- identifier: Generate WinPE
unified_job_template: WINDOWS / BSOD / Generate WinPE
inventory: Demo Inventory
credentials:
- OpenShift Credential
- Demo Credential
limit: label_app_name_winpe
extra_data:
create_winpe_destination_file_location: iso_upload
create_winpe_enable_autostart: true
create_winpe_enable_powershell_modules: false
create_winpe_enable_script_debug: false
create_winpe_load_drivers: true
success_nodes:
- Upload WinPE ISO
- identifier: Upload WinPE ISO
unified_job_template: WINDOWS / BSOD / Upload WinPE ISO
inventory: Demo Inventory
credentials:
- OpenShift Credential
- Demo Credential
limit: label_app_name_winpe
extra_data:
provider: kubevirt
success_nodes:
- Remove Infrastructure
- identifier: Remove Infrastructure
unified_job_template: WINDOWS / BSOD / Remove Infrastructure
inventory: Demo Inventory
credentials:
- OpenShift Credential
- Demo Credential
limit: label_app_name_winpe
extra_data:
provider: kubevirt