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 / config-ceph-with-openstack.sh
Last active June 26, 2023 19:41
install ceph and config openstack glance/cinder to use ceph as it's backend
---
##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
@zhanghui9700
zhanghui9700 / nova-resize-workflow-folsom.sh
Created April 29, 2014 10:05
nova-resize-workflow-folsom
mv /var/lib/nova/instances/instance-00000026 /var/lib/nova/instances/instance-00000026_resize
mkdir -p /var/lib/nova/instances/instance-00000026
qemu-img convert -f qcow2 -O qcow2 /var/lib/nova/instances/instance-00000026_resize/disk /var/lib/nova/instances/instance-00000026_resize/disk_rbase
mv /var/lib/nova/instances/instance-00000026_resize/disk_rbase /var/lib/nova/instances/instance-00000026/disk
qemu-img convert -f qcow2 -O qcow2 /var/lib/nova/instances/instance-00000026_resize/disk.local /var/lib/nova/instances/instance-00000026_resize/disk.local_rbase
mv /var/lib/nova/instances/instance-00000026_resize/disk.local_rbase /var/lib/nova/instances/instance-00000026/disk.local
finish_resize:
// request拦截器, 改变url 或 options.
request.interceptors.request.use((url, options) => {
const c_token = getAuthority()
console.log("token: %s", c_token);
if (c_token) {
const headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'JWT ' + c_token[0]
};
windows7 32位 链接:http://pan.baidu.com/s/1pLRq3P5 密码:qlgj
windows7 64位 链接:http://pan.baidu.com/s/1miOEGPi 密码:8qyu
Windows Server 2016 64位 链接:http://pan.baidu.com/s/1qXH4M1A 密码:1n80
Windows Server 2012r2 64位 链接:http://pan.baidu.com/s/1kVmhecf 密码:iods
Windows Server 2012 64位 链接:http://pan.baidu.com/s/1slwKp8D 密码:amek
Windows Server 2008r2 64位 链接:http://pan.baidu.com/s/1slWBZy9 密码:m17p
Windows Server 2008 64位 链接:http://pan.baidu.com/s/1jH776QU 密码:vfb1
Windows Server 2008 32位 链接:http://pan.baidu.com/s/1o82VXWm 密码:7iav
Windows Server 2003r2 64位 链接:http://pan.baidu.com/s/1bo1bTCF 密码:f8i3
Windows Server 2003 32位 链接:http://pan.baidu.com/s/1gf9r0iR 密码:1pur

virt.libvirt.driver.create_domain_and_network

# virt/libvirt/driver.py
def _create_domain_and_network():
    block_device_mapping = driver.block_device_info_get_mapping(
        block_device_info)
    LOG.info("[pykit] block_device_mapping: %s", block_device_mapping)
    LOG.info("[pykit] network_info: %s", network_info)

nova boot from ephemeral disk and network

@zhanghui9700
zhanghui9700 / curl-openstack-api.sh
Created June 10, 2014 02:30
use curl to test openstack api
curl test for openstack api
; change token when you run the command.
; glance
; glance image-list
curl -i -X GET -H 'X-Auth-Token: XXXXXXXXXXXXX-TODO' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://192.168.14.80:9292/v1/images/detail?sort_key=nam e&sort_dir=asc&limit=20

openstack nova commands

nova boot

@zhanghui9700
zhanghui9700 / heat.tutorial.md
Last active September 25, 2017 00:30
heat tutorial

explore deployment-task workflow

@zhanghui9700
zhanghui9700 / fuel.md
Last active April 19, 2017 10:00
mirantis fuel