This posts shows working kubernetes setup on CentOS 7.2.1511. Some steps are not covered in other articles on the internet.
Current Kubernetes release version 1.2.0-0.13 in the CentOS default repositories.
0. Install 2 servers
All your kubernetes nodes will be in 3 different subnets at the same time:
- External interface subnet: 10.0.1.0/24
- Flannel subnet: 172.17.0.0/16 # Do not use existing subnet
- Service cluster subnet: 10.10.10.0/24 # Do not use existing subnet
Each server has 1 Ethernet adapter. Example configuration:
Example below shows how to backup on server A and restore docker containers on server B.
As example I'll use container created in the previous post Docker – wordpress all-in-one container on CentOS 7
This example shows LAMP + WordPress all in one docker container. This setup is not going to scale. And all-in-one makes it easy to backup and restore. CentOS 7 container with enabled systemd makes it easy to implement this.
This post shows process of moving MediaWiki to multiple docker containers setup with MySQL master-slave replication.
I'll skip MediaWiki setup. Focus on docker and MySQL replication.
RSYNC has option --partial (keep partially transferred files) or -P same as --partial --progress.
Script below uploads file over ssh and restart rsync if it failed in 1 min.
Very quick start on CentOS 7.x.
- master (puppet master)
- web (puppet client, httpd and php will be installed)
- db (puppet client, mariadb-server will be installed)
This post shows how to create copy of CentOS 7 repositories:
And configure internal repository server.
yum -y install httpd xinetd syslinux tftp-server dhcp
Copy files from iso image:
mount -o loop CentOS-7-x86_64-Minimal-1503-01.iso /mnt/
cp -r /mnt /data/centos-7.1-64x-pxe
This post shows only commands and file modifications without explanation. It is based on http://docs.openstack.org/liberty/install-guide-rdo/
To keep it simple I used the same password for most of services: AdminPass123!
Create base image from current CentOS 7 system with one command:
tar --numeric-owner --exclude=/proc --exclude=/sys --exclude=/boot --exclude=/usr/lib/firmware --exclude=/usr/lib/modules --exclude=/usr/lib/udev -cvf centos7.tar /
You will have file size 565M from CentOS 7 minimal install.
More optimal way: https://github.com/docker/docker/blob/master/contrib/mkimage-yum.sh
As result you'll have 247M file.
This post is related to previous post "Vagrant with multiple machines and ports".
1. Backup boxes
Remove file 70-persistent-net.rules on appsrv and monsrv before backup:
ssh -i ~/.vagrant.d/id_rsa email@example.com -p 3333 'sudo rm -f /etc/udev/rules.d/70-persistent-net.rules'
ssh -i ~/.vagrant.d/id_rsa firstname.lastname@example.org -p 4444 'sudo rm -f /etc/udev/rules.d/70-persistent-net.rules'