Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
rvs committed Jul 27, 2019
2 parents 17006f0 + f368b30 commit d034152
Show file tree
Hide file tree
Showing 39 changed files with 5,970 additions and 428 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pkgs: FORCE_BUILD=
pkgs: build-tools $(PKGS)
@echo Done building packages

pkg/pillar: pkg/lisp pkg/xen-tools pkg/dnsmasq pkg/strongswan pkg/gpt-tools pkg/watchdog eve-pillar
pkg/pillar: pkg/lisp pkg/xen-tools pkg/dnsmasq pkg/strongswan pkg/gpt-tools pkg/watchdog pkg/rkt pkg/rkt-stage1 eve-pillar
@true
pkg/qrexec-dom0: pkg/qrexec-lib pkg/xen-tools eve-qrexec-dom0
@true
Expand Down
88 changes: 54 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# EVE is Edge Virtualization Engine

[![CircleCI](https://circleci.com/gh/lf-edge/eve.svg?style=svg)](https://circleci.com/gh/lf-edge/eve)
[![Goreport](https://goreportcard.com/badge/github.com/lf-edge/eve)](https://goreportcard.com/report/github.com/lf-edge/eve)
[![Godoc](https://godoc.org/github.com/lf-edge/eve/pkg/pillar?status.svg)](https://godoc.org/github.com/lf-edge/eve/pkg/pillar)
Expand All @@ -11,71 +12,88 @@ To get its job done, EVE leverages a lot of great open source projects: [Xen Pro

## How to use

You will need qemu 3.x+ (https://www.qemu.org/), Docker (https://www.docker.com)
and go 1.12+ (https://golang.org) installed in your system.
You will need [QEMU 3.x+](https://www.qemu.org/), [Docker](https://www.docker.com)
and [go 1.12+](https://golang.org) installed in your system.

Note, that since Linuxkit and manifest-tool are evolving pretty rapidly, we're
vendoring those under build-tools/src. This means you don't have to have them
locally installed, but it also means your first build time will be much longer.

If you're on MacOS the following steps should get you all the dependencies:

0. Get Go:
### Install Dependencies

```
https://golang.org/dl/
```
1. Get Docker:
#### Get Go

```
https://store.docker.com/editions/community/docker-ce-desktop-mac
```
2. Make sure brew is installed:
```sh
https://golang.org/dl/
```

```
https://brew.sh/
```
3. Brew install qemu.
#### Get Docker

```
$ brew install qemu
```
```sh
https://store.docker.com/editions/community/docker-ce-desktop-mac
```

Make sure that Docker is up and running on your system. On MacOS just start a docker Application, on Linux make sure docker service is running. Regardless of how you start Docker you can make sure that it is ready for you by running the following command and making sure that it returns both a version of the client AND a version of the server:

```
```sh
docker version
```

EVE requires beeing built in Git repository (the tools keep looking up git commit IDs). The easiest way is to clone EVE repository from GitHub:
#### Get QEMU

##### On OSX using [Brew](https://brew.sh/)

```sh
$ brew install qemu
```

##### On Ubuntu

```sh
$ sudo apt install qemu
```

#### Get Project EVE

EVE requires being built in Git repository (the tools keep looking up git commit IDs). The easiest way is to clone EVE repository from GitHub:

```sh
git clone https://github.com/lf-edge/eve.git
cd eve
```

Build both the build-tools as well as the live image in the source directory:

```
```sh
make build-tools
make live
```

This will download the relevant dockers from docker hub and create a bootable
image 'dist/<ARCH>/live.img'.
image `dist/<ARCH>/live.img`.

Please note that not all containers will be fetched from the docker
hub. mkimage-raw-efi in particular will be built.
Please note that not all containers will be fetched from Docker Hub.
`mkimage-raw-efi` in particular will be built.

Also, keep in mind that since the initial build fetches a LOT of bits
over the network it may occasionally time out and fail. Typically
re-running make fixes the issue. If it doesn't you can attempt a local
build of all the required EVE packages first by running:
> **_NOTE:_** Since the initial build fetches a LOT of bits
> over the network it may occasionally time out and fail. Typically
> re-running `make` fixes the issue. If it doesn't you can attempt a local
> build of all the required EVE packages first by running `make pkgs`
```
make pkgs
#### Running in QEMU

Finally run the resulting image in QEMU with some default assumptions:

```sh
make run
```

Finally run the resulting image by typing `make run`. This will launch
qemu with some default assumptions.
> **_NOTE:_** The default QEMU configuration needs 4GB of memory available.
> If you get an error message about being unable to allocate memory, try freeing up some RAM.
> If you can't free up 4GB, you can reduce the memory allocation in the `Makefile` from 4096 (4GB) to 2048 (2GB).
> Running QEMU with less than 2GB of memory is not recommended.
Once the image boots you can interact with it either by using the console
(right there in the terminal window from which make run was executed).
Expand All @@ -87,7 +105,9 @@ from containerd - use that instead).
Once in a container you can run the usual xl commands to start VMs and
interact with Xen.

### Custom Config Partition
To exit out of the QEMU environment, press `Ctrl-A + C` to reach the QEMU console, then `q` to quit.

### Customizing the Configuration

As described in [BUILD.md](./docs/BUILD.md) and [REGISTRATION.md](./docs/REGISTRATION.md), a booting EVE looks in its config partition to determine:

Expand All @@ -105,7 +125,7 @@ Note that the directory must exist to be mounted; if not, it will be ignored. Th

## How to use on an ARM board

While running everything on your laptop with qemu could be fun, nothing
While running everything on your laptop with QEMU could be fun, nothing
beats real hardware. The most cost-effective option, not surprisingly,
is ARM. We recommend using HiKey board [http://www.lenovator.com/product/90.html](http://www.lenovator.com/product/90.html).
Once you acquire the board you will need to build an installer image by running
Expand Down
9 changes: 9 additions & 0 deletions api/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,12 @@ The response MUST contain no body content.
Edge Devices are expected to have intermittent connectivity, with limited bandwidth, memory and storage. It is likely that, at some point, a Device will run out of local memory or storage to cache information, logs or metrics messages that need to be sent to a Controller.

The choice of which messages to keep, how long to keep them, which to discard, and how to handle these overflows are implementation-dependent and are NOT specified in this document.

## HTTP MetaData

Edge Devices may send some MetaData in HTTP header to the controller. This will help
the controller side troubleshooting at the HTTP level. The Device UUID can be included
in the HTTP header 'X-Request-ID'. Since the UUID on Device is obtained from the
controller, when the UUID is not available yet, the Device Serial-Number and
Soft-Serial-Number can be included in the HTTP header fields 'X-Serial-Number' and
'X-Soft-Serial' respectively.
1 change: 0 additions & 1 deletion api/go/config/devmodel.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 64 additions & 56 deletions api/go/config/storage.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions api/proto/config/storage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ message SignatureInfo {
}

enum DsType {
DsUnknown = 0;
DsHttp = 1;
DsHttps = 2;
DsS3 = 3;
DsSFTP = 4;
DsUnknown = 0;
DsHttp = 1;
DsHttps = 2;
DsS3 = 3;
DsSFTP = 4;
DsContainerRegistry = 5;
}

message DatastoreConfig {
Expand All @@ -43,14 +44,15 @@ message DatastoreConfig {


enum Format {
FmtUnknown = 0;
RAW = 1;
QCOW = 2;
QCOW2 = 3;
VHD = 4;
VMDK = 5;
OVA = 6;
VHDX = 7;
FmtUnknown = 0;
RAW = 1;
QCOW = 2;
QCOW2 = 3;
VHD = 4;
VMDK = 5;
OVA = 6;
VHDX = 7;
CONTAINER = 8;
}

message Image {
Expand Down
Loading

0 comments on commit d034152

Please sign in to comment.