mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-05-23 16:36:00 +00:00
Refactor Docker and Kubernetes configurations to update Redis volume mapping and constraints for Docmost service
This commit is contained in:
@@ -15,6 +15,6 @@ rke2_version: "v1.28.11+rke2r1"
|
||||
rke2_install_dir: "/usr/local/bin"
|
||||
rke2_binary_url: "https://github.com/rancher/rke2/releases/download/{{ rke2_version }}"
|
||||
|
||||
ansible_user: furyhawk
|
||||
ansible_user: user
|
||||
ansible_become: true
|
||||
ansible_become_method: sudo
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
# Good idea to snapshot all machines and deploy uing cloud-init
|
||||
|
||||
[servers]
|
||||
server1 ansible_host=192.168.50.203
|
||||
server1 ansible_host=192.168.50.132
|
||||
|
||||
[agents]
|
||||
agent1 ansible_host=192.168.50.205
|
||||
agent2 ansible_host=192.168.50.209
|
||||
agent1 ansible_host=192.168.50.131
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
# RKE2 playbook
|
||||
|
||||
/etc/hosts
|
||||
```
|
||||
127.0.0.1 localhost
|
||||
127.0.1.1 c1.local c1
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 localhost ip6-localhost ip6-loopback
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
export LC_ALL=en_US.UTF-8
|
||||
ansible-playbook site.yaml -i inventory/hosts.ini --key-file ~/.ssh/id_rsa -K
|
||||
k get pods --all-namespaces
|
||||
kubectl create namespace cattle-system
|
||||
# kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.1/cert-manager.crds.yaml
|
||||
# install helm
|
||||
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
|
||||
sudo apt-get install apt-transport-https --yes
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install helm
|
||||
|
||||
helm repo add jetstack https://charts.jetstack.io --force-update
|
||||
helm repo update
|
||||
helm install \
|
||||
cert-manager jetstack/cert-manager \
|
||||
--namespace cert-manager \
|
||||
--create-namespace \
|
||||
--version v1.15.2 \
|
||||
--set crds.enabled=true
|
||||
```
|
||||
NAME: cert-manager
|
||||
LAST DEPLOYED: Sat Aug 3 21:38:31 2024
|
||||
NAMESPACE: cert-manager
|
||||
STATUS: deployed
|
||||
REVISION: 1
|
||||
TEST SUITE: None
|
||||
NOTES:
|
||||
cert-manager v1.15.2 has been deployed successfully!
|
||||
|
||||
In order to begin issuing certificates, you will need to set up a ClusterIssuer
|
||||
or Issuer resource (for example, by creating a 'letsencrypt-staging' issuer).
|
||||
|
||||
More information on the different types of issuers and how to configure them
|
||||
can be found in our documentation:
|
||||
|
||||
https://cert-manager.io/docs/configuration/
|
||||
|
||||
For information on how to configure cert-manager to automatically provision
|
||||
Certificates for Ingress resources, take a look at the `ingress-shim`
|
||||
documentation:
|
||||
|
||||
https://cert-manager.io/docs/usage/ingress/
|
||||
|
||||
```bash
|
||||
kubectl get pods --namespace cert-manager
|
||||
kubectl create namespace cattle-system
|
||||
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
|
||||
helm install rancher rancher-latest/rancher \
|
||||
--namespace cattle-system \
|
||||
--set hostname=rancher.local \
|
||||
--set bootstrapPassword=admin
|
||||
```
|
||||
If you provided your own bootstrap password during installation, browse to https://rancher.local to get started.
|
||||
|
||||
If this is the first time you installed Rancher, get started by running this command and clicking the URL it generates:
|
||||
|
||||
```
|
||||
echo https://rancher.local/dashboard/?setup=$(kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}')
|
||||
```
|
||||
https://node03/dashboard/?setup=admin
|
||||
|
||||
To get just the bootstrap password on its own, run:
|
||||
|
||||
```
|
||||
kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}{{ "\n" }}'
|
||||
```
|
||||
|
||||
```bash
|
||||
kubectl -n cattle-system get deploy rancher
|
||||
|
||||
kubectl -n cattle-system rollout status deploy/rancher
|
||||
kubectl -n cattle-system get deploy rancher
|
||||
kubectl get svc -n cattle-system
|
||||
kubectl expose deployment rancher --name=rancher-lb --port=443 --type=LoadBalancer -n cattle-system
|
||||
kubectl get svc -n cattle-system
|
||||
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.6.2/deploy/longhorn.yaml
|
||||
kubectl get pods \
|
||||
--namespace longhorn-system \
|
||||
--watch
|
||||
k delete -f https://raw.githubusercontent.com/longhorn/longhorn/v1.6.2/deploy/longhorn.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/Longhorn/longhorn.yaml
|
||||
kubectl get pods \
|
||||
--namespace longhorn-system \
|
||||
--watch
|
||||
sudo service open-iscsi status
|
||||
sudo apt install open-iscsi
|
||||
kubectl get pods \
|
||||
--namespace longhorn-system \
|
||||
--watch
|
||||
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.6.2/deploy/longhorn.yaml
|
||||
kubectl -n longhorn-system get pod
|
||||
kubectl get svc
|
||||
k apply -f kube-vip
|
||||
helm repo add longhorn https://charts.longhorn.io
|
||||
helm install my-longhorn longhorn/longhorn --version 1.6.2
|
||||
helm repo add traefik https://traefik.github.io/charts
|
||||
helm repo update
|
||||
helm install my-traefik traefik/traefik --version 29.0.0
|
||||
kubectl create namespace traefik
|
||||
```
|
||||
@@ -25,8 +25,8 @@ KVVERSION="v0.6.3"
|
||||
|
||||
# Set the IP addresses of the admin, masters, and workers nodes
|
||||
admin=192.168.50.143
|
||||
master1=192.168.50.209
|
||||
worker1=192.168.50.205
|
||||
master1=192.168.50.132
|
||||
worker1=192.168.50.131
|
||||
|
||||
# User of remote machines
|
||||
user=furyhawk
|
||||
|
||||
Reference in New Issue
Block a user