تخطي إلى المحتوى الرئيسي

GitOps Deployment of Ilum with Argo CD

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. By combining Ilum with Argo CD, you can manage your entire Ilum deployment — including enabling or disabling modules — through Git commits, with Argo CD automatically syncing changes to your cluster.

Quick Summary
  • Install Argo CD: Deploy Argo CD to your Kubernetes cluster.
  • Create a Git Repository: Store your Argo CD تطبيق manifest and Helm values files.
  • Deploy Ilum: Apply the تطبيق manifest to let Argo CD install Ilum from the Helm chart.
  • Manage via Git: Enable/disable Ilum modules (Jupyter, Gitea, PostgreSQL) by editing values files in Git — Argo CD syncs changes automatically.

المتطلبات المسبقه

  • A running Kubernetes cluster (e.g., Minikube, EKS, GKE, AKS)
  • كوبيكتل configured to access your cluster
  • A GitHub (or other Git provider) account

Step 1: Start a Kubernetes Cluster

If you are using Minikube for local development, start a cluster with sufficient resources:

Start Minikube
بداية minikube --cpus 6 --memory 10192 --addons metrics-server
Resource Recommendations

Ilum with all modules enabled requires significant resources. Allocate at least 6 CPUs و 10 GB of memory for a smooth experience.


Step 2: Install Argo CD

Create a dedicated namespace for Argo CD and install it using the official manifests:

Install Argo CD
# Create the argocd namespace
kubectl create namespace argocd

# Install Argo CD
kubectl apply argocd --server-side=صحيح \
https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Verify that all Argo CD pods are running:

Verify Argo CD Pods
كوبيكتل  argocd get po

You should see pods like argocd-server, argocd-application-controller, argocd-repo-server, argocd-redisو argocd-dex-server, all in a Running حالة.

Access the Argo CD UI

Port-forward the Argo CD server to access the web UI:

Port Forward Argo CD
kubectl port-forward svc/argocd-server  argocd 8080:443

Open your browser and navigate to https://localhost:8080.

Retrieve the Admin Password

The default username is المشرف. Retrieve the initial password with:

Get Argo CD Admin Password
كوبيكتل  argocd get secret argocd-initial-admin-secret \
jsonpath="{.data.password}" | base64 --decode; echo

Log in to the Argo CD UI with these credentials.


Step 3: Prepare the Git Repository

Create a new Git repository (e.g., IlumArgoDeployment) to store your deployment configuration. This repository will contain two files:

3.1 Application Manifest (app-prod.yaml)

This is the Argo CD تطبيق resource that tells Argo CD how to deploy Ilum:

app-prod.yaml
apiVersion: argoproj.io/v1alpha1
نوع: تطبيق
البيانات الوصفية:
اسم: إيلوم-همز
Namespace: argocd
المواصفات:
مشروع: افتراضي
destination:
ملقم: https://kubernetes.default.svc
Namespace: إيلوم-همز
sources:
# Chart from repo
- chart: إيلوم
repoURL: https://charts.ilum.cloud
targetRevision: 6.6.1
helm:
valueFiles:
- $values/values-prod.yaml
# Values from Git
- repoURL: https://github.com/<your-org>/IlumArgoDeployment
targetRevision: رأس
الرقم المرجعي: القيم
syncPolicy:
automated:
prune: صحيح
selfHeal: صحيح
syncOptions:
- CreateNamespace=true

Key fields:

Fieldوصف
spec.destination.namespaceThe Kubernetes namespace where Ilum will be deployed (e.g., ilum-prod).
sources[0].chartThe Ilum Helm chart name.
sources[0].repoURLThe Ilum Helm chart repository (https://charts.ilum.cloud).
sources[0].targetRevisionThe Ilum version to deploy (e.g., 6.6.1).
sources[1].repoURLYour Git repository containing the values file.
syncPolicy.automatedEnables automatic sync — Argo CD will detect Git changes and apply them.
syncPolicy.syncOptionsCreateNamespace=true lets Argo CD create the target namespace if it doesn't exist.

3.2 Values File (values-prod.yaml)

This file contains Helm value overrides for your Ilum deployment. Start with modules disabled and enable them as needed:

values-prod.yaml
ilum-jupyter:
تمكين: خطأ

جيتا:
تمكين: خطأ

postgresql:
تمكين: خطأ

postgresExtensions:
تمكين: خطأ

Commit both files to your repository.


Step 4: Deploy the Application

Apply the Argo CD Application manifest to your cluster:

Deploy Ilum via Argo CD
kubectl apply  https://raw.githubusercontent.com/<your-org>/IlumArgoDeployment/main/app-prod.yaml \
argocd

Alternatively, if you have the file locally:

Deploy from local file
kubectl apply  app-prod.yaml  argocd

Verify Deployment

Check that the namespace was created and pods are starting:

Verify Deployment
# Check namespaces
kubectl get ns

# Watch pods in the ilum-prod namespace
كوبيكتل ilum-prod get po

You should see the ilum-prod namespace appear and core Ilum pods (like إيلوم كور, ILUM-UI, ilum-minio, ilum-mongodb, ilum-openldap) initializing.


Step 5: Monitor in Argo CD UI

In the Argo CD web interface, you will see the ilum-prod application. The UI provides:

  • Sync Status: Shows whether the deployed state matches the desired state in Git (Synced أو OutOfSync).
  • Health Status: Shows the overall health of the application (Healthy, Progressingأو Degraded).
  • Tree View: A visual representation of all Kubernetes resources managed by the application (Deployments, ReplicaSets, Pods, ConfigMaps, Services, etc.).
  • Resource Details: Click on any resource to see its summary, events, logs, and live manifest.
Filtering Resources

Use the left sidebar filters in Argo CD to filter resources by Kind (e.g., Pod), Sync Statusأو Health Status. This helps quickly identify resources that need attention.


Step 6: Access the Ilum UI

Once all pods are in a Running state, port-forward the Ilum UI service:

Port Forward Ilum UI
kubectl port-forward svc/ilum-ui  ilum-prod 9777:9777

Open http://localhost:9777 in your browser to access the Ilum login page.


Step 7: Manage Ilum Modules via Git

The real power of GitOps is managing your deployment through Git commits. To enable or disable Ilum modules, simply edit the values-prod.yaml file in your repository.

Example: Enable Jupyter

حرر values-prod.yaml and change ilum-jupyter.enabled ل صحيح:

values-prod.yaml (enable Jupyter)
ilum-jupyter:
تمكين: صحيح

جيتا:
تمكين: خطأ

postgresql:
تمكين: خطأ

postgresExtensions:
تمكين: خطأ

Commit the change with a descriptive message (e.g., "Enable jupyter in ilum production") and push to the main branch.

Argo CD will automatically detect the change, mark the application as OutOfSync, and trigger a sync operation. You can watch the new ilum-jupyter pod being created in both the Argo CD UI and via كوبيكتل.

Example: Enable All Modules

To enable Gitea (built-in Git server), PostgreSQL, and PostgreSQL Extensions alongside Jupyter:

values-prod.yaml (all modules enabled)
ilum-jupyter:
تمكين: صحيح

جيتا:
تمكين: صحيح

postgresql:
تمكين: صحيح

postgresExtensions:
تمكين: صحيح

Commit and push. Argo CD will sync and deploy all the additional pods (PostgreSQL, Gitea, Jupyter, etc.). You can monitor the progress in the Argo CD UI — the Events tab shows a detailed log of all sync operations.

Once healthy, the Ilum UI sidebar will show all enabled modules: مينيو, جوبيتر, جيتيا, and more.


استكشاف الاخطاء

Application stuck in "Progressing" state

This is normal during initial deployment. Ilum has several components that need to initialize in sequence (MongoDB, OpenLDAP, MinIO, etc.). Allow a few minutes for all pods to become ready. Check pod status with:

كوبيكتل  ilum-prod get po -w
Application shows "Degraded" health

This can happen temporarily when new modules are being deployed or if a pod fails to start. Check the Events tab in the Argo CD UI for details, or inspect pod logs:

كوبيكتل  ilum-prod logs <pod-name>
Sync fails with "namespace not found"

تأكد من أن syncOptions includes CreateNamespace=true in the Application manifest. This allows Argo CD to create the target namespace automatically.

Values file changes not detected

Verify that:

  • ال repoURL in your second source matches your actual repository URL.
  • ال ref: values field is correctly set.
  • ال targetRevision تم ضبطه على رأس (or the correct branch).
  • The repository is accessible from the cluster (check Argo CD Settings → Repositories).

Frequently Asked Questions (FAQ)

Can I use a private Git repository?

Yes. In the Argo CD UI, go to Settings → Repositories and add your private repository with appropriate credentials (HTTPS token or SSH key). Argo CD will then be able to pull your values files from the private repo.

Can I manage multiple environments (dev, staging, prod)?

Yes. Create separate Application manifests (e.g., app-dev.yaml, app-staging.yaml) pointing to different values files and target namespaces. You can use different branches or directories in your Git repository for environment-specific configurations.