Category: Web

Alexa and Jenkins (Docker)

So I have an Alexa echo dot at home. Use it to control stuff but I wanted it to do more like release and deploy the stuff I build. This is how you can integrate Alexa voice service with Jenkins. First setup the server For receiving commands from Alexa and sending them to Jenkins we need a server and some code.… Read more →

Autodeploy you docker images to AWS (git push = deploy)

So I have a lot of small project and some large. To buil in quality into my code i need to run test in my code. And my code in a prod like env. I always uses docker so my dev env are verly like my prod. One key thing that i do is that when i push code to… Read more →

WordPress multisite to wordpress singelsite (Easy linux)

So i hade to slip up my wordpress multisite to singel sites and it was not that hard when i found out how. First start with setting up the new wordpress and then we migrate over the old wordpress site into the new. 1. Setup the new wordpress site Install and setup the new wordpress site. You can run the… Read more →

Maxscale Sql scaling with mariadb Cluster on Centos in Docker

So scaling sql server has now bean easy with mariadb maxscale. Here i uses it to connect to my mariadb cluster and setup two new servers. One is a loadbalanser and onw is a read/write splitter 1.First prep your mariadb servers with som users for you maxscale CREATE user ‘maxscale’@’%’ identified by ‘maxscaleW222’; GRANT SELECT ON mysql.user TO ‘maxscale’@’%’; GRANT… Read more →

MariaDB cluster with Dynamic Nodes on Centos 7 in Docker

So running sql in docker is a big qestion now. To make some test i have setup two mariadb cluster docker containers. The first one is the mariadb cluster master. This will setup a master mariadb sql node running. The second one is the MariaDB cluster slave. This docker will connect to the master and rsync the database over to… Read more →

Openldap with SQL Backend (Mariadb Centos 7 ) in Docker

We use Ldap for handling our users and I have spent time setting up Openldap and tryng to configur it. But now i have given up my ldap skills and setup my openldap to use a sql backend and then i config my user with SQL that i like more. I have also build i Dockerfile for docker that you… Read more →

Mesos cluster with Marathon running Docker

Hi So for hosting docker in large scale i have tested mesos cluster.  Here is a guide for setting up 3 nodes in mesos running Centos 7. And the adding Marathon to controll the dockers running. The network mesos-master 172.0.0.10 mesos-slave1 172.0.0.11 mesos-slave2 172.0.0.12   The node also have on nic connect to the network with internet access.   Security… Read more →

Elasticsearch controller

So we uses alot of easticsearch. And here is i small script to get status and do some simple task with es server. You can get cluster status and cron for index deletions.   import urllib2 # # # Clean up elastich search index by removing old stuff. #The defult ip to es server dhost=’10.101.1.31′ #The index name you are… Read more →

Python DOS protection (iptables,dos)

here are a small script I use to have some sort of dos protection on my webservers.   import subprocess whitelist=[‘192.168.1.2’] blockvalue=2 alertvalue=1 proc = subprocess.Popen(“netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n”, shell=True,stdout=subprocess.PIPE) running = proc.stdout.read() runing_sorted = running.split(‘\n’) for r in runing_sorted: con =r.split() if len(con) ==2: #If… Read more →

Foreman provision to bare and libvirtd (Centos7, foreman, libvirtd, KVM)

So I have started to play around with foreman and to get it to provision my diffrent servers. I started by starting up some local virtual servers on my laptop and played around with them. The flow is i started installing foreman as a virtual server. Then i provisin a new virtual server as bare matal (I created a virtual… Read more →

%d bloggers like this: