Skip to content

Commit fa1f8cd

Browse files
committed
Initial commit
0 parents  commit fa1f8cd

28 files changed

+2028
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Static Checks Pull Request
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
jobs:
10+
static-checks:
11+
name: Run static tests using tox
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version:
16+
- '3.12'
17+
18+
steps:
19+
- name: Get Repository Code
20+
id: get_repo_code
21+
uses: actions/checkout@v2
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Run static checks
31+
run: |
32+
pip install tox
33+
tox -c tests/static -- ${{ github.base_ref }} ${{ github.sha }}
34+
...
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Static Checks Push
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- v*
10+
11+
jobs:
12+
static-checks:
13+
name: Run static tests using tox
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version:
18+
- '3.12'
19+
20+
steps:
21+
- name: Get Repository Code
22+
id: get_repo_code
23+
uses: actions/checkout@v2
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Run static checks
31+
run: |
32+
pip install tox
33+
tox -c tests/static
34+
...

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
__pycache__
2+
.ansible
3+
.ansible_facts
4+
.DS_Store
5+
.idea
6+
.pre-commit-config.yaml
7+
.tox
8+
.vscode
9+
*-user-data.yaml
10+
*-user-info.yaml
11+
*.pyc
12+
*.rc
13+
*.retry
14+
*.swp
15+
*.vscode

README.adoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
= rhpds.mta_workloads
2+
:toc: macro
3+
:toc-title: Table of Contents
4+
:toclevels: 3
5+
6+
An Ansible collection for deploying MTA (Migration Toolkit for Applications) workshop and lab environments on Red Hat OpenShift.
7+
8+
toc::[]
9+
10+
== Overview
11+
12+
This collection provides automation for setting up a complete MTA demonstration environment.
13+
14+
The collection uses GitOps (ArgoCD ApplicationSets) to deploy and manage all components.
15+
16+
== Collection Information
17+
18+
[cols="1,2"]
19+
|===
20+
|Namespace |`rhpds`
21+
|Name |`mta_workloads`
22+
|Version |1.0.0
23+
|License |GPL-2.0-or-later
24+
|Author |Wolfgang Kulhanek <wkulhane@redhat.com>, Shaaf Syed <sshaaf@redhat.com>
25+
|===
26+
27+
== Prerequisites
28+
29+
* Red Hat OpenShift 4.x cluster
30+
* OpenShift GitOps (ArgoCD) installed and configured
31+
* Gitea instance with users pre-configured (typically via Gitea Operator)
32+
* LiteMaaS or compatible LLM API endpoint
33+
* `kubernetes.core` Ansible collection installed
34+
* `agnosticd.core` Ansible collection installed
35+
36+
== Installation
37+
38+
Install the collection from Ansible Galaxy:
39+
40+
[source,bash]
41+
----
42+
ansible-galaxy collection install rhpds.mta_workloads
43+
----
44+
45+
Or include in your `requirements.yml`:
46+
47+
[source,yaml]
48+
----
49+
collections:
50+
- name: rhpds.mta_workloads
51+
version: ">=1.0.0"
52+
----
53+

galaxy.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#SPDX-License-Identifier: MIT-0
2+
### REQUIRED
3+
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
4+
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
5+
# underscores or numbers and cannot contain consecutive underscores
6+
namespace: rhpds
7+
8+
# The name of the collection. Has the same character restrictions as 'namespace'
9+
name: mta_workloads
10+
11+
# The version of the collection. Must be compatible with semantic versioning
12+
version: 1.0.0
13+
14+
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
15+
readme: README.md
16+
17+
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
18+
# @nicks:irc/im.site#channel'
19+
authors:
20+
- Wolfgang Kulhanek <wkulhane@redhat.com>
21+
- Shaaf Syed <sshaaf@redhat.com>
22+
23+
### OPTIONAL but strongly recommended
24+
# A short summary description of the collection
25+
description: Collection of Ansible workloads for MTA Workshops.
26+
27+
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
28+
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
29+
license:
30+
- GPL-2.0-or-later
31+
32+
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
33+
# mutually exclusive with 'license'
34+
license_file: ''
35+
36+
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
37+
# requirements as 'namespace' and 'name'
38+
tags: []
39+
40+
# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
41+
# collection label 'namespace.name'. The value is a version range
42+
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
43+
# range specifiers can be set and are separated by ','
44+
dependencies: {}
45+
46+
# The URL of the originating SCM repository
47+
repository: http://example.com/repository
48+
49+
# The URL to any online docs
50+
documentation: http://docs.example.com
51+
52+
# The URL to the homepage of the collection/project
53+
homepage: http://example.com
54+
55+
# The URL to the collection issue tracker
56+
issues: http://example.com/issue/tracker
57+
58+
# A list of file glob-like patterns used to filter any files or directories that should not be included in the build
59+
# artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This
60+
# uses 'fnmatch' to match the files or directories. Some directories and files like 'galaxy.yml', '*.pyc', '*.retry',
61+
# and '.git' are always filtered. Mutually exclusive with 'manifest'
62+
build_ignore: []
63+
64+
# A dict controlling use of manifest directives used in building the collection artifact. The key 'directives' is a
65+
# list of MANIFEST.in style
66+
# L(directives,https://packaging.python.org/en/latest/guides/using-manifest-in/#manifest-in-commands). The key
67+
# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive
68+
# with 'build_ignore'
69+
# manifest: null
70+

meta/runtime.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#SPDX-License-Identifier: MIT-0
2+
---
3+
# Collections must specify a minimum required ansible version to upload
4+
# to galaxy
5+
# requires_ansible: '>=2.9.10'
6+
7+
# Content that Ansible needs to load from another location or that has
8+
# been deprecated/removed
9+
# plugin_routing:
10+
# action:
11+
# redirected_plugin_name:
12+
# redirect: ns.col.new_location
13+
# deprecated_plugin_name:
14+
# deprecation:
15+
# removal_version: "4.0.0"
16+
# warning_text: |
17+
# See the porting guide on how to update your playbook to
18+
# use ns.col.another_plugin instead.
19+
# removed_plugin_name:
20+
# tombstone:
21+
# removal_version: "2.0.0"
22+
# warning_text: |
23+
# See the porting guide on how to update your playbook to
24+
# use ns.col.another_plugin instead.
25+
# become:
26+
# cache:
27+
# callback:
28+
# cliconf:
29+
# connection:
30+
# doc_fragments:
31+
# filter:
32+
# httpapi:
33+
# inventory:
34+
# lookup:
35+
# module_utils:
36+
# modules:
37+
# netconf:
38+
# shell:
39+
# strategy:
40+
# terminal:
41+
# test:
42+
# vars:
43+
44+
# Python import statements that Ansible needs to load from another location
45+
# import_redirection:
46+
# ansible_collections.ns.col.plugins.module_utils.old_location:
47+
# redirect: ansible_collections.ns.col.plugins.module_utils.new_location
48+
49+
# Groups of actions/modules that take a common set of options
50+
# action_groups:
51+
# group_name:
52+
# - module1
53+
# - module2

plugins/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Collections Plugins Directory
2+
3+
This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that
4+
is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that
5+
would contain module utils and modules respectively.
6+
7+
Here is an example directory of the majority of plugins currently supported by Ansible:
8+
9+
```
10+
└── plugins
11+
├── action
12+
├── become
13+
├── cache
14+
├── callback
15+
├── cliconf
16+
├── connection
17+
├── filter
18+
├── httpapi
19+
├── inventory
20+
├── lookup
21+
├── module_utils
22+
├── modules
23+
├── netconf
24+
├── shell
25+
├── strategy
26+
├── terminal
27+
├── test
28+
└── vars
29+
```
30+
31+
A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible-core/2.18/plugins/plugins.html).
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
become_override: false
3+
ocp_username: opentlc-mgr
4+
silent: false
5+
6+
# Helm Chart to deploy
7+
ocp4_workload_mta8_repo: https://github.com/redhat-gpte-devopsautomation/agnosticd_workload_helm_charts.git
8+
# Tag to deploy
9+
ocp4_workload_mta8_repo_tag: main
10+
ocp4_workload_mta8_repo_path: mta8
11+
12+
# Deploy the operator into each user's namespace
13+
ocp4_workload_mta8_deploy_operator: true
14+
# Tackle subscription channel to use
15+
ocp4_workload_mta8_channel: stable-v8.0
16+
ocp4_workload_mta8_starting_csv: ""
17+
18+
# How many users to set up
19+
ocp4_workload_mta8_num_users: 1
20+
21+
# Namespace base
22+
# If num_users == 1 then this will be the name of the namespace
23+
# If num_users > 1 the user base and user number will be appended to this base
24+
ocp4_workload_mta8_namespace_base: mta
25+
# UserID for Single User Setup
26+
ocp4_workload_mta8_user: admin
27+
# Base for multi user setup
28+
ocp4_workload_mta8_user_base: user
29+
30+
# Role to grant users for the tackle namespace
31+
ocp4_workload_mta8_role: admin
32+
33+
# Seed Tackle with information
34+
# When seeding is enabled authentication must be turned off
35+
# (until this is fixed in the operator)
36+
ocp4_workload_mta8_seed: false
37+
38+
# Image for the job to seed tackle. The image must have the data to be seeded inside
39+
# See https://github.com/redhat-gpte-devopsautomation/tackle2-setup-container.git
40+
# Tag should match version of operator channel subscription
41+
# "stable-v2.0" -> "1.0" (legacy tag name)
42+
# "stable-v2.1" -> "v2.1.1" (new matching tag names)
43+
ocp4_workload_mta8_seed_image: quay.io/gpte-devops-automation/tackle2-setup
44+
ocp4_workload_mta8_seed_tag: "release-0.4-mta7"
45+
ocp4_workload_mta8_seed_pull_policy: IfNotPresent
46+
47+
# These are hardcoded and can't be changed at the moment, first login requires changing
48+
# Disable authentication by setting ocp4_workload_mta8_feature_auth_required: false
49+
# ocp4_workload_mta8_user: admin
50+
# ocp4_workload_mta8_password: password
51+
52+
# --------------------------------
53+
# Tackle V2 specific settings
54+
# --------------------------------
55+
ocp4_workload_mta8_feature_auth_required: false
56+
ocp4_workload_mta8_maven_data_volume_size: 10Gi
57+
ocp4_workload_mta8_hub_bucket_volume_size: 10Gi
58+
ocp4_workload_mta8_hub_database_volume_size: 5Gi
59+
ocp4_workload_mta8_keycloak_database_data_volume_size: 1Gi
60+
ocp4_workload_mta8_pathfinder_database_data_volume_size: 1Gi
61+
ocp4_workload_mta8_tackle_setup_user: ""
62+
ocp4_workload_mta8_tackle_setup_password: ""
63+
ocp4_workload_mta8_rwx_supported: false
64+
65+
# --------------------------------
66+
# Use a Catalog Snapshot
67+
# --------------------------------
68+
ocp4_workload_mta8_catalogsource_setup: false
69+
ocp4_workload_mta8_catalogsource_name: redhat-operators-snapshot-mta7
70+
ocp4_workload_mta8_catalogsource_image: quay.io/gpte-devops-automation/olm_snapshot_redhat_catalog
71+
ocp4_workload_mta8_catalogsource_image_tag: v4.15_2024_03_11
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
galaxy_info:
3+
role_name: ocp4_workload_mta8
4+
author:
5+
- Wolfgang Kulhanek <wkulhane@redhat.com>
6+
description: |
7+
Deploys (and configures) the Migration Toolkit for Applications Operator on a OCP4 cluster
8+
platforms: []
9+
license: GNU General Public License v3.0
10+
galaxy_tags:
11+
- ocp4
12+
- openshift
13+
- mta
14+
- tackle
15+
dependencies: []
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
= ocp4_workload_mta8 - Deploy Migration Toolkit for Applications 8 to an OpenShift Cluster
2+
3+
== Role overview
4+
5+
* This role installs MTA 8 into an OpenShift Cluster.
6+
7+
== The defaults variable file
8+
9+
* This file ./defaults/main.yml contains all the variables you need to define to control the deployment of your workload.

0 commit comments

Comments
 (0)