Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ff1b81715 | ||
|
|
67274d5ee6 | ||
|
|
17bc815c84 | ||
|
|
b701cc5103 | ||
|
|
4a62ecd0fa | ||
|
|
3266a94ff8 | ||
|
|
06ad796cea |
@@ -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
39
.install_oc.yaml
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user