Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Adding: Firecracker Client API Support#1026

Closed
mcastelino wants to merge 4 commits into
kata-containers:masterfrom
mcastelino:topic/firecracker-enable
Closed

Adding: Firecracker Client API Support#1026
mcastelino wants to merge 4 commits into
kata-containers:masterfrom
mcastelino:topic/firecracker-enable

Conversation

@mcastelino
Copy link
Copy Markdown
Contributor

Adding the firecracker client API support. This is in preparation of firecracker support in Kata containers.
This includes the swagger definition, auto generated code and the vendoring of packages required by this code.

This does not include the actual implementation of the hypervisor interface which will be done in subsequent commit.

Comment thread Gopkg.toml Outdated
Comment thread Gopkg.toml
name = "github.com/go-openapi/runtime"
revision = "aadb2cc7b8862fdab251bf60a8b9d2a951c9746c"


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Please remove the extra blank line.

Copy link
Copy Markdown

@sboeuf sboeuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just two nits regarding Gopkg.toml.
One global comment regarding the last commit, I think it'd be worth it to explain why firecracker requires those packages and where they're specified. Because looking at the generated client code is not very obvious and convenient :)

Add firecracker swagger definition v2.0 retrieved from
https://github.com/firecracker-microvm/firecracker-go-sdk/blob/master/client/swagger.yaml
at 840c1e37f5f2bbcbff1fdbfcfcea09d0bf158977

This will be used to generate the client code.

Fixes: kata-containers#284

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
Generate the firecracker models using swagger

```
swagger generate model -f ./swagger.yaml --model-package=client/models --client-package=client
```

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
Add the generated operator and client code to interact with
firecracker. The code is generated using the command

```
swagger generate client -f ./swagger.yaml --model-package=client/models --client-package=client
```

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
Vendor in packages required by firecracker.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
@bergwolf
Copy link
Copy Markdown
Member

What's the relationship between this package and the FC client offered by aws team (https://github.com/firecracker-microvm/firecracker-go-sdk)? Is the official one missing some key functionality for us to use?

@egernst
Copy link
Copy Markdown
Member

egernst commented Dec 17, 2018

Looks fine, but you'll need to add some license headers to the added file (see travis-ci failure).

@WeiZhang555
Copy link
Copy Markdown
Member

What's the relationship between this package and the FC client offered by aws team (https://github.com/firecracker-microvm/firecracker-go-sdk)? Is the official one missing some key functionality for us to use?

I have same question with @bergwolf , can we just vendor firecracker client and re-use it?

@jodh-intel
Copy link
Copy Markdown

We could just exclude the licence checks from the auto-generated virtcontainers/pkg/fireclient package by updating:

@mcastelino
Copy link
Copy Markdown
Contributor Author

Closing this in favor of #1044
This directly vendors the firecracker-go-dsk

@mcastelino mcastelino closed this Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants