Skip to content

Instantly share code, notes, and snippets.

View zhanghui9700's full-sized avatar
🎯
Focusing

pysharp zhanghui9700

🎯
Focusing
  • beijing
View GitHub Profile
@zhanghui9700
zhanghui9700 / ceph config for openstack glance and cinder.sh
Last active August 29, 2015 13:57
ceph config for openstack glance and cinder
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
@zhanghui9700
zhanghui9700 / vagrantfile.rb
Last active August 29, 2015 13:57
vagrant file for a multi host develop environment
# -*- 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"
@zhanghui9700
zhanghui9700 / create-user-ceph-to-many-host
Last active August 29, 2015 13:57
create ceph user and change passwd without shell interactive
#!/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"