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 | |
#coding=utf-8 | |
for host in "$@" | |
do | |
echo $host | |
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$host "useradd -d /home/ceph -m ceph; echo password | passwd ceph; echo 'ceph ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/ceph; chmod 0440 /etc/sudoers.d/ceph;" | |
done | |
echo "usage: create_ceph_user.sh host1 host2 host3" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define :node1 do |node1| | |
node1.vm.box = "centos65" |
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
ceph-deploy disk list ceph-client | |
ceph-deploy disk zap ceph-client:/dev/sdb | |
ceph-deploy disk prepare ceph-client:/dev/sdb | |
ceph-deploy disk activate ceph-client:/dev/sdb | |
--- | |
ceph osd lspools | |
ceph auth list | |
ceph auth get-key client.images | |
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
http://blog.csdn.net/k_james/article/details/12994145 | |
VM1: 192.168.1.11 | |
VM2: 192.168.1.13 | |
VIP: 192.168.1.201 | |
VM1: /etc/keepalived/keepalived.conf | |
vrrp_instance VI_NODE { | |
state MASTER | |
interface eth2 |
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
syntax on | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set nu | |
set autoindent | |
set laststatus=2 | |
set list listchars=tab:>-,trail:- | |
set hlsearch | |
set smartindent |
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
--- | |
##prapare to install | |
# for all nodes | |
sudo useradd -d /home/ceph -m ceph | |
sudo passwd ceph | |
echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph | |
sudo chmod 0440 /etc/sudoers.d/ceph | |
##admin-node node(ceph and root) | |
ssh-keygen |
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
expected_signature = hmac.new( | |
CONF.neutron_metadata_proxy_shared_secret, | |
instance_id, | |
hashlib.sha256).hexdigest() | |
# grep shared_secret /etc/nova/nova.conf | |
neutron_metadata_proxy_shared_secret=deadbeef2eb84d8d | |
Python 2.7.5 (default, Nov 12 2013, 16:18:42) | |
[GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux2 |
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
== Initial == | |
On controller node (192.168.122.163): | |
$ yum install openstack-keystone openstack-utils dnsmasq-utils -y | |
$ yum install openstack-glance openstack-cinder openstack-neutron \ | |
openstack-neutron-openvswitch -y | |
$ yum install openstack-nova -y | |
On compute (192.168.122.100): |
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
#!/usr/bin/python | |
import os, sys | |
try: | |
import packstack | |
except ImportError: | |
# packstack isn't installed, running from source checkout | |
sys.path.insert(0, os.path.join(os.path.split(sys.argv[0])[0], "..")) | |
import packstack |
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
# -*- coding: utf-8 -*- | |
import re | |
import socket | |
def get_localhost_ip(): | |
""" | |
Returns IP address of localhost. | |
""" |
OlderNewer