Skip to content

Commit

Permalink
Version 1 Release (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomklapiscak authored Jun 17, 2024
1 parent 24e1a8e commit ffd8798
Show file tree
Hide file tree
Showing 307 changed files with 18,734 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build Documentation
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install and Build
run: |
bash build/bin/build-docs.sh
- name: Deploy
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: site
53 changes: 53 additions & 0 deletions .github/workflows/update-internal-repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update Internal GHE Repo
on:
push:
branches:
- '**'
tags-ignore:
- '**'

env:
GITHUB_BRANCH: ${{ github.ref_name }}
REMOTE_REPO: automation-paas-cd-pipeline/mas-gitops

jobs:
update-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout local repo
uses: actions/checkout@v4
with:
path: source

- name: Checkout remote repo
id: checkout_remote
continue-on-error: true
uses: actions/checkout@v4
with:
github-server-url: https://github.ibm.com
repository: ${{ env.REMOTE_REPO }}
ref: ${{ env.GITHUB_BRANCH }}
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
path: target

- name: Copy over files
if: ${{ steps.checkout_remote.outcome == 'success' }}
run: $GITHUB_WORKSPACE/source/build/bin/copy-gitops.sh -s $GITHUB_WORKSPACE/source -t $GITHUB_WORKSPACE/target

- name: Commit changes to remote repo
if: ${{ steps.checkout_remote.outcome == 'success' }}
run: |
cd $GITHUB_WORKSPACE/target
git config user.name "GitHub Actions Bot"
git config user.email "<>"
echo "git: Adding all files in $$GITHUB_WORKSPACE/target directory"
export FILES_ADDED=$(git add -v . | wc -l | xargs)
echo "git: Added ${FILES_ADDED} files"
if [ "$FILES_ADDED" != "0" ]; then
echo "git: Committing files"
git commit -m "Synch commit between ibm-mas/gitops and $REMOTE_REPO"
fi
echo "Push changes to ${{ env.GITHUB_BRANCH }} branch of https://github.ibm.com/${{ env.REMOTE_REPO }}"
git push origin ${{ env.GITHUB_BRANCH }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root-applications/test/Chart.yaml
root-applications/test/README.md
root-applications/test/values.yaml
root-applications/test/templates/130-configs-app.yaml
__pycache__/main.cpython-39.pyc
site
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# gitops
A GitOps approach to managing Maximo Application Suite
Maximo Application Suite GitOps
===============================================================================

A GitOps approach to managing Maximo Application Suite.

Documentation
-------------------------------------------------------------------------------
[https://ibm-mas.github.io/gitops/](https://ibm-mas.github.io/gitops/)

[https://github.com/ibm-mas/gitops-demo/tree/002](https://github.com/ibm-mas/gitops-demo/tree/002)
6 changes: 6 additions & 0 deletions build/bin/build-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

python -m pip install -q mkdocs mkdocs-redirects
python -m pip install -q mkdocs mkdocs-macros-plugin
python -m pip install -q mkdocs mkdocs-drawio-file
mkdocs build --verbose --clean --strict
46 changes: 46 additions & 0 deletions build/bin/copy-gitops.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#/bin/bash

echo "build/bin/copy-gitops.sh -s <source ibm-mas/gitops directory> -t <target ibm-mas/gitops directory> "
echo ""
echo "Example usage: "
echo " build/bin/copy-gitops.sh -s /Users/whitfiea/Work/Git/ibm-mas/gitops -t /Users/whitfiea/Work/Git/ibm-mas/mas-gitops"
echo ""

# Process command line arguments
while [[ $# -gt 0 ]]
do
key="$1"
shift
case $key in
-s|--source)
SOURCE=$1
shift
;;

-t|--target)
TARGET=$1
shift
;;

*)
# unknown option
echo -e "\nUsage Error: Unsupported flag \"${key}\"\n\n"
exit 1
;;
esac
done

: ${SOURCE?"Need to set -s|--source argument for source directory"}
: ${TARGET?"Need to set -t|--target argument for target directory"}

echo "Deleting files in target"
rm -rvf ${TARGET}/instance-applications/*
rm -rvf ${TARGET}/cluster-applications/*
rm -rvf ${TARGET}/docs/*
rm -rvf ${TARGET}/root-applications/*
rm -v README.md
rm -v LICENSE

echo "Copying gitops"
cp -vr ${SOURCE}/* ${TARGET}

5 changes: 5 additions & 0 deletions cluster-applications/000-ibm-operator-catalog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: ibm-operator-catalog
description: IBM Maximo Operator Catalog
type: application
version: 1.0.0
3 changes: 3 additions & 0 deletions cluster-applications/000-ibm-operator-catalog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
IBM Maximo Operator Catalog
===============================================================================
Installs the `ibm-operator-catalog` `CatalogSource` into the `openshift-marketplace` namespace
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: default
namespace: openshift-marketplace
annotations:
argocd.argoproj.io/sync-wave: "000"
{{- if .Values.custom_labels }}
labels:
{{ .Values.custom_labels | toYaml | indent 4 }}
{{- end }}
imagePullSecrets:
- name: ibm-entitlement
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
kind: Secret
apiVersion: v1
metadata:
name: ibm-entitlement
namespace: openshift-marketplace
annotations:
argocd.argoproj.io/sync-wave: "000"
{{- if .Values.custom_labels }}
labels:
{{ .Values.custom_labels | toYaml | indent 4 }}
{{- end }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: >-
{{ .Values.ibm_entitlement_key }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: ibm-operator-catalog
namespace: openshift-marketplace
annotations:
argocd.argoproj.io/sync-wave: "001"
{{- if .Values.custom_labels }}
labels:
{{ .Values.custom_labels | toYaml | indent 4 }}
{{- end }}
spec:
displayName: IBM Maximo Operators ({{ .Values.mas_catalog_version }})
publisher: IBM
description: Online Catalog Source for IBM Maximo Application Suite
sourceType: grpc
image: "{{ .Values.mas_catalog_image }}:{{ .Values.mas_catalog_version }}"
secrets:
- ibm-entitlement
updateStrategy:
registryPoll:
interval: 45m
priority: 90
4 changes: 4 additions & 0 deletions cluster-applications/000-ibm-operator-catalog/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
mas_catalog_version: v8-230414-amd64
mas_catalog_image: icr.io/cpopen/ibm-maximo-operator-catalog
ibm_entitlement_key: ""
5 changes: 5 additions & 0 deletions cluster-applications/010-redhat-cert-manager/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: redhat-cert-manager
description: Redhat OpenShift cert-manager Operator
type: application
version: 1.0.0
3 changes: 3 additions & 0 deletions cluster-applications/010-redhat-cert-manager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Redhat OpenShift cert-manager Operator
===============================================================================
Installs Redhat OpenShift cert-manager Operator in cert-manager-operator namespace
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: cert-manager-operator
annotations:
argocd.argoproj.io/sync-wave: "010"
labels:
argocd.argoproj.io/managed-by: {{ .Values.argo_namespace }}
{{- if .Values.custom_labels }}
{{ .Values.custom_labels | toYaml | indent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
name: operatorgroup
namespace: cert-manager-operator
annotations:
argocd.argoproj.io/sync-wave: "011"
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
{{- if .Values.custom_labels }}
labels:
{{ .Values.custom_labels | toYaml | indent 4 }}
{{- end }}
spec:
targetNamespaces:
- cert-manager-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: openshift-cert-manager-operator
namespace: cert-manager-operator
labels:
operators.coreos.com/openshift-cert-manager-operator.cert-manager-operator: ''
{{- if .Values.custom_labels }}
{{ .Values.custom_labels | toYaml | indent 4 }}
{{- end }}
annotations:
argocd.argoproj.io/sync-wave: "012"
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
spec:
channel: {{ .Values.channel }}
installPlanApproval: Automatic
name: openshift-cert-manager-operator
source: redhat-operators
sourceNamespace: openshift-marketplace


Loading

0 comments on commit ffd8798

Please sign in to comment.