p3: use bonus scripts
This commit is contained in:
parent
28cafc02b2
commit
dbc06f4023
@ -1 +0,0 @@
|
||||
kubectl port-forward svc/argocd-server -n argocd 8080:443 &
|
@ -1,4 +0,0 @@
|
||||
kubectl port-forward svc/argocd-server -n argocd 8080:443 &
|
||||
ARGOCD_PWD=$(argocd admin initial-password -n argocd | head -n1)
|
||||
argocd login localhost:8080 --username=admin --password=$ARGOCD_PWD
|
||||
argocd account update-password --current-password $ARGOCD_PWD --new-password="root1234"
|
@ -1,49 +0,0 @@
|
||||
# !/bin/sh
|
||||
|
||||
# install docker
|
||||
apt-get update
|
||||
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list
|
||||
apt-get update
|
||||
apt-get install ca-certificates curl -y
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||
chmod a+r /etc/apt/keyrings/docker.asc
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update
|
||||
apt-get install docker-ce docker-ce-cli containerd.io -y
|
||||
systemctl enable docker
|
||||
|
||||
# install k3d
|
||||
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
|
||||
|
||||
# install kubectl
|
||||
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
||||
chmod +x ./kubectl
|
||||
mv ./kubectl /usr/local/bin/kubectl
|
||||
|
||||
#install ArgoCD
|
||||
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
|
||||
install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
|
||||
rm argocd-linux-amd64
|
||||
|
||||
k3d cluster create part3 --agents 1
|
||||
|
||||
|
||||
# Install ARGOCD on k3d
|
||||
kubectl create namespace argocd
|
||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||
|
||||
# Install playground
|
||||
kubectl create namespace dev
|
||||
kubectl apply -n argocd -f ./confs/argocd.yaml
|
||||
|
||||
# Change argo password
|
||||
kubectl port-forward svc/argocd-server -n argocd 8080:443 &
|
||||
ARGOCD_PWD=$(argocd admin initial-password -n argocd | head -n1)
|
||||
argocd login localhost:8080 --username=admin --password=$ARGOCD_PWD
|
||||
argocd account update-password --current-password $ARGOCD_PWD --new-password="root1234"
|
1
p3/scripts/get_argocd_passwd.sh
Executable file
1
p3/scripts/get_argocd_passwd.sh
Executable file
@ -0,0 +1 @@
|
||||
kubectl -n argocd get secrets argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d
|
14
p3/scripts/install.sh
Normal file
14
p3/scripts/install.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/env bash
|
||||
|
||||
# Install dependancies
|
||||
command -v docker >/dev/null || sudo pacman -S docker
|
||||
command -v kubectl >/dev/null || sudo pacman -S kubectl
|
||||
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
|
||||
|
||||
k3d cluster create
|
||||
|
||||
# Install ArgoCD
|
||||
kubectl create namespace argocd
|
||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||
|
||||
kubectl apply -n argocd -f ./confs/argocd.yaml
|
1
p3/scripts/port-forward-argocd.sh
Executable file
1
p3/scripts/port-forward-argocd.sh
Executable file
@ -0,0 +1 @@
|
||||
kubectl port-forward svc/argocd-server -n argocd 8080:443
|
Loading…
Reference in New Issue
Block a user