What's the point of having a home lab if your not going to experiment, learn new stuff and develop cool shit. Is it so you can tell your friends, hey look I have something called Plex and I can stream South Park to all my devices!!!
Better yet, let's say I want to deploy Grafana and use InfluxDB as my backend, how do I do this with docker?
docker run -p 8083:8083 -p 8086:8086 -d -v $PWD/influxdb:/var/lib/influxdb influxdb
docker run -d -p 3000:3000 grafana/grafana
So what does the command above actually do?
First one, it's deploying Influxdb on port 8083 and 8086 and using persistent volume to mount a directory on on your local system called influxdb to inside the container /var/lib/influxdb. This means that when you update your container, all your data is there and just remount that directory and everything works as expected. Want to make a change to the config, go to $PWD/influxdb and make changes in there and it will reflect in your container.
Second commands is running Grafana on port 3000
Let's say we want to have multiple Influxdb on the same system, how do we deploy another one?
docker run -p 8084:8083 -p 8087:8086 -d -v $PWD/influxdb2:/var/lib/influxdb influxdb
Now I am running a second instance that is isolated and you can have as many of the same service running without an issue.
Want to deploy your very own minecraft server with one command? I wrote a docker container and pushed it to docker hub and you can run it by doing:
docker run -d -p 25565:25565 -v /opt/tekkit:/opt/tekkit --name mc rizbe/tekkit-legend
So how do you build your own docker container? Below is the dockerfile used to build the docker container above:
# This Dockerfile is used to build an image containing Minecraft Tekkit
FROM ubuntu:trusty
MAINTAINER Rizbe
# Make sure the package repository is up to date.
RUN apt update
RUN apt -y upgrade
#Install Java
RUN apt install openjdk-7-jre-headless unzip wget -y
# Add user minecraft
RUN adduser --quiet minecraft
RUN mkdir /opt/tekkit
RUN chown -R minecraft /opt/tekkit
#Download Tekkit Legends
RUN wget -O /tmp/tekkit.zip http://servers.technicpack.net/Technic/servers/tekkit-legends/Tekkit_Legends_Server_v1.1.1.zip
RUN unzip /tmp/tekkit.zip -d /opt/tekkit
RUN chmod +x /opt/tekkit/start.sh
RUN chown -R minecraft /opt/tekkit
VOLUME ["/opt/tekkit"]
EXPOSE 25565
WORKDIR /opt/tekkit
USER minecraft
ENTRYPOINT ["/bin/sh","/opt/tekkit/start.sh"]
Let's say minecraft says we don't work with Java anymore, go into the docker file, just replace openjdk-7 with 8, build, test, push to repo, redploy and use the same volume you used and now your running the latest version of tekkit minecraft with java 8 and new version without messing up anything.
Now you might say, hey I have sensitive stuff and don't want to use Docker hub because its public, you can have your own registry with this:
docker run -p 5000:5000 registry
I want to have my own nagios server but it's hard to build, what can I do?
docker run -d -p 25 -p 80 quantumobject/docker-nagios
Hopefully someone can tell me why Docker or containers in general is not the way to go to run services :)
Enjoy more examples:
docker run --name some-nginx -d some-content-nginx
docker run --name some-redis -d redis
docker run --name some-mongo -d mongo
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql
docker run -d elasticsearch
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
Docker environment is very easy to set up and once its set up, its beyond easy to run all your services. Server is dead, easily redeploy your entire stack in seconds on a new server. The entire world is going containerization, this is a new tech that you want to learn for sure.
Look at every major company from Apple to Google to even Microsoft, they are all going containerization and there is a reason for that. Understand what containers are and why you will understand why any place with good engineers is switching to it. We are in an era of micro services and containers.
Wait what? lol
How is docker not fit for one off services? As a DevOps engineer working for big financial company, we use Ansible. We have moved to Docker and Kuberentes and I can tear down our entire stack and rebuild it in less than 30 seconds. Even with Ansible that is not possible, we do still use it. I have a huge home lab and every application I run is in Docker. I can throw one of my servers out the windows and provision and deploy all my services using coreos and Docker. If you want to make a change to one of your services, you can test it out in Docker, commit the change to your own registry and swap out our old service with the new service in seconds.
You might want to look into Docker more before making such claims.
I personally use Telegraph, influxDB, Grafana, and Sensu for monitoring, collecting metrics, and building out beautiful dashboards. I use this in my home labs and my company. Easy to setup, very flexible, and scales extremely well.
Are you going with multiple nodes? If no, then kubernetes is a waste. With docker alone, you can create different docker network interfaces to separate containers into different subnets.
Set up atomic OS, centos flavor. Build all your application in docker, if you have multiple server, art up kubernetes, which is built into atomic. If you can do this, you do even greater things.
Been a long time pure Arch user and I saw this post when I woke up. Kind of came off as a dickish post, so I wiped my box and installed Antergos. Now I am one of them <3
Yeah that was broken till I downgraded gtk3
I just downgraded gtk3 to 3.22.12 and its good or now.
Tried all the shortcuts and tried multiple terminals, same thing
I saw a post about gtk3 breaking and I am running gtk3-3.22.14-1, which should have the fix. Nothing to update on my system :(
Seeing this yesterday was so helpful, good stuff
What's the point of having a home lab if your not going to experiment, learn new stuff and develop cool shit. Is it so you can tell your friends, hey look I have something called Plex and I can stream South Park to all my devices!!!
Better yet, let's say I want to deploy Grafana and use InfluxDB as my backend, how do I do this with docker?
So what does the command above actually do? First one, it's deploying Influxdb on port 8083 and 8086 and using persistent volume to mount a directory on on your local system called influxdb to inside the container /var/lib/influxdb. This means that when you update your container, all your data is there and just remount that directory and everything works as expected. Want to make a change to the config, go to $PWD/influxdb and make changes in there and it will reflect in your container.
Second commands is running Grafana on port 3000
Let's say we want to have multiple Influxdb on the same system, how do we deploy another one?
Now I am running a second instance that is isolated and you can have as many of the same service running without an issue.
Want to deploy your very own minecraft server with one command? I wrote a docker container and pushed it to docker hub and you can run it by doing:
So how do you build your own docker container? Below is the dockerfile used to build the docker container above:
Let's say minecraft says we don't work with Java anymore, go into the docker file, just replace openjdk-7 with 8, build, test, push to repo, redploy and use the same volume you used and now your running the latest version of tekkit minecraft with java 8 and new version without messing up anything.
Now you might say, hey I have sensitive stuff and don't want to use Docker hub because its public, you can have your own registry with this:
I want to have my own nagios server but it's hard to build, what can I do?
Hopefully someone can tell me why Docker or containers in general is not the way to go to run services :)
Enjoy more examples:
Docker environment is very easy to set up and once its set up, its beyond easy to run all your services. Server is dead, easily redeploy your entire stack in seconds on a new server. The entire world is going containerization, this is a new tech that you want to learn for sure.
Look at every major company from Apple to Google to even Microsoft, they are all going containerization and there is a reason for that. Understand what containers are and why you will understand why any place with good engineers is switching to it. We are in an era of micro services and containers.
Wait what? lol How is docker not fit for one off services? As a DevOps engineer working for big financial company, we use Ansible. We have moved to Docker and Kuberentes and I can tear down our entire stack and rebuild it in less than 30 seconds. Even with Ansible that is not possible, we do still use it. I have a huge home lab and every application I run is in Docker. I can throw one of my servers out the windows and provision and deploy all my services using coreos and Docker. If you want to make a change to one of your services, you can test it out in Docker, commit the change to your own registry and swap out our old service with the new service in seconds.
You might want to look into Docker more before making such claims.
Hopefully influx and Grafana is running in docker. If not, you might want to look into that. Also what was the issue with telegraf?
You want to see the results of the nagios in Grafana? If that is the case, may I ask why when nagios already comes with a dash.
If you use nagios, it won't impact rest of the stack I mentioned.
If you Google each individual service, the makers have a great guide on each.
Grafana has an official docker container, I containerize all services I run in docker.
I personally use Telegraph, influxDB, Grafana, and Sensu for monitoring, collecting metrics, and building out beautiful dashboards. I use this in my home labs and my company. Easy to setup, very flexible, and scales extremely well.
How many containers are you looking to run?
CoreOS makes clustering easy, makes networking easy and great with flannel and keeps their development moving at a great pace.
Also if anyone uses Kubernetes, please use coreOS.
Are you going with multiple nodes? If no, then kubernetes is a waste. With docker alone, you can create different docker network interfaces to separate containers into different subnets.
Docker and Kubernetes are different things. Docker is the container engine and kubernetes is the container orchestration tool.
Promox is cool but docker with Kubernetes might be what you want
Set up atomic OS, centos flavor. Build all your application in docker, if you have multiple server, art up kubernetes, which is built into atomic. If you can do this, you do even greater things.
Wallpaper please <3
Been a long time pure Arch user and I saw this post when I woke up. Kind of came off as a dickish post, so I wiped my box and installed Antergos. Now I am one of them <3
Looking at snaps, there is a mysql snap or a postgres snap, just curious, why would someone use a postgres snap over postgres in docker?