updated
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/06c8ccb3 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/06c8ccb3 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/06c8ccb3 Branch: refs/heads/trunk Commit: 06c8ccb3d9f65b04ddfeca56cc45976d1211eaea Parents: f263106 Author: andy <andymahe...@gmail.com> Authored: Tue Jun 13 21:50:24 2017 -0400 Committer: andy <andymahe...@gmail.com> Committed: Tue Jun 13 21:50:24 2017 -0400 ---------------------------------------------------------------------- docs/container/drivers/gke.rst | 51 +++++++------------------------- libcloud/test/container/test_gke.py | 3 ++ 2 files changed, 13 insertions(+), 41 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/06c8ccb3/docs/container/drivers/gke.rst ---------------------------------------------------------------------- diff --git a/docs/container/drivers/gke.rst b/docs/container/drivers/gke.rst index d2c5548..930c8c6 100644 --- a/docs/container/drivers/gke.rst +++ b/docs/container/drivers/gke.rst @@ -1,58 +1,27 @@ Google Container Driver Documentation ============================================ -`Google Container Platform`_ is a Docker hosting service, provided by Google. +`Google Container Platform`_ is a Kubernetes hosting service, provided by Google. Docker-native tools and elastic hosts make deploying on Google Cloud as easy as running Docker on your laptop. There is no special software to install or configure. -Mix Docker containers with container-native Linux to extend the benefits of containerization to legacy applications and stateful services. +Mix Kubernetes containers with container-native Linux to extend the benefits of containerization to legacy applications and stateful services. +Examples +-------- -Instantiating the driver ------------------------- - -Download the script:: - - **** - -Now execute the script, substituting the correct values:: - - **** - -This should output something similar to the following:: - - Setting up Docker client for SDC using: - CloudAPI: https://us-east-1.api.joyent.com - Account: jill - Key: /Users/localuser/.ssh/sdc-docker.id_rsa - - If you have a pass phrase on your key, the openssl command will - prompt you for your pass phrase now and again later. - - Verifying GoogleCloudAPI access. - CloudAPI access verified. - - Generating client certificate from SSH private key. - writing RSA key - Wrote certificate files to /Users/localuser/.sdc/docker/jill - - Get Docker host endpoint from cloudapi. - Docker service endpoint is: tcp://us-east-1.docker.joyent.com:2376 +Additional example code can be found in the "demos" directory of Libcloud here: +https://github.com/apache/libcloud/blob/trunk/demos/gce_demo.py - * * * - Success. Set your environment as follows: +1. Getting Driver with Service Account authentication +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - export DOCKER_CERT_PATH=/Users/localuser/.sdc/docker/jill - export DOCKER_HOST=tcp://us-east-1.docker.joyent.com:2376 - export DOCKER_CLIENT_TIMEOUT=300 - export DOCKER_TLS_VERIFY=1 +.. literalinclude:: /examples/compute/gce/gce_service_account.py -.. literalinclude:: /examples/container/joyent/instantiate_driver.py - :language: python API Docs -------- -.. autoclass:: libcloud.container.drivers.joyent.GoogleContainerDriver +.. autoclass:: libcloud.container.drivers.joyent.GKEContainerDriver :members: :inherited-members: http://git-wip-us.apache.org/repos/asf/libcloud/blob/06c8ccb3/libcloud/test/container/test_gke.py ---------------------------------------------------------------------- diff --git a/libcloud/test/container/test_gke.py b/libcloud/test/container/test_gke.py index 5b68de9..faa35c1 100644 --- a/libcloud/test/container/test_gke.py +++ b/libcloud/test/container/test_gke.py @@ -12,6 +12,9 @@ # 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. +""" +Tests for Google Container Engine Driver +""" import datetime import mock