Prometheus monitoring stack on Ubuntu 22.04.2 and Micro Kubernetes Cluster (microk8s)

1) Install Ubuntu 22.04.2 desktop

Install guest agent:

sudo apt-get install qemu-guest-agent
sudo systemctl start qemu-guest-agent

Optional – Add the curret user to the sudo group:

sudo usermod -aG sudo $USER

2) Configure RDP and VNC

fix the lock problem:

3) Install docker

sudo apt install docker.io

add the current user to docker group:

sudo usermod -aG docker $USER

4) Check docker version

docker --version

5) Create a Micro Kubernetes Cluster (microk8s)

See here: https://microk8s.io/docs/getting-started

sudo snap install microk8s --classic --channel=1.27

MicroK8s creates a group to enable seamless usage of commands which require admin privilege. To add your current user to the group and gain access to the .kube caching directory, run the following two commands:

sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube

See the node:

microk8s kubectl get nodes

See the running services:

microk8s kubectl get services

Create an alias:

alias kubectl='microk8s kubectl'

Deploy an app:

microk8s kubectl create deployment nginx --image=nginx
microk8s kubectl get pods

Starting and Stopping MicroK8s:

microk8s stop
microk8s start

export the cluster configuration

kubectl config view --raw > ~/.kube/config

6) Alternatively – install minikube

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb

start your cluster:

minikube start

Install kubectl:

snap install kubectl --classic
kubectl version --client

7) Install helm

$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh

or using snap:

sudo snap install helm --classic

8) Deploy Prometheus monitoring stack to Kubernetes with a single Helm Chart

See: https://dev.to/kaitoii11/deploy-prometheus-monitoring-stack-to-kubernetes-with-a-single-helm-chart-2fbd

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

helm repo update

kubectl create ns prom

helm search repo prometheus-community

helm install prometheus prometheus-community/kube-prometheus-stack -n prom

helm install ksm prometheus-community/kube-state-metrics -n prom # install the kube-state-metrics

kubectl --namespace prom get pods

Check configmaps and secrets:

kubectl --namespace prom get configmap
kubectl --namespace prom get secret

Look inside a secret file:

kubectl --namespace prom get secret

Check CRDs

kubectl get crd

9) Access Prometheus Dashboard

$ kubectl port-forward -n prom service/prometheus-kube-prometheus-prometheus 9090

10) Access Grafana Dashboard

$ kubectl port-forward -n prom deployment/prometheus-grafana 3000

default user/password is admin/prom-operator

11) Uninstall Prometheus stack

$ helm uninstall ksm -n prom
$ helm uninstall prom -n prom

12) Install and use K8S Lens to explore what was deployed in the kluster:

https://k8slens.dev/

AI Resources

Audio and Video AI Tools:
————————-
1. VoicePen AI:Convert audio content into blog posts, using AI.
https://voicepen.ai

2. Krisp: AI tool for removing background voices, noises, and echo from calls.
https://krisp.ai/

3. Beatoven: AI tool for creating custom royalty-free music.
https://www.beatoven.ai/

4. Cleanvoice: AI tool for automatically editing podcast episodes.
https://cleanvoice.ai/

5. Podcastle: AI tool for studio-quality recording from your computer.
https://podcastle.ai/

6. Vidyo: AI tool for making short-form videos from long-form content.
https://vidyo.ai/

7. Maverick: AI tool for generating personalized videos at scale.
https://lnkd.in/eptCVijb

8. Soundraw: AI tool for creating original music.
https://soundraw.io/

9. Otter: AI tool for capturing and sharing insights from meetings.
https://otter.ai/

Design AI Tools:
——————-
1. Flair: AI tool for designing branded content.
https://flair.ai/

2. Illustroke: AI tool for creating vector images from text prompts.
https://illustroke.com/

3. Stockimg: AI tool for generating the perfect stock photo.
https://stockimg.ai/

4. Looka: AI tool for designing your brand.
https://looka.com/

Copy and Content AI Tools:
—————————
1. Copy: AI tool for generating copy that increases conversions.
https://www.copy.ai/

2. CopyMonkey: AI tool for creating Amazon listings in seconds.
http://copymonkey.ai/

3. Ocoya: AI tool for creating and scheduling social media content.
https://www.ocoya.com/

4. Unbounce Smart Copy: AI tool for writing high-performing cold emails at scale.
https://unbounce.com/

5. Puzzle: AI tool for building a knowledge base for your team and customers.
https://www.puzzlelabs.ai/

Image and Content Clean-up AI Tools:
——————————-

1. Cleanup: AI tool for removing objects, defects, people, or text from pictures.
https://cleanup.pictures/

2. Inkforall: AI tool for content generation, optimization, and performance.
https://inkforall.com/

AI Data Presentation :
——————–
1. STORYD : It creates AI data presentations leaders love, in seconds. Beta goes live in a few weeks.
https://storyd.ai

AI Database:
—————
1. SyntheticAIdata : https://lnkd.in/efKXxUkU
2. theresanaiforthat : https://lnkd.in/esexMFzt

pfSense Qemu Guest Agent

https://codingpackets.com/blog/pfsense-qemu-guest-agent/

Intro

I use Proxmox for my hypervsior and recently installed pfSense as a firewall. I use the QEMU Guest Agent to get more detailed info about the VM’s that are running in the Proxmox console.

This post shows the process to get the QEMU Guest Agent running on a pfSense firewall.

Software Versions

The following software versions were used in this post.

  • pfSense Community Edition – 2.6.0
  • QEMU Guest Agent – 5.0.1

Install

Install the qemu-guest-agent package.

cmd

pkg install -y qemu-guest-agent

If you get an error “insufficient privileges to install packages”, you need to make sure the default admin account is enabled and you need to log in as admin. You may need to install the sudo package too.

# pkg install sudo

The default sudoers file is located here: /usr/local/etc/sudoers. To edit it and add rules you need to use the visudo command.

$ su -
$ visudo

Then to give a user access to everything as root:

userX ALL=(ALL) ALL

To become root (as userX):

$ sudo -s
-or-
$ sudo -i

Once installed, there is a note on how to setup the agent.

=======================================================
Modify your `/etc/rc.conf` by adding these settings

qemu_guest_agent_enable="YES"
qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"

and run
# service qemu-guest-agent start

For detailed help use `qemu-ga -h`
=======================================================

Configure

I am following the steps in the script here (with slight modifications).

Append to the /etc/rc.conf.local file.

cmd

cat >> /etc/rc.conf.local << EOF
qemu_guest_agent_enable="YES"
qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
#virtio_console_load="YES"
EOF

Create the /usr/local/etc/rc.d/qemu-agent.sh file.

cmd

cat > /usr/local/etc/rc.d/qemu-agent.sh << EOF
#!/bin/sh
sleep 3
service qemu-guest-agent start
EOF

Make the /usr/local/etc/rc.d/qemu-agent.sh file executable.

cmd

chmod +x /usr/local/etc/rc.d/qemu-agent.sh

Start the QEMU Guest Agent service.

cmd

service qemu-guest-agent start

Confirm the QEMU Guest Agent service is running.

cmd

service qemu-guest-agent status

# Output
qemu_guest_agent is running as pid 85066.

Remove Proxmox Subscription Notice (Tested to 7.1-10)

Originally posted here:

To remove the “You do not have a valid subscription for this server” popup message while logging in, run the command bellow. You’ll need to SSH to your Proxmox server or use the node console through the PVE web interface.

  • If you have issues and need to revert changes please check the instructions at the bottom of this page.
  • When you update your Proxmox server and the update includes the proxmox-widget-toolkit package, you’ll need to complete this modification again.
  • This modification works with versions 5.1 and newer, tested up to the version shown in the title.

Run the following one line command and then clear your browser cache (depending on the browser you may need to open a new tab or restart the browser):

sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

 

Manual Steps

Here are alternative step by step instructions so you can understand what the above command is doing:

1. Change to working directory

cd /usr/share/javascript/proxmox-widget-toolkit

2. Make a backup

cp proxmoxlib.js proxmoxlib.js.bak

3. Edit the file

nano proxmoxlib.js

4. Locate the following code
(Use ctrl+w in nano and search for “No valid subscription”)

Ext.Msg.show({
  title: gettext('No valid subscription'),

5. Replace “Ext.Msg.show” with “void”

void({ //Ext.Msg.show({
  title: gettext('No valid subscription'),

6. Restart the Proxmox web service (also be sure to clear your browser cache, depending on the browser you may need to open a new tab or restart the browser)

systemctl restart pveproxy.service