Cloud Platform Integration - LivePersonInc/ephemerals GitHub Wiki

Ephemeral instances can be launched on any cloud platform that supports our Deployment Providers.

Google Container Engine (GKE)

Google's Cloud Platform GKE (container engine) uses Kubernetes to manage containers cluster-wide.

In order to integrate Ephemerals with GKE, you will first need setup a new container cluster using a Google Cloud account. For more details on how to setup the cluster, refer to following instructions from Kubernetes documentation.

Once a container cluster is ready, we need to get details about its Kubernetes host and then initialize KubernetesDeploymentHandler with Kubernetes host details.

DeploymentHandler kubernetesDeploymentHandler = new KubernetesDeploymentHandler.Builder(
                new KubernetesService.Builder()
                        .withHost(KUBERNETES_HOST)
                        .withTrustCerts(KUBERNETES_TRUSTCERTS)
                        .withUsername(KUBERNETES_USERNAME)
                        .withPassword(KUBERNETES_PASSWORD)
                        .withNamespace(KUBERNETES_NAMESPACE)
                        .build())
                .build())

Kubernetes Service Types

More info about different service types in GCP: http://kubernetes.io/docs/user-guide/services/#publishing-services---service-types

###NodePort

By default, Ephemeral's Kubernetes Provider will use NodePort service type for exposing the deployment endpoint. In such case, you will need to add a firewall rule to access any NodePort endpoint by allowing outgoing traffic for NodePort range [default: 30000-32767].

###Load Balancer You can choose to use LoadBalancer service type by overriding the KubernetesDeploymentConfiguration service parameter instance:

new KubernetesDeploymentContext(
                    kubernetesDeploymentHandler
                    ,
                    new KubernetesDeploymentConfiguration.Builder()
                            .withServiceType(KubernetesServiceType.LOAD_BALANCER)
                            .build()))
                    .build());

No firewalls rules needed in LoadBalancer service type.

Ephemeral instances will now be deployed to Google's Container Engine cluster.