Deploy openshift gitops
This commit is contained in:
@@ -94,6 +94,7 @@ This makes it to where you just need 3 bare metal nodes. You could run one HCP B
|
|||||||
You'll also either need you just need at least 2 bare metal nodes.
|
You'll also either need you just need at least 2 bare metal nodes.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
- Ken Moini - As I used his [repo](https://github.com/kenmoini/ztp-for-you-and-me) as the baseline for this project.
|
- Ken Moini - As I used his [repo](https://github.com/kenmoini/ztp-for-you-and-me) as the baseline for this project.
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ clusterGroup:
|
|||||||
acm:
|
acm:
|
||||||
name: advanced-cluster-management
|
name: advanced-cluster-management
|
||||||
namespace: open-cluster-management
|
namespace: open-cluster-management
|
||||||
channel: release-2.12
|
channel: release-2.13
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ clusterGroup:
|
|||||||
acm:
|
acm:
|
||||||
name: advanced-cluster-management
|
name: advanced-cluster-management
|
||||||
namespace: open-cluster-management
|
namespace: open-cluster-management
|
||||||
channel: release-2.11
|
channel: release-2.13
|
||||||
#csv: advanced-cluster-management.v2.6.1
|
#csv: advanced-cluster-management.v2.6.1
|
||||||
projects:
|
projects:
|
||||||
- hub
|
- hub
|
||||||
|
|||||||
26
hub-cluster-bootstrap/app-of-apps.yaml
Normal file
26
hub-cluster-bootstrap/app-of-apps.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: cluster-applications
|
||||||
|
namespace: openshift-gitops
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: openshift-gitops
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
path: cluster
|
||||||
|
repoURL: git@github.com:rblundon/homelab.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- RespectIgnoreDifferences=true
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: argoproj.io
|
||||||
|
kind: Application
|
||||||
|
jsonPointers:
|
||||||
|
- /spec/syncPolicy/automated
|
||||||
15
hub-cluster-bootstrap/enable-iscsi.yaml
Normal file
15
hub-cluster-bootstrap/enable-iscsi.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: machineconfiguration.openshift.io/v1
|
||||||
|
kind: MachineConfig
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
machineconfiguration.openshift.io/role: master
|
||||||
|
name: 99-master-custom-enable-iscsid
|
||||||
|
spec:
|
||||||
|
config:
|
||||||
|
ignition:
|
||||||
|
version: 3.1.0
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
- enabled: true
|
||||||
|
name: iscsid.service
|
||||||
15
hub-cluster-bootstrap/kustomization.yaml
Normal file
15
hub-cluster-bootstrap/kustomization.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
cluster: hub.int.mk-labs.cloud
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- operatorgroup.yaml
|
||||||
|
- subscription.yaml
|
||||||
|
- rbac.yaml
|
||||||
|
# - argocd.yaml
|
||||||
|
- app-of-apps.yaml
|
||||||
|
- enable-iscsi.yaml
|
||||||
7
hub-cluster-bootstrap/namespace.yaml
Normal file
7
hub-cluster-bootstrap/namespace.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
argocd.argoproj.io/managed-by: openshift-gitops-operator
|
||||||
|
name: openshift-gitops-operator
|
||||||
8
hub-cluster-bootstrap/operatorgroup.yaml
Normal file
8
hub-cluster-bootstrap/operatorgroup.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
apiVersion: operators.coreos.com/v1
|
||||||
|
kind: OperatorGroup
|
||||||
|
metadata:
|
||||||
|
name: openshift-gitops-operator
|
||||||
|
namespace: openshift-gitops-operator
|
||||||
|
spec:
|
||||||
|
upgradeStrategy: Default
|
||||||
37
hub-cluster-bootstrap/rbac.yaml
Normal file
37
hub-cluster-bootstrap/rbac.yaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: openshift-gitops-admin
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: gitops-service-cluster
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-applicationset-controller
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-argocd-application-controller
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-argocd-dex-server
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-argocd-grafana
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-argocd-redis
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-argocd-redis-ha
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-argocd-server
|
||||||
|
namespace: openshift-gitops
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: openshift-gitops-operator-controller-manager
|
||||||
|
namespace: openshift-operators
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
16
hub-cluster-bootstrap/subscription.yaml
Normal file
16
hub-cluster-bootstrap/subscription.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: operators.coreos.com/v1alpha1
|
||||||
|
kind: Subscription
|
||||||
|
metadata:
|
||||||
|
name: openshift-gitops-operator
|
||||||
|
namespace: openshift-gitops-operator
|
||||||
|
spec:
|
||||||
|
channel: gitops-1.16
|
||||||
|
config:
|
||||||
|
env:
|
||||||
|
- name: ARGOCD_CLUSTER_CONFIG_NAMESPACES
|
||||||
|
value: openshift-gitops
|
||||||
|
installPlanApproval: Automatic
|
||||||
|
name: openshift-gitops-operator
|
||||||
|
source: redhat-operators
|
||||||
|
sourceNamespace: openshift-marketplace
|
||||||
@@ -69,6 +69,7 @@ This repo is a mono-repo that is broken up into three sections:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Other needed software:
|
Other needed software:
|
||||||
|
|
||||||
- ~~kustomize~~
|
- ~~kustomize~~
|
||||||
- git
|
- git
|
||||||
- oc
|
- oc
|
||||||
@@ -111,6 +112,14 @@ Other needed software:
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Admin password and kubeconfig are in the homelab/10-sno-hub-cluster/03-openshift-image/auth directory
|
- Admin password and kubeconfig are in the homelab/10-sno-hub-cluster/03-openshift-image/auth directory
|
||||||
|
|
||||||
|
From laptop/infra server:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd homelab
|
||||||
|
oc apply -k hub-cluster-bootstrap
|
||||||
|
```
|
||||||
|
|
||||||
- Bootstrap ACM
|
- Bootstrap ACM
|
||||||
|
|
||||||
Running this playbook will configure Matchbox to wait for the sno-cluster to boot via iPXE and will install Single Node OpenShift. All configuration files are built from templates driven from Ansible variables.
|
Running this playbook will configure Matchbox to wait for the sno-cluster to boot via iPXE and will install Single Node OpenShift. All configuration files are built from templates driven from Ansible variables.
|
||||||
@@ -119,8 +128,6 @@ Other needed software:
|
|||||||
ansible-playbook -i inventory.yml 10-sno-hub-cluster/install2.yml
|
ansible-playbook -i inventory.yml 10-sno-hub-cluster/install2.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
10-sno-hub-cluster/05-bootstrap-acm/bootstrap.sh
|
|
||||||
|
|
||||||
## Internal Cluster *TBD*
|
## Internal Cluster *TBD*
|
||||||
|
|
||||||
(Deployed in conjunction with ACM)
|
(Deployed in conjunction with ACM)
|
||||||
|
|||||||
Reference in New Issue
Block a user