The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.
Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD
as a functional alternative to juju deploy kubernetes-core
, or using KVM/VirtualBox in this solution.
Network Block Device(nbd): | |
In Linux, a network block device is a device node whose content is provided by a remote machine. Typically, network block devices are used to access a storage device that does not physically reside in the local machine but on a remote one. As an example, the local machine can access a fixed disk that is attached to another computer. | |
1.start nbd-server to export a qcow2 image with absolute path on the NBD server host. | |
# nbd-server 12345 /home/my-data-disk.qcow2 | |
2.launch a KVM guest with this exported image as a data disk. | |
# qemu-img info nbd:10.66.83.171:12345 | |
image: | |
file format: qcow2 | |
virtual size: 10G (10737418240 bytes) |
I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.
Let's say you want to upload yourfile.txt
to a GCS bucket from your virtual machine.
You can use the gsutil
command line tool that comes installed on all GCE instances.
If you've never used the gcloud
or gsutil
command line tools on this machine before, you will need to initialize them with a service account.
#!/bin/sh | |
# This script creates a user-mode linux machine based on Ubuntu. | |
# Created by Clay Smith, May 2017 | |
# | |
# based on: https://gist.github.com/aputs/6247216 | |
# and https://gist.github.com/AVGP/5410903 | |
set -x |
We are going to use buildroot to download, configure and compile the kernel. | |
First, download and uncompress buildroot: https://buildroot.org/download.html | |
Go to the directory and: | |
make qemu_x86_defconfig | |
make menuconfig |
$ ifconfig | |
eth0 Link encap:Ethernet HWaddr 00:50:fc:99:96:e3 | |
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 | |
inet6 addr: fe80::250:fcff:fe99:96e3/64 Scope:Link | |
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | |
RX packets:36311 errors:0 dropped:0 overruns:0 frame:0 | |
TX packets:36902 errors:0 dropped:0 overruns:0 carrier:0 | |
collisions:0 txqueuelen:1000 | |
RX bytes:24450223 (24.4 MB) TX bytes:6426466 (6.4 MB) | |
Interrupt:16 Base address:0xe800 |
$ ifconfig | |
eth0 Link encap:Ethernet HWaddr 00:50:fc:99:96:e3 | |
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 | |
inet6 addr: fe80::250:fcff:fe99:96e3/64 Scope:Link | |
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | |
RX packets:36311 errors:0 dropped:0 overruns:0 frame:0 | |
TX packets:36902 errors:0 dropped:0 overruns:0 carrier:0 | |
collisions:0 txqueuelen:1000 | |
RX bytes:24450223 (24.4 MB) TX bytes:6426466 (6.4 MB) | |
Interrupt:16 Base address:0xe800 |