- sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-$(rpm -E %{rhel})-x86_64/pgdg-redhat-repo-latest.noarch.rpm
- sudo dnf -qy module disable postgresql
- sudo dnf install pgvector_17
- sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
- sudo systemctl start postgresql-17
- sudo systemctl enable postgresql-17
- sudo -i -u postgres
- psql
- CREATE ROLE rag_user WITH LOGIN PASSWORD 'Sunil390@rag';
- CREATE DATABASE rag_knowledge_db OWNER rag_user;
- \c rag_knowledge_db
- CREATE EXTENSION IF NOT EXISTS vector;
- \dx vector
- \q
- exit
- sudo nano /var/lib/pgsql/17/data/pg_hba.conf
- host rag_knowledge_db rag_user 0.0.0.0/0 scram-sha-256
- sudo systemctl restart postgresql-17
- host.containers.internal if running under systemd and n8n is under podman
- sudo -i -u postgres
- psql
- \c rag_knowledge_db
- DROP TABLE n8n_vectors CASCADE;
- curl -fsSL https://ollama.com/install.sh | sh
- ollama run ibm/granite3.3:2b
- ollama pull ibm/granite-embedding:278m
- in n8n Change base url to http://host.docker.external:11434 if in same host or http://192.168.2.80:11434 if run outside.
- selfhosted n8n with AI http://host.docker.internal:11434 to connect to ollama
- git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
- cd self-hosted-ai-starter-kit
- cp .env.example .env # only postgress passwords changed.
- docker compose --profile gpu-nvidia up
- podman volume create n8n_data
- openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out ./n8n/tls.crt -keyout ./n8n/tls.key -subj "/CN=n8n/O=n8n" -addext "subjectAltName = DNS:n8n,IP:192.168.2.226"
- chmod 644 ./n8n/tls.crt
- chmod 644 ./n8n/tls.key
- kubectl get services -A
- podman run -it --rm --name n8n -p 5678:5678 --add-host awx.znext.com:10.43.154.140 -e N8N_SECURE_COOKIE="false" -e TZ="Asia/Kolkata" -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true -e N8N_RUNNERS_ENABLED=true -e DB_SQLITE_POOL_SIZE=2 -e N8N_SSL_CERT=/certs/tls.crt -e N8N_SSL_KEY=/certs/tls.key -e N8N_PROTOCOL=https -v ./n8n:/certs:Z -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
- sudo timedatectl set-ntp true
- sudo dnf install nginx
- add Organization
- add admin user and tag to Oraganuzation
- add a team in Organization
- ssh to mainframe and generate the keypair without passphrase. AWX is one year old and is not accepting the passphrase protected RSA Key.
ssh-keygen -t rsa -b 3072 -N "" -m PEM
- copy the id_rsa
- create a new "Machine" credential in AWX enter mainframe user name and private key.
- add github project with project url and sync it
- add an inventory name
- add a host and link to inventory name
- add these variables in the host definition
---
ansible_host: 192.168.2.44
ansible_user: IBMUSER
PYZ: "/usr/lpp/IBM/cyp/v3r11/pyz"
PYZ_VERSION: "3.11"
ZOAU: "/usr/lpp/IBM/zoautil"
ZOAU_PYTHON_LIBRARY_PATH: "{{ ZOAU }}/lib/{{ PYZ_VERSION }}"
ansible_python_interpreter: "{{ PYZ }}/bin/python{{PYZ_VERSION}}"
environment_vars:
_BPXK_AUTOCVT: "ON"
ZOAU_HOME: "{{ ZOAU }}"
PYTHONPATH: "{{ ZOAU_PYTHON_LIBRARY_PATH}}"
LIBPATH: "{{ ZOAU }}/lib:{{ PYZ }}/lib:/lib:/usr/lib:."
PATH: "{{ ZOAU }}/bin:{{ PYZ }}/bin:/bin:/var/bin"
_CEE_RUNOPTS: "FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
_TAG_REDIR_ERR: "txt"
_TAG_REDIR_IN: "txt"
_TAG_REDIR_OUT: "txt"
LANG: "C"
PYTHONSTDINENCODING: "cp1047"
- add a job template with a playbook and select inventory and credentials.
- Launch Template