Skip to content

Commit

Permalink
Add deployment instructions and supporting manifest files
Browse files Browse the repository at this point in the history
Deployment instructions and supporting manifest files to configure:
  - managed-services
  - monitoring-stack
  - ceph-rook
  - openstack-helm
  • Loading branch information
pratik705 committed Jan 4, 2024
1 parent 6d7cb50 commit b5b5570
Show file tree
Hide file tree
Showing 415 changed files with 70,685 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
charts
sealed-secret-tls.*
!*encrypted*
!values.yaml
!sealed-secret-tls.crt
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "rke2/kube-ovn"]
path = rke2/kube-ovn
url = https://github.com/kubeovn/kube-ovn.git
[submodule "osh/openstack-helm"]
path = osh/openstack-helm
url = https://github.com/openstack/openstack-helm.git
[submodule "osh/openstack-helm-infra"]
path = osh/openstack-helm-infra
url = https://github.com/openstack/openstack-helm-infra.git
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# trinity
# trinity

The goal of this repository is to simplify the deployment of OpenStack-Helm with ArgoCD, adopting a GitOps approach. The repository offers detailed instructions to deploy following projects:
- RKE2 Kubernetes Cluster
- Managed services:
- Cert-manager
- Sealed-secrets
- Ingress-controller
- Metallb
- ArgoCD
- Ceph Rook
- OpenStack Helm

The manifests for Ceph-Rook and OpenStack-Helm are sourced from the [Genstack Project](https://github.com/cloudnull/genestack.git), serving as a reference for your deployments.

**Note:** You can use the processes and manifest files from this repository as a reference. Please update the details according to your requirements.

---
## Prerequsites:
Before getting started, make sure you have the following tools installed:
- [kustomize CLI](https://kubectl.docs.kubernetes.io/installation/kustomize/)
- [kubeseal CLI](https://github.com/bitnami-labs/sealed-secrets?tab=readme-ov-file#kubeseal)
- Additionally, ensure that your hardware setup is sufficient to deploy OpenStack and Ceph. In our example, we utilized a total of 8 nodes, each serving a specific role:
- 3 nodes as OpenStack Controllers
- 2 nodes as OpenStack Computes
- 3 nodes for Ceph (ceph-mon, ceph-osd, ceph-mds, ceph-rgw)
---

## Getting started
```bash
git clone --recurse-submodules https://github.com/pratik705/trinity.git
```
The `--recurse-submodules` option is used to clone the repository along with its submodules.

---

## Installation
To start fresh, please proceed in the following order. If you already have an existing Kubernetes cluster and only want to install specific services, you can jump to the respective section.

### RKE2
Follow the detailed installation instructions [here](https://github.com/pratik705/trinity/blob/main/rke2/README.md).

---

### managed-services
Follow the detailed installation instructions [here](https://github.com/pratik705/trinity/blob/main/managed-services/README.md).

---

### ceph-rook
Follow the detailed installation instructions [here](https://github.com/pratik705/trinity/blob/main/ceph-rook/README.md).

---

### kube-prometheus-stack
Follow the detailed installation instructions [here](https://github.com/pratik705/trinity/blob/main/monitoring/kube-prometheus-stack/README.md).

---

### openstack-helm
Follow the detailed installation instructions [here](https://github.com/pratik705/trinity/blob/main/osh/README.md).

---

These steps will guide you through setting up a Kubernetes environment and deploying ceph-rook, OpenStack-Helm with the necessary supporting services. You can refer the [Genstack Project](https://github.com/cloudnull/genestack.git) for additional insights and resources.

83 changes: 83 additions & 0 deletions ceph-rook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# CEPH-ROOK: Ceph Integration for Kubernetes
Make Ceph storage work seamlessly with your Kubernetes setup using CEPH-ROOK. It lets Kubernetes nodes use Ceph effortlessly, connecting with both ceph-csi and openstack-helm.

## Pre-installation Checks:
Before proceeding with the Ceph-ROOK installation, ensure the following prerequisites:

- Ensure that Kubernetes nodes are correctly labeled to designate their roles and Ceph components.
```
role: storage-node
ceph-rgw: enabled
ceph-mds: enabled
```
- OSD disks are formatted
- ArgoCD is up and running as expected.
- Git repository is connected to the ArgoCD. Refer to [\[1\]](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/)[\[2\]](https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_repo_add/)

## Installation:
To install CEPH according as per your requirement, navigate to the CEPH directory, make the necessary modifications to Kubernetes manifest/values.yaml, and deploy it using ArgoCD. You can kickstart your setup by copying the provided examples from this repository.

**Note:** You can use the manifests from this repository as an example and update the details according to your requirements.

- Clone this repository and navigate to the ceph-rook directory:
```bash
git clone --recurse-submodules https://github.com/pratik705/trinity.git
cd trinity/ceph-rook/
```
Note: The `--recurse-submodules` option is used to clone the repository along with its submodules.
- Once you have made your changes, commit and push them to your Git repository.
```bash
git add .
git commit -m "Describe your changes"
git push origin main
```
- Proceed with applying ArgoCD manifests:
### Deploy namespace for CEPH installation:
```bash
kubectl apply -f ceph-rook/argoCD/00-ceph-namespace-argo.yaml
```
---

### Deploy ceph-operator:
```bash
kubectl apply -f ceph-rook/argoCD/01-ceph-operator-argo.yaml
```
---

### Deploy CEPH:
```bash
kubectl apply -f ceph-rook/argoCD/02-ceph-argo.yaml
```
- Sets up a storage class(`general`) for creating rbd volumes.
- Creates an rbd client and pool for openstack-helm.
---

### Deploy ceph-rgw:
```bash
kubectl apply -f ceph-rook/argoCD/03-ceph-rgw-argo.yaml
```
---

### Deploy ceph-mds:
```bash
kubectl apply -f ceph-rook/argoCD/04-ceph-mds-argo.yaml
```
- Adds a storage class(`rook-cephfs`) for creating `rwx` volumes.
---

### Deploy toolbox to interact with CEPH:
```bash
kubectl apply -f ceph-rook/argoCD/05-toolbox-argo.yaml
```
---

## Validation:
```bash
kubectl get pods -n rook-ceph
kubectl exec -it rook-ceph-tools-xxxxx -n rook-ceph -- ceph -s
kubectl exec -it rook-ceph-tools-xxxxx -n rook-ceph -- ceph osd tree
```

ArgoCD continuously monitors the configured Git repository for changes and automatically applies them to the Kubernetes cluster. Once the changes are pushed to the repository, ArgoCD will detect the update and synchronize with the latest version.

Check the ArgoCD UI to track the synchronization progress and ensure that the modifications are successfully applied to the cluster.
22 changes: 22 additions & 0 deletions ceph-rook/argoCD/00-ceph-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ceph-namespace
namespace: rackspace-system
spec:
destination:
name: ''
namespace: ''
server: 'https://kubernetes.default.svc'
source:
path: ceph-rook/namespace
repoURL: 'https://github.com/pratik705/trinity.git'
targetRevision: HEAD
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
selfHeal: true
prune: false
sources: []
project: default
22 changes: 22 additions & 0 deletions ceph-rook/argoCD/01-ceph-operator-argo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ceph-operator
namespace: rackspace-system
spec:
destination:
name: ''
namespace: ''
server: 'https://kubernetes.default.svc'
source:
path: ceph-rook/ceph-operator
repoURL: 'https://github.com/pratik705/trinity.git'
targetRevision: HEAD
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
selfHeal: true
prune: false
sources: []
project: default
22 changes: 22 additions & 0 deletions ceph-rook/argoCD/02-ceph-argo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ceph
namespace: rackspace-system
spec:
destination:
name: ''
namespace: ''
server: 'https://kubernetes.default.svc'
source:
path: ceph-rook/ceph
repoURL: 'https://github.com/pratik705/trinity.git'
targetRevision: HEAD
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
selfHeal: true
prune: false
sources: []
project: default
22 changes: 22 additions & 0 deletions ceph-rook/argoCD/03-ceph-rgw-argo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ceph-rgw
namespace: rackspace-system
spec:
destination:
name: ''
namespace: ''
server: 'https://kubernetes.default.svc'
source:
path: ceph-rook/ceph-rgw
repoURL: 'https://github.com/pratik705/trinity.git'
targetRevision: HEAD
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
selfHeal: true
prune: false
sources: []
project: default
22 changes: 22 additions & 0 deletions ceph-rook/argoCD/04-ceph-mds-argo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ceph-mds
namespace: rackspace-system
spec:
destination:
name: ''
namespace: ''
server: 'https://kubernetes.default.svc'
source:
path: ceph-rook/ceph-mds
repoURL: 'https://github.com/pratik705/trinity.git'
targetRevision: HEAD
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
selfHeal: true
prune: false
sources: []
project: default
22 changes: 22 additions & 0 deletions ceph-rook/argoCD/05-toolbox-argo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ceph-toolbox
namespace: rackspace-system
spec:
destination:
name: ''
namespace: ''
server: 'https://kubernetes.default.svc'
source:
path: ceph-rook/toolbox
repoURL: 'https://github.com/pratik705/trinity.git'
targetRevision: HEAD
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
selfHeal: true
prune: false
sources: []
project: default
Loading

0 comments on commit b5b5570

Please sign in to comment.