如下样例,是一个典型的Yaml格式的文件,存在于examples/ubuntu.yml
name: process-yaml-file-ubuntu
containers:
- name: ubuntu
image: ubuntu:latest
workdir: /
### The Yaml file support | |
#### Introduction | |
如下样例,是一个典型的Yaml格式的文件,存在于examples/ubuntu.yml | |
``` | |
name: process-yaml-file-ubuntu | |
containers: | |
- name: ubuntu | |
image: ubuntu:latest |
官方的安装文档是使用go get github.com/tools/godep,很可惜,因为“网络”问题会报一个找不到golang.org/x/tools/go/vcs的错误。而https://github.com/golang/tools 是 golang.org/x/tools的一个镜像,代码是一样的,所以我是如下安装的。 | |
* set your GOPATH | |
* make a dir in your $GOPATH/src/, like $GOPATH/src/golang.org/x | |
* `git clone https://github.com/golang/tools $GOPATH/src/golang.org/x/tools` | |
* `go get github.com/tools/godep` | |
* add $GOPATH/bin dir in PATH env | |
* update the local hyper private repo | |
* you can `godep go build hyper.go/hyperd.go` |
As something of a follow-up post to the previous entry, here’s a quick recipe for creating a Virtual Machine using the VirtualBox command line tools:
We’re using Windows Server 2008 64bit as an example, modify to taste.
$ VM='Windows-2008-64bit'
Create a 32GB “dynamic” disk.
lei@ubuntu:~/src/pub/src/hyper$ git diff | |
diff --git a/client/run.go b/client/run.go | |
index 4a18923..4016703 100644 | |
--- a/client/run.go | |
+++ b/client/run.go | |
@@ -14,6 +14,7 @@ import ( | |
"hyper/engine" | |
"hyper/lib/promise" | |
"hyper/pod" | |
+ "hyper/utils" |
1, download the hyper files from https://mega.co.nz/#F!mo0xXTRJ!LMViLJRGy2zm--pRVJ6Z_A
2, copy the hyper/config to /var/lib/hyper/config
3, make dir at /var/lib/docker/vbox/images
mkdir -p /var/lib/docker/vbox/images/
4, copy the hyper/100...00.vdi to /var/lib/docker/vbox/images/
sh-3.2# ./hyperd -v 4 --config=config --nondaemon | |
[HYPER INFO 0807 10:31:16 50024 hyperd.go] [:97] The config file is config | |
[HYPER INFO 0807 10:31:16 50024 docker.go] [:48] success to create docker | |
[HYPER INFO 0807 10:31:16 50024 daemon.go] [:193] The config: kernel=/var/lib/hyper/kernel, initrd=/var/lib/hyper/hyper-initrd.img | |
[HYPER INFO 0807 10:31:16 50024 daemon.go] [:195] The config: vbox image=/Users/lei/Downloads/hyper-vbox-boot.iso | |
[HYPER INFO 0807 10:31:16 50024 daemon.go] [:198] The config: bridge=, ip= | |
[HYPER INFO 0807 10:31:16 50024 daemon.go] [:201] The config: bios=, cbfs= | |
[HYPER INFO 0807 10:31:16 50024 driver.go] [:137] [graphdriver] using prior storage driver "vbox" | |
[HYPER INFO 0807 10:31:16 50024 daemon.go] [:632] Using graph driver vbox | |
[HYPER INFO 0807 10:31:16 50024 daemon.go] [:652] Creating images graph |
Patch:
runv: b757f7e79b1cdf97dc14e69767f25f1eaff3d9b3
hyper: 585a097628c890d50f754de3149564a234f89a9f
lei@leis-MacBook-Pro:[hyper] (info)$ ./hyper list
POD ID POD Name VM name Status
pod-JQJVhUAOEm test-container-create-ubunt pending