$ vagrant init fedora/25-atomic-host
$ vagrant up
$ vagrant ssh
This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.
Long story short, ansible does not work on a Windows control machine, so you basically have to:
- either run
ansible --connection=local ...
in the target vm - set up a separate control vm where ansible is installed via shell provisioner
Below are Vagrantfile
examples for both approaches
- http://www.vagrantup.com/downloads.html
- Download and install vagrant_1.6.3.msi
- Reboot
- [run]
vagrant box add opscode_ubuntu-12.04_chef-11.4.0 https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.0.box
- http://gnuwin32.sourceforge.net/packages/gtar.htm
- Download and install http://gnuwin32.sourceforge.net/downlinks/tar-bin.php
This example show how-to setup a very simple Swarm cluster enabled with Weave Net.
## Infratructure
There are two hosts that have a recent version of Docker Engine running.
These hosts are named host1
and host2
, and might have the following in
/etc/hosts
or you just substitute IP addresses in the commands shown below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Erik Kristensen | |
# Email: erik@erikkristensen.com | |
# License: MIT | |
# Nagios Usage: check_nrpe!check_docker_container!_container_id_ | |
# Usage: ./check_docker_container.sh _container_id_ | |
# | |
# The script checks if a container is running. | |
# OK - running |
###Pre-Req's:
Installing Cloudera Repo on all nodes that you'll install hadoop daemons on:
sudo cat > /etc/yum.repos.d/cloudera.repo <<EOF
[cloudera-cdh5]
# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 6 x86_64
name=Cloudera's Distribution for Hadoop, Version 5
baseurl=http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- prepare work | |
a. make cm node can ssh to all nodes without password | |
ssh-genkey, ssh-copy-id | |
b. hostname mapping | |
c. mysql server | |
d. postgresql | |
e. ntp | |
systemctl disable chrony | |
centos7 default enable chrony server, even enable ntpd, cuase chrony started, ntpd will not started | |
this will cause CDH ntp error, so need to disable chrony. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installation: | |
# | |
# 1. vim /etc/ssh/sshd_config | |
# PrintMotd no | |
# | |
# 2. vim /etc/pam.d/login | |
# # session optional pam_motd.so | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Font=Powerline Consolas | |
ForegroundColour=131,148,150 | |
BackgroundColour=0,43,54 | |
CursorColour=220,50,47 | |
Black=7,54,66 | |
BoldBlack=0,43,54 | |
Red=220,50,47 | |
BoldRed=203,75,22 | |
Green=133,153,0 | |
BoldGreen=88,110,117 |
NewerOlder