By default docker will put all the data including images under /var/lib/docker (At least on Debian). This could let to problems with space. It’s the case on my home server so i had to move docker location. I had to mount /var/lib/docker to new place. Because my /var and /usr are mounted to different partitions and discs i try to solve space problem by mounting docker default location to new mount under /usr/local/docker transparently.
First backup of fstab
sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
Then stop docker and copy all files per rsync preserving all attributes.
sudo service docker stop
sudo mkdir /usr/local/docker
sudo rsync -aXS /var/lib/docker/. /usr/local/docker/ [/bash]
Now it was important to check that everything was copied right. I’ve did eye check, but diff -r command is useful to. Ok it’s important to make new mount and make it durable in fstab. That is what was useful in my case inside of fstab.
# <file system> <mount point> <type> <options> <dump> <pass>
/usr/local/docker /var/lib/docker none bind 0 0
;file system> <mount point> <type> <options> <dump> <pass>
Now mount of new configuration without reboot.
Now docker has enough space.
My last post is about how to start with Docker on GCE. Yet i’m continuing with tests and moving to real life scenarios. Firstly i wanted to improve my docker base images.
After reading Michael Crosby’s Dockerfile best Practises i’ve rebuild my basic Dockerfiles. All my Docker images are trusted nature and you can look inside and even fork them on GitHub (Don’t be shy to comment if you see improvement potential). Let’ me here present some of them.
Read more »
This is brief description of docker test on Google compute engine (One of google’s cloud services)
At First we need gcloud Tools. You can use them as prepared docker container or by installation on your machine.
#install google cloud sdk
$curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash
At this point you should have google account, google compute engine account with at least one project inside. You need a project ID to log in into it.
Now you are able to login and to create first VM instance in this project. Read more »
Today ended my experiment with Livefyre comment system on this blog. Somehow it was a hype, but it not realy boosted comment on my blog. Now i think there is more disadvantages than advantages to this system and it’s time to change. I’m also not realy exitet about DISQUS, because the native WordPress commenting system is quite good with a set of addtional plugins.
But before i’ll go back to this, i give DISQUS a try. I don’t know exactly if there are hidden configuration tricks in 2014, please give me a hint if there are any tipps. I’m unsure about quality of WP- Plugin. I hope it is SEO friendly out of the box and syncronizes every comment back to my wordpress.
Read more »
It’s been a while since my last post, which was last year. Currently i’m diving in to Docker. Docker is like Vagrant but for Linux Containers (LXC). Both tools are amazing. However this article is not mentioned to help you with a decision of using Linux Containers instead of VM’s. There is a lot of information in the internet to this. If you think LXC could be interesting for you, then you maybe will also love Docker.
Read more »
My last post was about Cassandra Set Up. Current article discusses Cassandras data model and objects. In essence Cassandra is a hybrid between a key-value and a column-oriented NoSQL databases. Key value nature is represented by a row object, in which value would be generally organized in columns. In short, cassandra knows following objects
- Keyspace can be seen as DB Schema in SQL.
- Column family resembles a table in SQL world (read below this analogy is misleading)
- Row has a key and as a value a set of Cassandra columns. But without relational schema corset.
- Column is a triplet := (name, value, timestamp).
- Super column is a tupel := (name, collection of columns).
- Data Types : Validators & Comparators
Read more »
Introduction to Cassandra
Even Cassandra is often mentioned in books and in several NoSQL blogs, there is still not enough attention to this very interesting NoSQL database. Cassandra is extremely scalable and can deliver continuous availability. Cassandra is very good for managing large amounts of data in a cluster that span across multiple data centers and the cloud. Best of all cassandra is also linear scalable. Ok, you say, what about maintenance? Apache Cassandra promisses operational simplicity, zero conf and self-balancing architecture. It also promises some degree of hardware agnosticism and can run on commodity servers and even on any kind of consumer hardware. As i mentioned before Cassandra is very good in scale and has no single point of failure (not by design, but you can get one if you treat it wrong ). So why there is still no so much attention to this database, even if access times outperforms Mongo DB (especially writes)?
I don’t know exactly, but i think it has to do with a relatively steep learning curve in comparison to some competitors in the field.
However this article shows that one can get pretty fast familiar with Cassandra, starting using it with one local node.
Read more »
In a past article i described how to enable KVM virtualization on your Linux. Present article is about virtual network you can span with several commands or simple script.
Private virtual machines, if they are created, usually needed to be connected to some networks. Of course there could be a plenty of different solutions for variable infrastructure contexts. In this post im focusing on simple and easy way to enable network and hang all the local vms into it. So i need and show a solution good situated for Linux based private or small organizations. It is even best solution (until you provide a better on in a comment :)) for your laptop. Because laptops can be moved around, i don’t want to relay on any constrains of external network, also maybe i don’t want expose to much information about my local network. Further. The whole has to be simple and easy to. Interested? Read more »
Aptitude is native packet manager for debian linux which is based on apt. I prefer to use it if available because of easiness. Below some tips on how to use it in graphic mode.
- Update packet database before do anything else by pressing
- Action on selected packages:
+ for add or update;
- for remove;
= for hold version.
Ctr+T to open menu with all available commands
- Aptitude uses different screens. For example during the update new screen appears but the main screen is not closed but only overlapped, you can navigate through them with
F7 . And you can close any screen by pressing
q . Aptitude is quits if you close last screen.
/ for search
n for next element. Alternatively press
l for reducing the package tree for only search results. Un-Limit is again by deleting filter or by navigation through menu-> Search->Un-Limit Display…
[Shift+U] select all packets for upgrade.
- by conflicts you can examinate them by pressing “e” and then switch between proposals by pressing
. However sometimes it’s there are just um any. Therefore to guide aptitude you ca select particular package then switch in the info-panel by pressing
Tab and explicitly reject one of the proposal by pressing
r. For example you maybe want to reject any proposal of removal of that particular package.
Current state column
|-||the package is installed and all its dependencies are satisfied.|
|-||the package was removed, but its configuration files are still present.|
|-||the package and all its configuration files were removed, or the package was never installed.|
|-||the package is virtual.|
|-||the package has broken dependencies.|
|-||the package has been unpacked but not configured.|
|-||half-configured: the package’s configuration was interrupted.|
|-||half-installed: the package’s installation was interrupted.|
Action flags (what will be done)
|-||the package will be installed.|
|-||the package will be upgraded.|
|-||the package will be deleted: it will be removed, but its configuration files will remain on the system.|
|-||the package will be purged: it and its configuration files will be removed.|
|-||the package will be held back: it will be kept at its current version, even if a newer version becomes available, until the hold is cancelled.|
|-||An upgrade of the package has been forbidden.|
|-||the package will be reinstalled.|
|-||the package is “broken”: some of its dependencies will not be satisfied. aptitude will not allow you to install, remove, or upgrade anything while you have broken packages|
|-||automatically installed package as dependency|
|-||Package from Untrusted source|