5.3 KiB
Goal 1
On Host 1 - Create a container Uing the API, create a container entry Container status is 'pending' Message queue find this, send it to client
Goal 2
On Host 1 - Create a VM from an image hosted on S3 On host 1 - Create a docker container
Have these 2 devices communicate with one another and the internet No VXLAN or openflow yet
Ultimate goal
On Host 1 - Create a VM from an image hosted on S3 On host 1 - Create a docker container
Have these 2 devices communicate with one another and the internet No VXLAN or openflow yet
OOO Enroll the two hosts Create the Project Create the VDC Create the Network
Create an image entry in the DB Spawn the VM - Request comes in specifying the Image ID Name CPU cores RAM Network ID - Request is processed by server Spawn request is sanitised Job is created in DB with payload containing VM Name VM ID NIC MAC NIC IP NIC Network VNI Image URL(Local file) CPU Cores RAM Job is assigned to a worker Job is picked up by worker Disk is created by copying image from URL\File to known location Network port is created in OVS with known MAC VM is spawned with known name and ID Response sent to server with status of VM
VM launch flow User requests vm launch We create and add networkPort and virtual machine objects to DB Craft the 'create-vm' task to send to the worker accordingly
VM Launch payload { "vdc": "f9640ab7-3e8f-430a-83a7-abd0a2102fa3", "virtual-machines": [ { "name": "test_vm_name", "memory": 2048, "vcpu": 2, "volumes": [ { "name": "disk1", "size_gb": 20, "boot": true, "type": "local", "image":"image id or 'blank'" }, { "name": "disk2", "size_gb": 10, "type": "Ceph" } ], "networks": [ { "id": "{networkID}", "mac":"00:11:22:33:44:55", "ip_address":"192.168.50.124", "open_ports":["tcp/80","udp/81","icmp","tcp/1024-2048","tcp/22:103.104.105.106"] } ], "tags": { "tag1": "value", "tag3": "value" } , "requirements": { "tag": "value" }
}
]
}
Payload sent to worker from API server
{ "worker_id":"UUID(""d266b29d-a888-430d-8873-151c41fd34e3"")", "task_type":"virtual-machine-create", "job_details":{ "virtual_machine_name":"my-vm", "virtual_machine_id":"UUID(""16cb0f4a-d445-48c2-ab53-b8c9821e8c68"")", "desired_state":"running", "virtual_machine_config":{ "memory":2048, "vcpu":2, "volumes":[ { "id":"UUID(""e6553965-6039-44e0-96cb-e0094f3b60be"")", "name":"v1", "size_gb":11.0, "type":"None", "source":"vol.source" }, { "id":"UUID(""7309cd8e-9845-4b16-bae2-092dcb78fbea"")", "name":"v2", "size_gb":12.0, "type":"None", "source":"vol.source" }, { "id":"UUID(""79cafd2e-f29e-4a70-b6f1-2d8ae6d07d05"")", "name":"v3", "size_gb":13.0, "type":"None", "source":"vol.source" } ], "networks":[
]
}
} }
Image \ Volume flow
Create a blank volume locally Input: type: local source: None Output: type: local source: None path: None volume_id: {volumeID}
Create a blank volume on ceph-highspeed Input: type: ceph-highspeed source: None Output type: ceph path: highspeed source: None volume_id: {volumeID}
Create a volume locally from a URL image Input type: local source: {imageID} Output: type: local path: None source: type: image url: http://some-url/image.qcow2?secret=dd checksum: CHECKSUM format: qcow2\raw volume_id: {volumeID}
Create a volume on ceph-nvme from a URL image Input type: ceph-nvme source: {imageID} Output: type: ceph path: nvme source: type: image url: http://some-url/image.qcow2?secret=dd checksum: CHECKSUM format: qcow2\raw volume_id: {volumeID}
Create a volume locally from a ceph-slow image Input type: local source: {imageID} Output: type: local path: None source: type: image url: rbd://volumes-sloq/image7 checksum: CHECKSUM format: raw volume_id: {volumeID}
Create a volume on ceph from a ceph-nvme image
todo
Make the worker connect to websocket before staring libvirt\docker monitors When initlaising the logger enginer(From websocket\worker or api) add an oiptional default off vairable to add request ID to the output