Skip to content

Commit 4c923e6

Browse files
authored
Merge pull request #24 from gnawux/release-0.8
release note for v0.8.0
2 parents d9e0670 + ed57c09 commit 4c923e6

26 files changed

+593
-246
lines changed

SUMMARY.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
* [Build from source](get_started/install/build.md)
1313
* [Pod](get_started/pod.md)
1414
* [Lifecycle](get_started/lifecycle.md)
15+
* [OCI Image Spec](get_started/oci_image.md)
1516
* [Reference](reference/README.md)
16-
* [Podfile](reference/podfile.md)
17-
* [Containers](reference/containers.md)
18-
* [Volumes](reference/volumes.md)
19-
* [Files](reference/files.md)
17+
* [Hyperd Config](reference/configuration.md)
2018
* [CLI](reference/cli.md)
2119
* [run](reference/run.md)
2220
* [start](reference/start.md)
@@ -34,17 +32,23 @@
3432
* [commit](reference/commit.md)
3533
* [build](reference/build.md)
3634
* [push](reference/push.md)
35+
* [save](reference/save.md)
36+
* [load](reference/load.md)
3737
* [login](reference/login.md)
3838
* [logout](reference/logout.md)
3939
* [API](reference/api.md)
40-
* [Config](reference/configuration.md)
40+
* [Pod Spec](reference/podfile.md)
41+
* [Container Spec](reference/containers.md)
42+
* [Volumes](reference/volumes.md)
43+
* [Files](reference/files.md)
4144
* [License](license.md)
4245
* [Trouble Shooting](trouble_shooting/README.md)
4346
* [Platform Independent FAQ](trouble_shooting/general.md)
4447
* [Qemu/KVM FAQ](trouble_shooting/qemu.md)
4548
* [Xen FAQ](trouble_shooting/xen.md)
4649
* [Release Notes](release_notes/README.md)
4750
* [latest](release_notes/latest.md)
51+
* [v0.8 (2017-03-20)](release_notes/v0.8.md)
4852
* [v0.7 (2016-10-28)](release_notes/v0.7.md)
4953
* [v0.6 (2016-05-25)](release_notes/v0.6.md)
5054
* [v0.5 (2016-02-05)](release_notes/v0.5.md)

figures/lifecycle.png

22.9 KB
Loading

get_started/install/build.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Clone hyper in GoPath
1010
> git clone https://github.com/hyperhq/hyperd.git hyper
1111
> git clone https://github.com/hyperhq/runv.git runv
1212

13-
And make sure you have `go` (>= 1.5) and `autotools`, develop files of
13+
And make sure you have `go` (>= 1.5, 1.7 or later is recommended) and `autotools`, develop files of
1414
`libdevmapper`, `libsqlite3`, `libvirt-devel` then
1515

1616
> cd hyper
@@ -42,6 +42,16 @@ And build with autotools
4242

4343
Then you can find `hyper-initrd.img` in build directory, together with a pre-build `kernel`. You can also find the `kernel_config` in the repo.
4444

45+
#### Build Qemu
46+
47+
Hyperd could work with vanilla qemu 2.0 or newer, however, we provided our branch with some patches from hyper:
48+
49+
```
50+
https://github.com/hyperhq/qemu/tree/2.4.1-template
51+
```
52+
53+
If you build Qemu from source, don't forget enable virtfs (`--enable-virtfs`) during configuration.
54+
4555
#### Build Your Own Kernel
4656

4757
You can reference the [Hyper kernel configuration](https://github.com/hyperhq/hyperstart/blob/master/build/kernel_config).

get_started/install/linux.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,50 +13,36 @@
1313
- Fedora ( > 20 )
1414
- Debian ( > 7.0 )
1515

16-
### curl-to-bash or tarball
17-
18-
To setup Hyper, simply run (after 0.4, the same package support both
19-
KVM and Xen)
20-
21-
curl -sSL https://hypercontainer.io/install | bash
22-
23-
Don't like the "curl to bash" methods? Download [tarball here](https://hypercontainer-install.s3.amazonaws.com/hyper-latest.tgz).
24-
25-
For CentOS/RHEL users, please use the pre-build RPMs
26-
27-
If you build Qemu from source, don't forget enable virtfs (`--enable-virtfs`) during configuration.
28-
2916
### RPMs for CentOS/RHEL7
3017

3118
x86_64 binary packages:
3219

33-
> - [hyper-container-0.7.0-1.el7.centos.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.7.0-1.el7.centos.x86_64.rpm)
34-
> - [hyperstart-0.7.0-1.el7.centos.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.7.0-1.el7.centos.x86_64.rpm)
35-
> - [qemu-hyper-2.4.1-2.el7.centos.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/qemu-hyper-2.4.1-2.el7.centos.x86_64.rpm)
20+
> - [hyper-container-0.8.0-1.el7.centos.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.8.0-1.el7.centos.x86_64.rpm)
21+
> - [hyperstart-0.8.0-1.el7.centos.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.8.0-1.el7.centos.x86_64.rpm)
22+
> - [qemu-hyper-2.4.1-3.el7.centos.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/qemu-hyper-2.4.1-3.el7.centos.x86_64.rpm)
3623
3724
and SRPMS:
3825

39-
> - [hyper-container-0.7.0-1.el7.centos.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.7.0-1.el7.centos.src.rpm)
40-
> - [hyperstart-0.7.0-1.el7.centos.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.7.0-1.el7.centos.src.rpm)
41-
> - [qemu-hyper-2.4.1-2.el7.centos.src.rpm](https://hypercontainer-install.s3.amazonaws.com/qemu-hyper-2.4.1-2.el7.centos.src.rpm)
26+
> - [hyper-container-0.8.0-1.el7.centos.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.8.0-1.el7.centos.src.rpm)
27+
> - [hyperstart-0.8.0-1.el7.centos.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.8.0-1.el7.centos.src.rpm)
4228
43-
## RPMs for Fedora 23
29+
## RPMs for Fedora 23+
4430

4531
x86_64 binary packages:
4632

47-
> - [hyper-container-0.7.0-1.fc23.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.7.0-1.fc23.x86_64.rpm)
48-
> - [hyperstart-0.7.0-1.fc23.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.7.0-1.fc23.x86_64.rpm)
33+
> - [hyper-container-0.8.0-1.fc25.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.8.0-1.fc25.x86_64.rpm)
34+
> - [hyperstart-0.8.0-1.fc25.x86_64.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.8.0-1.fc25.x86_64.rpm)
4935
5036
and SRPMS:
5137

52-
> - [hyper-container-0.7.0-1.fc23.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.7.0-1.fc23.src.rpm)
53-
> - [hyperstart-0.7.0-1.fc23.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.7.0-1.fc23.src.rpm)
38+
> - [hyper-container-0.8.0-1.fc25.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyper-container-0.8.0-1.fc25.src.rpm)
39+
> - [hyperstart-0.8.0-1.fc25.src.rpm](https://hypercontainer-install.s3.amazonaws.com/hyperstart-0.8.0-1.fc25.src.rpm)
5440
5541
> *Note*: The qemu shipped in Fedora could work well with Hyper, we did not package qemu for Fedora.
5642
5743
## Deb packages for Ubuntu
5844

5945
Binary packages for `amd64`:
6046

61-
> - [hypercontainer_0.7.0-2_amd64.deb](https://s3-us-west-1.amazonaws.com/hypercontainer-install/hypercontainer_0.7.0-2_amd64.deb)
62-
> - [hyperstart_0.7.0-1_amd64.deb](https://s3-us-west-1.amazonaws.com/hypercontainer-install/hyperstart_0.7.0-1_amd64.deb)
47+
> - [hypercontainer_0.8.0-1_amd64.deb](https://hypercontainer-install.s3.amazonaws.com/hypercontainer_0.8.0-1_amd64.deb)
48+
> - [hyperstart_0.8.0-1_amd64.deb](https://hypercontainer-install.s3.amazonaws.com/hyperstart_0.8.0-1_amd64.deb)

get_started/lifecycle.md

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
11
# Lifecycle
22

3-
![](https://trello-attachments.s3.amazonaws.com/5562ba47387906ddef327e00/704x249/e4b1ec0168197c13e838bd5b405b3f28/pod.png)
4-
5-
In Hyper, a Pod has two states:
6-
7-
- `Created`: a Pod is defined, its storage has been allocated, and the Docker images have been downloaded
8-
- `Running`: a Pod (with its containers) is launched in a VM instance
3+
![](../figures/lifecycle.png)
94

5+
In HyperContainer, a Pod is encapsulated in a VM. Since v0.8, HyperContainer simplified the model of Pod and underlying VM (as well as the state machine). The lifecycle of Pod and VM are no longer managed separately.
106

117
A Pod can be launched either explicitly:
128

13-
[root@user ~:]# hyperctl run -p podfile.json
9+
➜ sudo ./hyperctl run -p podfile.json
1410

1511
Or, implicitly:
1612

17-
[root@user ~:]# hyperctl run -t ubuntu
18-
19-
In both cases, Pods and VMs are indivisible. Hyper will automatically provision a new VM instance to host the Pod, and the Pod will be `Running`.
20-
21-
However, you can also create a Pod, but without an underlying VM. In such case, the pod stays in `Created` state.
22-
23-
[root@user ~:]# hyperctl create -p podfile.json
24-
25-
There are two options to start the pod:
26-
27-
[root@user ~:]# hyperctl start pod_id
28-
29-
The `START` command will trigger a VM provisioned, and allocate the new VM to the Pod.
30-
31-
When you `STOP` a Pod, the underlying VM instance will be terminated:
32-
33-
[root@user ~:]# hyperctl stop pod_id
34-
35-
When stopped, the Pod will return to the `Created` state.
36-
37-
To permantly destroy a Pod, you need to `RM` it:
38-
39-
[root@user ~:]# hyperctl rm pod_id
40-
41-
Hyper will (stop if neccessary, then) remove the Pod definition and its storage.
13+
➜ sudo ./hyperctl run -d nginx
14+
POD id is nginx-8530075287
15+
16+
In both cases, Pods and VMs are indivisible. Hyper will automatically create a new VM instance to host the Pod, and the Pod will be `Running`. There could be zero, one, or more containers in a Pod. And you can create, start, stop, and remove containers in/from a Pod.
17+
18+
➜ sudo ./hyperctl create -c -d nginx-8530075287 busybox
19+
Container ID is a8fd34f686e6587979936df880b9e9144fefd895d19560493d2028aa82c47f0c
20+
➜ sudo ./hyperctl list container
21+
Container ID Name POD ID Status
22+
6e8c08420389a165682586380fa35432f5922287b9aec34059ed1ff68b3f1623 nginx-8530075287 nginx-8530075287 running
23+
a8fd34f686e6587979936df880b9e9144fefd895d19560493d2028aa82c47f0c busybox-2602968228 nginx-8530075287 pending
24+
➜ sudo ./hyperctl start -c busybox-2602968228
25+
Successfully started container busybox-2602968228
26+
➜ sudo ./hyperctl list container
27+
Container ID Name POD ID Status
28+
a8fd34f686e6587979936df880b9e9144fefd895d19560493d2028aa82c47f0c busybox-2602968228 nginx-8530075287 running
29+
6e8c08420389a165682586380fa35432f5922287b9aec34059ed1ff68b3f1623 nginx-8530075287 nginx-8530075287 running
30+
➜ sudo ./hyperctl stop -c busybox-2602968228 nginx-8530075287
31+
➜ sudo ./hyperctl list container
32+
Container ID Name POD ID Status
33+
6e8c08420389a165682586380fa35432f5922287b9aec34059ed1ff68b3f1623 nginx-8530075287 nginx-8530075287 succeeded
34+
a8fd34f686e6587979936df880b9e9144fefd895d19560493d2028aa82c47f0c busybox-2602968228 nginx-8530075287 succeeded
35+
➜ sudo ./hyperctl rm -c busybox-2602968228 nginx-8530075287
36+
container busybox-2602968228 is successfully deleted!
37+
container nginx-8530075287 is successfully deleted!
38+
➜ sudo ./hyperctl list container
39+
Container ID Name POD ID Status
40+
➜ sudo ./hyperctl list
41+
POD ID POD Name VM name Status
42+
nginx-8530075287 nginx-8530075287 vm-pqEnBvQVdS running
43+
44+
And you could stop or remove the Pod.
45+
46+
➜ sudo ./hyperctl rm nginx-8530075287
47+
Pod(nginx-8530075287) is successfully deleted!

get_started/oci_image.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Get Started with OCI Image Spec
2+
3+
Since version 0.8, hyperd supported [OCI Image](https://github.com/opencontainers/image-spec). You may save your images to OCI image format with [save](../reference/save.md) command, and load OCI Image with [load](../reference/load.md) command.
4+
5+
Here is a simple example:
6+
7+
```
8+
# hyperctl images
9+
REPOSITORY TAG IMAGE ID
10+
busybox latest 7968321274dc
11+
centos 7 980e0e4c79ec
12+
13+
//save centos:7 image as refname "hello" and busybox:latest image as refname "world" in mix-oci.tar usging oci image format
14+
# hyperctl save -o /tmp/mix-oci.tar -f oci -r centos:7=hello -r busybox:latest=world centos:7 busybox:latest
15+
16+
// untar mix-oci.tar and find index.json file
17+
# cat index.json |jq
18+
{
19+
"schemaVersion": 2,
20+
"manifests": [
21+
{
22+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
23+
"digest": "sha256:351c1c2957c21a76d7b74e94afabd6429d4a3d16cbe6ee7e7b1f351e39125490",
24+
"size": 346,
25+
"annotations": {
26+
"org.opencontainers.ref.name": "hello"
27+
},
28+
"platform": {
29+
"architecture": "amd64",
30+
"os": "linux"
31+
}
32+
},
33+
{
34+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
35+
"digest": "sha256:87fe700a194b98ab383582f9981539d9a69d49e1143e91fe0e75c4a92f5de42e",
36+
"size": 344,
37+
"annotations": {
38+
"org.opencontainers.ref.name": "world"
39+
},
40+
"platform": {
41+
"architecture": "amd64",
42+
"os": "linux"
43+
}
44+
}
45+
]
46+
}
47+
48+
// rm centos:7 and busybox:latest images for loading them from mix-oci.tar
49+
# hyperctl rmi centos:7 busybox:latest
50+
51+
// load centos and busybox images from mix-oci.tar and retag them as centos:test and busybox:test
52+
# hyperctl load -i /tmp/oci/mix-oci.tar -r centos:7=hello -r busybox:test=world
53+
54+
# hyperctl images
55+
REPOSITORY TAG IMAGE ID
56+
busybox test 7968321274dc
57+
centos test 980e0e4c79ec
58+
```

0 commit comments

Comments
 (0)