User Tools

Site Tools


linux:awx

AWX Kubernetes Notes

##On TowerU

minikube start --vm-driver=docker --addons=ingress
minikube status
kubectl get pods -A
kubectl port-forward service/awx-demo-service -n ansible-awx --address 0.0.0.0 10445:80

##To Get things to start after reboots

# Create a service

sudo vi /etc/systemd/system/minikube.service

#Add the below:

[Unit]
Description=Kickoff Minikube Cluster
After=docker.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/minikube start --vm-driver=docker --addons=ingress
RemainAfterExit=true
ExecStop=/usr/local/bin/minikube stop
StandardOutput=journal
User=erik
Group=erik

[Install]
WantedBy=multi-user.target

# Reload the daemon:

sudo systemctl daemon-reload

# Enable the service

sudo systemctl enable minikube.service

##That starts things, now we need to forward the ports so we can bring up the web GUI:

# Create a service

sudo vi /etc/systemd/system/minikube-forward.service

#Add the below:

[Unit]
Description=Forward Minikube AWX Ports
After=minikube.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/kubectl port-forward service/awx-demo-service -n ansible-awx --address 0.0.0.0 10445:80
RemainAfterExit=true
ExecStop=/usr/local/bin/minikube stop
StandardOutput=journal
User=erik
Group=erik

[Install]
WantedBy=multi-user.target

# Reload the daemon:

sudo systemctl daemon-reload

# Enable the service

sudo systemctl enable minikube-forward.service

#To get the WebUI to work #On the server:

kubectl proxy --address='172.16.4.54' --accept-hosts='^*$'

# Create a service

sudo vi /etc/systemd/system/minikube.webui.service

#To set it up as a service:

[Unit]
Description=Forward Minikube Web UI
After=minikube-forward.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/kubectl proxy --address='172.16.4.54' --accept-hosts='^*$'
RemainAfterExit=true
ExecStop=/usr/local/bin/minikube stop
StandardOutput=journal
User=erik
Group=erik

[Install]
WantedBy=multi-user.target

# Reload the daemon:

sudo systemctl daemon-reload

# Enable the service

sudo systemctl enable minikube.webui.service

#Clean Up Options

docker system prune

minikube ssh -- docker system prune

REF:

linux/awx.txt · Last modified: 2024/10/01 13:58 by 127.0.0.1