add .env for argocd admin password, update install command to set bcrypt hash
This commit is contained in:
1
.env.example
Normal file
1
.env.example
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ARGOCD_ADMIN_PASSWORD=
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.env
|
||||||
46
README.md
46
README.md
@@ -45,40 +45,24 @@ helm version
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Phase 2 — Fill in NFS details
|
## Phase 2 — Set credentials
|
||||||
|
|
||||||
Edit `manifests/nfs-provisioner/values.yaml` before pushing — replace the two placeholders:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://gitea.fireflylab.cc/duynguyen/cluster-bootstrap.git
|
cp .env.example .env
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
Edit `.env` and set `ARGOCD_ADMIN_PASSWORD` to your desired password. This file is gitignored — never commit it.
|
||||||
cd cluster-bootstrap
|
|
||||||
```
|
|
||||||
|
|
||||||
Open `manifests/nfs-provisioner/values.yaml` and set:
|
|
||||||
- `nfs.server` — xpen NAS IP address
|
|
||||||
- `nfs.path` — NFS export path (e.g. `/volume1/k8s`)
|
|
||||||
|
|
||||||
Then commit and push:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git add manifests/nfs-provisioner/values.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git commit -m "set nfs server and path"
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git push origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Phase 3 — Install ArgoCD
|
## Phase 3 — Install ArgoCD
|
||||||
|
|
||||||
|
Install `httpd-tools` for bcrypt hash generation (one-time):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo dnf install -y httpd-tools
|
||||||
|
```
|
||||||
|
|
||||||
Add Helm repo:
|
Add Helm repo:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -89,10 +73,10 @@ helm repo add argo https://argoproj.github.io/argo-helm
|
|||||||
helm repo update
|
helm repo update
|
||||||
```
|
```
|
||||||
|
|
||||||
Install ArgoCD:
|
Install ArgoCD with your password from `.env`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm install argocd argo/argo-cd -n argocd --create-namespace -f manifests/argocd/values.yaml
|
source .env && BCRYPT=$(htpasswd -nbBC 10 "" "$ARGOCD_ADMIN_PASSWORD" | tr -d ':\n' | sed 's/$2y/$2a/') && helm install argocd argo/argo-cd -n argocd --create-namespace -f manifests/argocd/values.yaml --set configs.secret.argocdServerAdminPassword="$BCRYPT" --set configs.secret.argocdServerAdminPasswordMtime="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||||
```
|
```
|
||||||
|
|
||||||
Wait for ArgoCD to be ready:
|
Wait for ArgoCD to be ready:
|
||||||
@@ -101,19 +85,13 @@ Wait for ArgoCD to be ready:
|
|||||||
kubectl wait --for=condition=available deployment/argocd-server -n argocd --timeout=120s
|
kubectl wait --for=condition=available deployment/argocd-server -n argocd --timeout=120s
|
||||||
```
|
```
|
||||||
|
|
||||||
Get initial admin password:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath='{.data.password}' | base64 -d
|
|
||||||
```
|
|
||||||
|
|
||||||
Port-forward to access UI (MetalLB + Envoy not running yet):
|
Port-forward to access UI (MetalLB + Envoy not running yet):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl port-forward svc/argocd-server -n argocd 8080:443
|
kubectl port-forward svc/argocd-server -n argocd 8080:443
|
||||||
```
|
```
|
||||||
|
|
||||||
Open `https://localhost:8080` — login with `admin` and the password above.
|
Open `https://localhost:8080` — login with `admin` and the password from your `.env`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user