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
3 changed files with 74 additions and 5 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