* Add Virtual Kubelet provider for VIC Initial virtual kubelet provider for VMware VIC. This provider currently handles creating and starting of a pod VM via the VIC portlayer and persona server. Image store handling via the VIC persona server. This provider currently requires the feature/wolfpack branch of VIC. * Added pod stop and delete. Also added node capacity. Added the ability to stop and delete pod VMs via VIC. Also retrieve node capacity information from the VCH. * Cleanup and readme file Some file clean up and added a Readme.md markdown file for the VIC provider. * Cleaned up errors, added function comments, moved operation code 1. Cleaned up error handling. Set standard for creating errors. 2. Added method prototype comments for all interface functions. 3. Moved PodCreator, PodStarter, PodStopper, and PodDeleter to a new folder. * Add mocking code and unit tests for podcache, podcreator, and podstarter Used the unit test framework used in VIC to handle assertions in the provider's unit test. Mocking code generated using OSS project mockery, which is compatible with the testify assertion framework. * Vendored packages for the VIC provider Requires feature/wolfpack branch of VIC and a few specific commit sha of projects used within VIC. * Implementation of POD Stopper and Deleter unit tests (#4) * Updated files for initial PR
4.3 KiB
4.3 KiB
Test 1-04 - Docker Create
Purpose:
To verify that docker create command is supported by VIC appliance
References:
1 - Docker Command Line Reference
Environment:
This test requires that a vSphere server is running and available
Test Steps:
- Deploy VIC appliance to vSphere server
- Docker pull busybox
- Issue docker create busybox to the new VIC appliance
- Issue docker create -t -i busybox to the new VIC appliance
- Issue docker create --name test1 busybox to the new VIC appliance
- Issue docker create -v /var/log busybox ls /var/log to the new VIC appliance
- Issue docker start to the new VIC appliance
- Issue docker logs to the new VIC appliance
- Issue docker create -v test-named-vol:/testdir busybox
- Issue docker start
- Issue docker logs to grab the disk size of the volume
- Issue docker create -v /dir:/dir busybox
- Create a named volume
- Create a mongo container with the above named volume (mapped to an image volume path) and an anonymous volume
- Inspect the above container and obtain the HostConfig.Binds field
- Inspect the above container and obtain the Config.Volumes field
- Issue docker create busybox /bin/top to the new VIC appliance
- Issue docker create fakeimage to the new VIC appliance
- Issue docker create fakeImage to the new VIC appliance
- Issue docker create --name busy1 busybox /bin/top to the new VIC appliance
- Issue docker start busy1 to the new VIC appliance
- Issue docker create --link busy1:busy1 --name busy2 busybox ping -c2 busy1 to the new VIC appliance
- Issue docker start busy2 to the new VIC appliance
- Issue docker logs busy2 to the new VIC appliance
- Create a container, rm the container, then create another container
- Create a container directly without pulling the image first for an image that hasn't been pulled yet
- Create a container without specifying a command
- Create a container with a custom amount of CPUs
- Create a container with a custom amount of Memory in GB
- Create a container with a custom amount of Memory in MB
- Create a container with a custom amount of Memory in KB
- Create a container with a custom amount of Memory in Bytes
- Create a container using a rest api call without HostConfig in the form data
- Create a container, then check the vm display name in vsphere through govc
- Create a container, then check the vm Destroy_Task method is disabled in VC through govc
- Create two containers with the same name in parallel, then check that only one attempt is successful
- Remove the container from Step 32 by name and create another container with the same name
Expected Outcome:
- Steps 3-7 should all return without error and printing the container ID on return
- Step 8 should show that the contents of the containers /var/log matches the contents of the hosts /var/log
- Steps 9, 10 and 11 should return without errors and should successfully create a new volume called
test-named-volwith disk size 975.9M - Step 12 should return with the error message - Error response from daemon: vSphere Integrated Containers does not support mounting directories as a data volume.
- Steps 13 and 14 should succeed
- Step 15's and 16's output should contain the named volume created in Step 13
- Step 18 should return with the error message - Error: image library/fakeimage not found
- Step 19 should return with the error message - Error parsing reference: "fakeImage" is not a valid repository/tag
- Step 22 should result in success and the busy2 container should exist
- Step 24 should show that busy2 was able to successfully ping busy1 just using the linked name
- Step 25 should result in success for all three parts
- Step 26 should return without error
- Step 27 should return with the following error message - Error response from daemon: No command specified
- Steps 28-32 should return without error.
- Step 33 should return without error.
- Step 34 should show that the VM display name equals to containerName-containerShortID and datastore folder name equal to containerID
- Step 35 should show that the VM Destroy_Task method is disabled in VC
- Step 36 should have one container create process succeed and the other fail with an error
- Step 37 should succeed
Possible Problems:
None