You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Magnus Andersson (JIRA)" <ji...@apache.org> on 2014/05/25 19:57:01 UTC

[jira] [Updated] (LIBCLOUD-562) Add support for Google-Containers project for VM Images

     [ https://issues.apache.org/jira/browse/LIBCLOUD-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Magnus Andersson updated LIBCLOUD-562:
--------------------------------------

    Description: 
Recently Google have released a google VM Image that comes with docker preinstalled and supports docker provisioning via metadata.

Toady in libcloud both debian and centos images are supported by matching against the VM name and then injecting the appropiate project name (debian-cloud and centos-cloud).

To support Google Containers the method needs to look as follows for release 0.14.1 of libcloud:

{code:title=gce.py|borderStyle=solid}
    def ex_get_image(self, partial_name):
        if (partial_name.startswith('https://') or partial_name.startswith('projects/google-containers/global/images/')):
            response = self.connection.request(partial_name, method='GET')
            return self._to_node_image(response.object)

        image = self._match_images(None, partial_name)
        if not image:
            if partial_name.startswith('debian'):
                image = self._match_images('debian-cloud', partial_name)
            elif partial_name.startswith('centos'):
                image = self._match_images('centos-cloud', partial_name)
            elif partial_name.startswith('container-vm'):
                image = self._match_images('google-containers', partial_name)

        return image
{code}

  was:
Recently Google have released a google VM Image that comes with docker preinstalled and supports docker provisioning via metadata.

Toady in libcloud both debian and centos images are supported by matching against the VM name and then injecting the appropiate project name (debian-cloud and centos-cloud).

To support Google Containers the method needs to look as follows in file gce.py for release 0.14.1 of libcloud:

    def ex_get_image(self, partial_name):
        if (partial_name.startswith('https://') or partial_name.startswith('projects/google-containers/global/images/')):
            response = self.connection.request(partial_name, method='GET')
            return self._to_node_image(response.object)

        image = self._match_images(None, partial_name)
        if not image:
            if partial_name.startswith('debian'):
                image = self._match_images('debian-cloud', partial_name)
            elif partial_name.startswith('centos'):
                image = self._match_images('centos-cloud', partial_name)
            elif partial_name.startswith('container-vm'):
                image = self._match_images('google-containers', partial_name)

        return image



> Add support for Google-Containers project for VM Images
> -------------------------------------------------------
>
>                 Key: LIBCLOUD-562
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-562
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Compute
>            Reporter: Magnus Andersson
>
> Recently Google have released a google VM Image that comes with docker preinstalled and supports docker provisioning via metadata.
> Toady in libcloud both debian and centos images are supported by matching against the VM name and then injecting the appropiate project name (debian-cloud and centos-cloud).
> To support Google Containers the method needs to look as follows for release 0.14.1 of libcloud:
> {code:title=gce.py|borderStyle=solid}
>     def ex_get_image(self, partial_name):
>         if (partial_name.startswith('https://') or partial_name.startswith('projects/google-containers/global/images/')):
>             response = self.connection.request(partial_name, method='GET')
>             return self._to_node_image(response.object)
>         image = self._match_images(None, partial_name)
>         if not image:
>             if partial_name.startswith('debian'):
>                 image = self._match_images('debian-cloud', partial_name)
>             elif partial_name.startswith('centos'):
>                 image = self._match_images('centos-cloud', partial_name)
>             elif partial_name.startswith('container-vm'):
>                 image = self._match_images('google-containers', partial_name)
>         return image
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)