VMware vSphere Integrated Containers provider (#206)

* 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
This commit is contained in:
Loc Nguyen
2018-06-04 15:41:32 -07:00
committed by Ria Bhatia
parent 98a111e8b7
commit 513cebe7b7
6296 changed files with 1123685 additions and 8 deletions

View File

@@ -0,0 +1,25 @@
Test 3-01 - Docker Compose LEMP Server
=======
# Purpose:
To verify that VIC appliance can work when deploying a LEMP (Linux, Nginx, MySQL, PHP) server
# References:
[1 - Docker Compose Overview](https://docs.docker.com/compose/overview/)
# Environment:
This test requires that a vSphere server is running and available
# Test Steps:
1. Create a compose file that includes an Nginx, MySQL and PHP server with network connections between them
2. Deploy VIC appliance to the vSphere server
3. Issue:
```DOCKER_HOST=<VCH IP> docker-compose up```
4. wget the index file of the site and verify that it contains the default Nginx message
# Expected Outcome:
* Docker compose should return with success and the Nginx server should be running.
* The wget command should successfully return the default Nginx index file.
# Possible Problems:
None

View File

@@ -0,0 +1,34 @@
# Copyright 2016-2017 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
*** Settings ***
Documentation Test 3-01 - Docker Compose LEMP
Resource ../../resources/Util.robot
Suite Setup Install VIC Appliance To Test Server certs=${True}
Suite Teardown Cleanup VIC Appliance On Test Server
*** Test Cases ***
Compose LEMP Server
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} login --username=victest --password=%{REGISTRY_PASSWORD}
Should Be Equal As Integers ${rc} 0
Set Environment Variable COMPOSE_HTTP_TIMEOUT 300
${vch_ip}= Get Environment Variable VCH_IP %{VCH-IP}
Log To Console \nThe VCH IP is %{VCH-IP}
Run cat ${CURDIR}/../../../demos/compose/webserving-app/docker-compose.yml | sed -e "s/192.168.60.130/${vch_ip}/g" > lemp-compose.yml
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file lemp-compose.yml up -d
Log ${output}
Should Be Equal As Integers ${rc} 0

View File

@@ -0,0 +1,25 @@
Test 3-02 - Docker Compose Voting App
=======
# Purpose:
To verify that VIC appliance can work when deploying the example docker voting app
# References:
[1 - Docker Compose Overview](https://docs.docker.com/compose/overview/)
[2 - Docker Example Voting App](https://github.com/docker/example-voting-app)
# Environment:
This test requires that a vSphere server is running and available
# Test Steps:
1. Deploy VIC appliance to the vSphere server
2. Log into the docker hub
3. Issue the following command in the docker voting app folder:
```cd demos/compose/voting-app; COMPOSE_HTTP_TIMEOUT=300 DOCKER_HOST=<VCH IP> docker-compose up```
# Expected Outcome:
Docker compose should return with success and all containers in the compose yaml file are up and running.
Docker inspect data should show networks, alias, and IP address for the container.
# Possible Problems:
None

View File

@@ -0,0 +1,73 @@
# Copyright 2016-2017 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
*** Settings ***
Documentation Test 3-02 - Docker Compose Voting App
Resource ../../resources/Util.robot
Suite Setup Install VIC Appliance To Test Server certs=${True}
Suite Teardown Cleanup VIC Appliance On Test Server
*** Test Cases ***
Compose Voting App
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} login --username=victest --password=%{REGISTRY_PASSWORD}
Should Be Equal As Integers ${rc} 0
Set Environment Variable COMPOSE_HTTP_TIMEOUT 300
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --skip-hostname-check -f ${CURDIR}/../../../demos/compose/voting-app/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f {{.State.Running}} vote
Log ${out}
Should Contain ${out} true
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f {{.State.Running}} result
Log ${out}
Should Contain ${out} true
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f {{.State.Running}} worker
Log ${out}
Should Contain ${out} true
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f {{.State.Running}} db
Log ${out}
Should Contain ${out} true
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f {{.State.Running}} redis
Log ${out}
Should Contain ${out} true
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f '{{range $key, $value := .NetworkSettings.Networks}}{{$key}}{{end}}' vote
Log ${out}
Should Not Be Empty ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f '{{range $key, $value := .NetworkSettings.Networks}}{{index $value "Aliases"}}{{end}}' vote
Log ${out}
Should Contain ${out} vote
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} inspect -f '{{range $key, $value := .NetworkSettings.Networks}}{{index $value "IPAddress"}}{{end}}' vote
Log ${out}
Should Not Be Empty ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output wget %{VCH-IP}:5000
Should Be Equal As Integers ${rc} 0

View File

@@ -0,0 +1,40 @@
Test 3-03 - Docker Compose Basic
=======
# Purpose:
To verify that VIC appliance can work when deploying the most basic example from docker documentation
# References:
[1 - Docker Compose Getting Started](https://docs.docker.com/compose/gettingstarted/)
# Environment:
This test requires that a vSphere server is running and available
# Test Steps:
1. Create a compose file that includes a basic python server and redis server
2. Deploy VIC appliance to the vSphere server
3. Create a basic compose yml file
4. Issue DOCKER_HOST=<VCH IP> docker-compose create
5. Issue DOCKER_HOST=<VCH IP> docker-compose start
6. Issue DOCKER_HOST=<VCH IP> docker-compose logs
7. Issue DOCKER_HOST=<VCH IP> docker-compose stop
8. Issue DOCKER_HOST=<VCH IP> docker-compose up -d
9. Issue DOCKER_HOST=<VCH IP> docker-compose kill redis
10. Issue DOCKER_HOST=<VCH IP> docker-compose down
11. Issue DOCKER_HOST=<VCH IP> docker run -d busybox /bin/top
12. Issue DOCKER_HOST=<VCH IP> docker-compose up -d
13. Create compose file with link
14. Issue DOCKER_HOST=<VCH IP> docker-compose up -d
15. Issue DOCKER_HOST=<VCH IP> docker-compose bundle
16. Issue DOCKER_HOST=<VCH IP> docker-compose --file compose-rename.yml up -d
17. Issue DOCKER_HOST=<VCH IP> docker-compose --file compose-rename.yml up -d --force-recreate
18. Issue DOCKER_HOST=<VCH IP> docker-compose --file compose-rename.yml up -d
19. Issue DOCKER_HOST=<VCH IP> docker-compose up (without -d)
20. Issue DOCKER_HOST=<VCH IP> docker-compose stop on the above container
21. Issue DOCKER_HOST=<VCH IP> docker-compose up (without -d) again
# Expected Outcome:
* Step 4-21 should result in no errors
# Possible Problems:
None

View File

@@ -0,0 +1,132 @@
# Copyright 2016-2017 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
*** Settings ***
Documentation Test 3-03 - Docker Compose Basic
Resource ../../resources/Util.robot
Suite Setup Install VIC Appliance To Test Server certs=${true}
Suite Teardown Cleanup VIC Appliance On Test Server
*** Variables ***
${yml} version: "2"\nservices:\n${SPACE}web:\n${SPACE}${SPACE}image: python:2.7\n${SPACE}${SPACE}ports:\n${SPACE}${SPACE}- "5000:5000"\n${SPACE}${SPACE}depends_on:\n${SPACE}${SPACE}- redis\n${SPACE}redis:\n${SPACE}${SPACE}image: redis\n${SPACE}${SPACE}ports:\n${SPACE}${SPACE}- "5001:5001"
${link-yml} version: "2"\nservices:\n${SPACE}redis1:\n${SPACE}${SPACE}image: redis:alpine\n${SPACE}${SPACE}container_name: redis1\n${SPACE}${SPACE}ports: ["6379"]\n${SPACE}web1:\n${SPACE}${SPACE}image: busybox\n${SPACE}${SPACE}container_name: a.b.c\n${SPACE}${SPACE}links:\n${SPACE}${SPACE}- redis1:aaa\n${SPACE}${SPACE}command: ["ping", "aaa"]
${rename-yml-1} version: "2"\nservices:\n${SPACE}web:\n${SPACE}${SPACE}image: busybox\n${SPACE}${SPACE}command: ["/bin/top"]
${rename-yml-2} version: "2"\nservices:\n${SPACE}web:\n${SPACE}${SPACE}image: ubuntu\n${SPACE}${SPACE}command: ["date"]
${hello-yml} version: "2"\nservices:\n${SPACE}top:\n${SPACE}${SPACE}image: busybox\n${SPACE}${SPACE}container_name: top\n${SPACE}${SPACE}command: ["echo", "hello, world"]
*** Keywords ***
Check Compose Logs
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file link-compose.yml logs
Should Be Equal As Integers ${rc} 0
Should Contain ${output} PING aaa
Should Not Contain ${output} bad address 'aaa'
*** Test Cases ***
Compose basic
Set Environment Variable COMPOSE_HTTP_TIMEOUT 300
Run echo '${yml}' > basic-compose.yml
${rc} ${output}= Run And Return Rc And Output docker %{VCH-PARAMS} network create vic_default
Log ${output}
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml create
Log ${output}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml start
Log ${output}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml logs
Log ${output}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml stop
Log ${output}
Should Be Equal As Integers ${rc} 0
Compose kill
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f basic-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f basic-compose.yml kill redis
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f basic-compose.yml down
Log ${out}
Should Be Equal As Integers ${rc} 0
Compose Up while another container is running (ps filtering related)
${rc} ${out}= Run And Return Rc And Output docker %{VCH-PARAMS} run -d busybox /bin/top
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f basic-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml down
Log ${output}
Should Be Equal As Integers ${rc} 0
Compose Up with link
Run echo '${link-yml}' > link-compose.yml
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file link-compose.yml up -d
Log ${output}
Should Be Equal As Integers ${rc} 0
Wait Until Keyword Succeeds 10x 10s Check Compose Logs
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file link-compose.yml down
Log ${output}
Should Be Equal As Integers ${rc} 0
Compose bundle creation
${rc} Run And Return Rc docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml pull
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml bundle
Log ${output}
Should Contain ${output} Wrote bundle
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file basic-compose.yml down
Log ${output}
Should Be Equal As Integers ${rc} 0
Compose up -d --force-recreate
Run echo '${rename-yml-1}' > compose-rename.yml
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file compose-rename.yml up -d
Log ${output}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file compose-rename.yml up -d --force-recreate
Log ${output}
Should Be Equal As Integers ${rc} 0
Compose up -d with a new image
Run echo '${rename-yml-2}' > compose-rename.yml
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file compose-rename.yml up -d
Log ${output}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} --file compose-rename.yml down
Log ${output}
Should Be Equal As Integers ${rc} 0
Compose up in foreground (attach path)
Run echo '${hello-yml}' > hello-compose.yml
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f hello-compose.yml pull
Should Be Equal As Integers ${rc} 0
Log ${output}
# Bring up the compose app and wait till they're up and running
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f hello-compose.yml up
Log ${output}
Should Contain ${output} hello, world
${rc} ${output}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f hello-compose.yml down
Log ${output}
Should Be Equal As Integers ${rc} 0

View File

@@ -0,0 +1,179 @@
# Copyright 2017 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
*** Settings ***
Documentation Test 3-04 - Compose fixtures
Resource ../../resources/Util.robot
Suite Setup Install VIC Appliance To Test Server
Suite Teardown Cleanup VIC Appliance On Test Server
*** Test Cases ***
Command
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/command/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/command/docker-compose.yml down
Container Name
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/container_name/docker-compose.yml up
Log ${out}
Should Be Equal As Integers ${rc} 0
Should Contain ${out} my-web-container exited with code 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/container_name/docker-compose.yml down
Depends On
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/depends_on/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/depends_on/docker-compose.yml down
Env File
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/env-file/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/env-file/docker-compose.yml down
Environment
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/environment-composefile/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/environment-composefile/docker-compose.yml down
Extends
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/extends/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/extends/docker-compose.yml down
Group Add
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/group_add/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/group_add/docker-compose.yml down
Labels
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/labels/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/labels/docker-compose.yml down
Links
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/links-composefile/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/links-composefile/docker-compose.yml down
Networks
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/docker-compose.yml down
Networks- Default
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/default-network-config.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/default-network-config.yml down
Networks- External Default
${rc} ${out}= Run And Return Rc And Output docker %{COMPOSE-PARAMS} network create composetest_external_network
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/external-default.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/external-default.yml down
Networks-Bridge
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/bridge.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/bridge.yml down
Networks-External
${rc} ${out}= Run And Return Rc And Output docker %{COMPOSE-PARAMS} network create networks_foo
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{COMPOSE-PARAMS} network create networks_bar
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/external-networks.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/external-networks.yml down
Networks-Label
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/network-label.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/network-label.yml down
Networks-mode
${status}= Get State Of Github Issue 4541
Run Keyword If '${status}' == 'closed' Fail Test 1-1-Docker-Info.robot needs to be updated now that Issue #4541 has been resolved
#${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/network-mode.yml up -d
#Log ${out}
#Should Be Equal As Integers ${rc} 0
#${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/network-mode.yml down
Networks-static-address
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/network-static-addresses.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/networks/network-static-addresses.yml down
Ports
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/ports-composefile/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/ports-composefile/docker-compose.yml down
Stop Signal
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/stop-signal-composefile/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/stop-signal-composefile/docker-compose.yml down
Volumes
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/volumes/docker-compose.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/volumes/docker-compose.yml down
Volumes - External volumes
${rc} ${out}= Run And Return Rc And Output docker %{COMPOSE-PARAMS} volume create --name foo
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{COMPOSE-PARAMS} volume create --name bar
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker %{COMPOSE-PARAMS} volume create --name some_bar
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/volumes/external-volumes.yml up -d
Log ${out}
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/volumes/external-volumes.yml down
Volumes - Label
${status}= Get State Of Github Issue 4540
Run Keyword If '${status}' == 'closed' Fail Test 1-1-Docker-Info.robot needs to be updated now that Issue #4540 has been resolved
#${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/volumes/volume-label.yml up -d
#Log ${out}
#Should Be Equal As Integers ${rc} 0
#${rc} ${out}= Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS} -f %{GOPATH}/src/github.com/vmware/vic/tests/resources/dockerfiles/configs/volumes/volume-label.yml down

View File

@@ -0,0 +1,10 @@
Group 3 - Docker Compose
=======
[Test 3-01 - Docker Compose LEMP Server](3-01-Docker-Compose-LEMP.md)
-
[Test 3-02 - Docker Compose Voting App](3-02-Docker-Compose-Voting-App.md)
-
[Test 3-03 - Docker Compose Basic](3-03-Docker-Compose-Basic.md)
-