Category: Linux

Local Developing for Google Cloud

I have now starting to move all my hosting and code to the Google cloud platform. But when i developing new things i want to use the power and flexibility that the platform gives me but i want to develop local. So for my new project with using Datastore and the python app engine. I have set up a docker-compose… Read more →

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 →

ddclient for loopia in Docker

So i uses loopia.se as my dns provider. And a also have some dns for my home but it always change ip (have dynamic ip home )   So for fixing this i build a docker images that updates my loopia server from the docker images. So i if you are using loopia i but this is the best way… Read more →

Nginx with TLS (Handel certs in Docker)

I use alot of nginx with tls. And almost ll of my docker are public. So how do i solve the tls issues. Well i have done it like so in my docker file i generate ssl cert for nginx in a folder i called /etc/nginx/tls Then when i use my ngix in dev i get the generated certs.  … 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 →

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 →

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 →

%d bloggers like this: