-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gvisor-tap service by using nmcli and binary from container image #673
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,10 +92,32 @@ if podman manifest inspect quay.io/crcont/dnsmasq:${OPENSHIFT_VERSION} >/dev/nul | |
image_tag=${OPENSHIFT_VERSION} | ||
fi | ||
|
||
# create the tap device interface with specified mac address | ||
# this mac addresss is used to allocate a specific IP to the VM | ||
# when tap device is in use. | ||
${SSH} core@${VM_IP} 'sudo bash -x -s' <<EOF | ||
nmcli connection add type tun ifname tap0 con-name tap0 mode tap autoconnect yes 802-3-ethernet.cloned-mac-address 5A:94:EF:E4:0C:EE | ||
EOF | ||
|
||
# Add gvisor-tap-vsock and crc-dnsmasq services | ||
${SSH} core@${VM_IP} 'sudo bash -x -s' <<EOF | ||
podman create --name=gvisor-tap-vsock --privileged --net=host -v /etc/resolv.conf:/etc/resolv.conf -it quay.io/crcont/gvisor-tap-vsock:latest | ||
podman generate systemd --restart-policy=no gvisor-tap-vsock > /etc/systemd/system/gvisor-tap-vsock.service | ||
podman create --name=gvisor-tap-vsock quay.io/crcont/gvisor-tap-vsock:latest | ||
podman cp gvisor-tap-vsock:/vm /usr/local/bin/ | ||
podman rm gvisor-tap-vsock | ||
tee /etc/systemd/system/gvisor-tap-vsock.service <<ETE | ||
[Unit] | ||
Description=gvisor-tap-vsock traffic forwarder | ||
Wants=network-online.target | ||
After=network-online.target | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the |
||
|
||
[Service] | ||
Restart=on-failure | ||
TimeoutStopSec=70 | ||
ExecStart=/usr/local/bin/vm -preexisting -debug | ||
|
||
[Install] | ||
WantedBy=default.target | ||
ETE | ||
touch /var/srv/dnsmasq.conf | ||
podman create --ip 10.88.0.8 --name crc-dnsmasq -v /var/srv/dnsmasq.conf:/etc/dnsmasq.conf -p 53:53/udp --privileged quay.io/crcont/dnsmasq:${image_tag} | ||
podman generate systemd --restart-policy=no crc-dnsmasq > /etc/systemd/system/crc-dnsmasq.service | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does
ETE
have any special meaning/is this typical to use this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first time I see this