-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployments subsystem #12284
Deployments subsystem #12284
Conversation
@gabrielmougard havent look at the code yet, but one thing I can say is that the top-level spec https://docs.google.com/document/d/1o4IH8mZgoRgD04buNYrXUB-ScPoiy3Nl2EbiTLu9hpU/edit#heading=h.vvl3wabtfsfn replaced "instance sets" with "shapes", so we should update the LXD specific spec and the implementation to reference shapes rather than instance sets. |
I'll change that thanks. And I'll also update the spec for the future work |
ce0d6f5
to
bb6b490
Compare
728c655
to
d18d730
Compare
6710dd7
to
19f6d38
Compare
59c342f
to
7c919c9
Compare
77fd6a6
to
8807f0c
Compare
@gabrielmougard You can use this commit to get tests to pass 77fd6a6 There are a few changes:
|
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
…oyment Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
…s deployment access Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
…XD instance Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
8807f0c
to
76c876b
Compare
thanks @markylaing ! |
No worries 👍 @gabrielmougard we'll have to have a discussion about authorization before this is merged as we'll need to perform a migration (in this case a simple one thankfully, as we're just adding new types to the model) |
Yep agreed! |
Closing for now but please keep the branch you have. |
This is based on #11577
Deployment subsystem
(Work In Progress) This is the initial work to introduce the so-called Deployment API for LXD.
Forum specification : https://discourse.ubuntu.com/t/introducing-the-deployment-api/38854
Database schemas
These are the new SQL tables:
Important deployment lifecycle scenarios
Creating a Deployment
Adding Shapes to a Deployment
Governor reconciling with a deployment size requirements
Deployment key lifecycle
API routes
deployments related:
recursion
URL parameter will return a list of the deployment URLs,recursion=1
will return the list of the deployment API objects.shapes related:
recursion
URL parameter will return a list of the shape URLs for a given deployment,recursion=1
will return the list of the shape API objects for a given deployment.shape_instances related:
recursion
URL parameter will return a list of the instance URLs,recursion=1
will return the list of the instance API objects.instanceName
) within this shape. If the shape current size allow a one unit add-up, then the to-be-created instance will be launched using the shapeinstance_template
.CLI
TODO - features
// TODO
lxd/deployments/deployment.go
for shape and dep key and remove useless DB methods (e.g: DeleteDeployedInstance, because of the cascade relationship with theinstances
table)scaling_current
(for one or multiple deployment shapes)shapes
->deployment_shapes
,shape_instances
->deployment_shape_instances
deployment_keys
in this PR as well--from-profile <profile>
flag would be nice when creating the deployment shape)TODO - integration tests
deployment
deployment
creation:--description
flag--governor-webhook-url
flagdeployment
list: with csv, json,yaml formatdeployment
show: we need to have a complete deployment with config, shapes(+config and instance template), deployment keysdeployment
get: on config key and properties - with good and bad casesdeployment
set/unset: on config key and properties - with good and bad casesdeployment
edit : edit a good config and then get+show to know its effective.deployment
rename: good and bad namesdeployment
delete:deployment key
deployment key
creation:--description
flag--role
flagdeployment key
list: with csv, json,yaml format (match the access keys)deployment key
show: check that we have access key but no secret keydeployment key
get/set/unset/edit: only easy fields (properties not config) and should be impossible to set/unset access keydeployment key
rename: good and bad namesdeployment key
delete: existing and non existing casesdeployment shape
deployment_shape
creation:--description
flag--scaling-min
,--scaling-max
,--from-profile
flagdeployment_shape
list: with csv, json,yaml formatdeployment_shape
show: we need to have a complete deployment with config, instance templatedeployment_shape
get: on config key and properties - with good and bad casesdeployment_shape
set/unset: on config key and properties - with good and bad casesdeployment_shape
edit : edit a good config and then get+show to know its effective.deployment_shape
rename: good and bad namesdeployment_shape
delete:deployment shape instance
deployment shape instance
launch: launch on bad deployment name, bad shape name, bad instance name, launch with bad scaling check, launch good casedeployment shape instance
delete: delete on bad deployment name, bad shape name, bad instance name, delete with bad scaling check, delete good casedeployment shape instace
list: list deployed instances on bad deployment name, bad shape name, bad instance name, list good caseReal user cases
rw
, other withro
access), spin up a minimal VM with LXD installed in it, go in it and add the host LXD as a remote, in this same VM try to call the JWT protected route with our private / public keys (how to do that in bash ? we can install this go-jwt cmd tool maybe) and play with governor facing calls to scale up and down.