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 java.io.File; | |
import java.io.FileInputStream; | |
import java.io.StringWriter; | |
import java.security.KeyStore; | |
import javax.net.ssl.SSLContext; | |
import org.apache.commons.io.IOUtils; | |
import org.apache.http.HttpEntity; |
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
centos 7 setup-rename NIC to eth0 | |
http://ask.xmodulo.com/change-network-interface-name-centos7.html | |
- This is achieved by editing /etc/default/grub and adding "net.ifnames=0" to GRUB_CMDLINE_LINUX variable. | |
- Then run this command to regenerate GRUB configuration with updated kernel parameters. | |
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg | |
- cat /sys/class/net/*/address |
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
yum update | |
https://docs.docker.com/engine/installation/linux/centos/ | |
yum install -y yum-utils | |
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | |
yum makecache fast | |
yum install docker-ce | |
docker |
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
# install epel-release on centos | |
yum -y install epel-release | |
yum -y update | |
# install python-pip from epel | |
yum -y install python-pip | |
# Verify using: | |
pip -V |
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
docker-compose up --force-recreate |
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
rsync -avz --exclude ./docker-volumes . <user>@<ip-address>:/user/<remote-folder>/ |
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
# To disable firewalld, run the following command as root: | |
systemctl disable firewalld | |
# To stop firewalld, run the following command as root: | |
systemctl stop firewalld | |
# start firewalld | |
systemctl start firewalld | |
# status |
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
How I can see the used space / free space on a compute node with local storage? | |
vgdisplay cinder-volumes | |
or | |
pvdisplay |
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
# provide an alias to the host local loopback | |
sudo ifconfig lo0 alias 172.20.123.1 | |
# check alias | |
ifconfig|more | |
# ping alias from within docker | |
docker run -it --rm busybox ping 172.20.123.1 | |
# check that the host services are accessible from the aliased IP |
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
export INTERNAL_DOCKER_HOST="tcp://$(docker run --rm busybox ip route show | grep ^default | cut -f3 -d ' '):2375" |
OlderNewer