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

Adding: Firecracker Client API Support #1026

Closed

Conversation

mcastelino
Copy link
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.

Gopkg.toml Outdated Show resolved Hide resolved
name = "github.com/go-openapi/runtime"
revision = "aadb2cc7b8862fdab251bf60a8b9d2a951c9746c"


Copy link

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

@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 <[email protected]>
Generate the firecracker models using swagger

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

Signed-off-by: Manohar Castelino <[email protected]>
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 <[email protected]>
Vendor in packages required by firecracker.

Signed-off-by: Manohar Castelino <[email protected]>
@bergwolf
Copy link
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
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
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
Contributor

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

@mcastelino
Copy link
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