This file contains 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 | |
# | |
# Generates client and server certificates used to enable HTTPS | |
# remote authentication to a Docker daemon. | |
# | |
# See http://docs.docker.com/articles/https/ | |
# | |
# To start the Docker Daemon: | |
# | |
# sudo docker -d \ |
This file contains 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
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install glance-api' returned 100: Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
You might want to run 'apt-get -f install' to correct these: | |
The following packages have unmet dependencies: | |
openstack-dashboard-cloudbase-theme : Depends: openstack-dashboard (= 1:2015.1.0-0ubuntu1~cloud0) but 1:2015.1.1-0ubuntu1~cloud2 is to be installed | |
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). | |
Error: /Stage[main]/Glance::Api/Package[glance-api]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install glance-api' returned 100: Reading package lists... | |
Building dependency tree... |
This file contains 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
sudo su | |
echo 'UseDNS no' >> /etc/ssh/sshd_config | |
service ssh restart |
This file contains 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
import os | |
1GB = 1024*1024*1024 # 1GB | |
with open('large_file', 'wb') as fout: | |
fout.write(os.urandom(1GB)) |
This file contains 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
##using fallocate | |
fallocate -l 100G large_file.img | |
##using xfs | |
xfs_mkfile 10240m 10Gigfile | |
## using dd | |
#kilobytes | |
dd if=/dev/zero of=filename bs=1 count=0 seek=200K |
This file contains 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 | |
sync | |
echo 1 > /proc/sys/vm/drop_caches | |
echo 2 > /proc/sys/vm/drop_caches | |
echo 3 > /proc/sys/vm/drop_caches |
This file contains 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
ip route add default via my-gateway ip route del default | |
ip route del 0/0 | |
while ip route del default; do :; done |
This file contains 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
Add a new harddisk | |
/dev/sdb | |
Create partition | |
Sudo fdisk /dev/sdb | |
Command (m for help): m | |
Command action | |
a toggle a bootable flag | |
b edit bsd disklabel | |
c toggle the dos compatibility flag | |
d delete a partition |
This file contains 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
ovs-dpctl show -s | |
ovs-ofctl show, dump-ports, dump-flows, add-flow, mod-flows, del-flows | |
ovsdb-tools show-log -m | |
ovs-vsctl | |
show - show the ovsdb | |
bridge - add-br, list-br, del-br, br-exists. | |
port - list-ports, add-port, del-port, add-bond, port-to-br. | |
interface - list-ifaces, iface-to-br | |
ovs-vsctl list/set/get/add/remove/clear/destroy table record column [value], tables like "bridge", "controller","interface","mirror","netflow","open_vswitch","port","qos","queue","ssl","sflow". |
This file contains 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
==rabbitmq-plugins enable rabbitmq_management== | |
root@openstack:~# rabbitmq-plugins enable rabbitmq_management | |
The following plugins have been enabled: | |
mochiweb | |
webmachine | |
rabbitmq_web_dispatch | |
amqp_client | |
rabbitmq_management_agent | |
rabbitmq_management |
OlderNewer