- use parentheses around “if” conditions
good:
if (x = y && (x + y > 3))
not good:
# removed stopped container | |
docker container prune | |
# remove all images with no running containers | |
docker image prune --all |
Create bridge on node (with IP):
cluster/cli.sh ssh node01
sudo echo "net.bridge.bridge-nf-call-iptables = 0" >> /etc/sysctl.conf
sudo sysctl -p
sudo ip link add red type bridge
sudo ip link set dev red up
# either give a local address to bridge or set real interface as master
apiVersion: kubevirt.io/v1alpha2 | |
kind: VirtualMachineInstance | |
metadata: | |
creationTimestamp: null | |
labels: | |
special: vmi-bridge | |
name: vmi-bridge | |
spec: | |
domain: | |
devices: |
Create bridge on node:
# this step is needed so that the bridge would forward traffic
sudo echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sudo sysctl -p
# create the bridge
sudo ip link add red type bridge
sudo ip link set dev red up
# Monitoring | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: kubevirt-prometheus-metrics | |
namespace: kube-system | |
labels: | |
prometheus.kubevirt.io: "" | |
kubevirt.io: "" | |
spec: |
Check the DNS server name:
cat /etc/resolv.conf
Add the following line to the docker conf file:
echo "OPTIONS='--dns=10.0.0.10 --dns=10.0.0.11 --dns-search=example.com'" >> /etc/sysconfig/docker
#!/bin/bash | |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum install -y epel-release-latest-7.noarch.rpm |
Install remote viewer:
yum install virt-viewer
Configure sshd to allow for X11 forwarding:
vi /etc/ssh/sshd_config
And make sure that:
Follow instructions from: https://docs.openshift.com/container-platform/3.10/getting_started/install_openshift.html
subscription-manager register
subscription-manager refresh
subscription-manager list --available
Find the pool ID for the one that had OpenShift, and enable/disable repos:
subscription-manager attach --pool=<pool ID>
subscription-manager repos --disable=rhel-7-server-htb-rpms \