Kubernetes SFFaudio-Search on Linode.com
SFFaudio-Search was a single page Node.js app that was injected into SFFaudio.com's WordPress search page. It was discontinued because of human intervention needed for manual linking of text posts. It enabled fast and easy searching of SFFaudio's online content of authors, stories, blog-posts, PDFs, and MP3s.
The data is held in Google Sheets for easy text editing; PDF data, RSD data, and Podcast data. Then a Neo4j graph database links the data, while Vis.js is used to display the interactive relationships. PDFs are displayed via PDF.js on the canvas. The four small icons in the bottom left and right of the widget
- show help
- resize the graph to window size
- shrink the graph
- grow the graph
Four blog posts, a PDF, an RSD, an MP3, a Wikipedia story link, and a link back to the author.
Steps | |
---|---|
Get Docker | Download Docker Desktop for Windows |
Enter /docker-images/ | $ cd docker-images |
Launch program | $ docker-run.bat |
View web page | http://localhost/?author=philip-k-dick (5 books) |
View Neo4j database | http://localhost:7474/browser |
Update Neo4j database | http://localhost:81/cron-new-db-version-81 (wait 2 minutes) |
View 7413 books | http://localhost/ (refresh to clear cache) |
Steps | |
---|---|
Get Linode Account | Sign up for Linode Cloud |
Get kubectl | Install kubectl on Windows |
Configure KUBECONFIG | $ setx KUBECONFIG "C:\kubes\linode-kube-config.yaml" |
Start LKE | Make a Kubernetes Cluster |
Create a 3 node cluster | 3 Linode 2GB for a total of $30 a month |
Copy kubeconfig.yaml file | into C:\kubes\linode-kube-config.yaml |
Start cluster | $ kubectl apply -k ./ |
Wait for 4 pods to start | $ kubectl get pods -w |
Get EXTERNAL service IPs | $ kubectl get svc |
neo4j--db--service 104.200.26.55 | |
http://104.200.26.55:7474/browser/ | |
password=yer_password | |
node--webserver--service 104.200.27.60 | |
http://104.200.27.60 (empty database) |
Launch CronJob | edit cron--job.yaml for an immediate cronjob run |
schedule: "17 * * * *" # start 17 minutes after every hour cron job | |
#schedule: "43 0 * * 0" # stop weekly cron job | |
Set cron job run time | $ kubectl apply -f cron--job.yaml |
$ kubectl get pods -w to see cron job launch in a pod | |
Wait until *(20315) Node labels in Neo4j browser (up to 10 minutes) | |
View full database | http://104.200.27.60 (refresh might be needed to clear cache) |
- The Node.js Neo4j-driver used in this project is 1.7.7, very old, the current version is 4.2.1 and is not backwards compatible
- The Neo4j Docker image used in this project is 3.4.9, very old, the current version is 4.2.2 and is not backwards compatible
- Mobile css is not handled correctly anymore as this program's output was meant to be displayed inside of Wordpress pages