blob: 6c55a67f9759bbf69ab5b1d85722db028f2cba87 [file] [log] [blame]
= Installation on Google Kubernetes Engine (GKE)
:page-toclevels: 3
include::partial$include.adoc[]
To install Akka Cloud Platform on Google Kubernetes Engine (GKE), you must have a Google Cloud Platform account and a project.
If you are a first time GCP user, please follow these steps:
. Get started with Google Cloud Platform here: https://cloud.google.com/gcp/getting-started[https://cloud.google.com/gcp/getting-started {tab-icon}, window="tab"].
. Create your Google account at https://console.cloud.google.com[https://console.cloud.google.com {tab-icon}, window="tab"].
. Sign up for an active plan and setup billing. You can start with Free tier, follow instructions at https://cloud.google.com/free[https://cloud.google.com/free {tab-icon}, window="tab"].
. Create a project.
. Link your billing account to the project at https://console.cloud.google.com/billing/projects[https://console.cloud.google.com/billing/projects {tab-icon}, window="tab"].
. Install the Google Cloud SDK from https://cloud.google.com/sdk/docs/install[https://cloud.google.com/sdk/docs/install {tab-icon}, window="tab"] which contains the `gcloud` CLI.
See https://cloud.google.com/compute/docs/console[https://cloud.google.com/compute/docs/console {tab-icon}, window="tab"] for more information about the the browser-based Google Cloud Console tool. Documentation for the `gcloud` CLI can be found here: https://cloud.google.com/compute/docs/gcloud-compute[https://cloud.google.com/compute/docs/gcloud-compute {tab-icon}, window="tab"].
== Account configuration
The Akka Operator manages ingress into your HTTP and GRPC endpoints via cloud-native controllers, which requires a VPC-native cluster. Please find instructions at https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips[https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips {tab-icon}, window="tab"] to setup a VPC-native cluster. You can read about the benefits of a VPC-native cluster at https://cloud.google.com/kubernetes-engine/docs/concepts/alias-ips[https://cloud.google.com/kubernetes-engine/docs/concepts/alias-ips {tab-icon}, window="tab].
With your account, project, and cluster ready, open the {gcp-marketplace}[Akka Cloud Platform {tab-icon}], or go to https://console.cloud.google.com/kubernetes/application[Kubernetes Engine Applications {tab-icon}, window="tab"] and search for "Akka Cloud Platform”. When you are on the product page, go ahead and purchase a plan.
Once you've purchased a plan to use the Akka Cloud Platform, proceed to configure it, click `Configure`. Make sure you have a project selected on the GUI or the options to purchase and configure will be disabled.
== Deploy from marketplace
Complete the configuration of the Akka Cloud Platform by filling in a few fields in the Tab "Click to Deploy on GKE":
. A Namespace — Keeping the Marketplace offering in a specific namespace will ease follow up operations and will enforce separation of concerns.
. An App instance name — Select a unique name. We recommend using the default or `akka-platform-operator-1`.
. The akka-operator.serviceAccount.name — This is the name of the service account used by the operator to access Kubernetes resources.
. The Reporting Service Account — This is the service account used for reporting data to Google.
. Take a moment to review all the permissions the Akka Cloud Platform operator will use in order to operate your applications.
. Click `Deploy`.
. After clicking `Deploy` the Google console navigates to the `Application starting` page. Wait for the application components to deploy.
. From a terminal, login to your project using the `gcloud` CLI, you can find quick-start instructions at https://cloud.google.com/sdk/docs/quickstart[https://cloud.google.com/sdk/docs/quickstart {tab-icon}, window="tab"].
. Navigate to https://console.cloud.google.com/kubernetes/application, click on the cluster name for the Akka Cloud Platform application, click on the `CONNECT` button, copy the gcloud command for command line access, an example of it is shown below:
[source,shell script]
----
gcloud container clusters get-credentials acp-cluster-1 \
--zone us-west1-a \
--project shopping-cart
----
Paste the command you copied from the Google console into a terminal to connect to the Kubernetes cluster. You are now ready to start using the Akka Cloud Platform.
== Deploy from command line
Complete the configuration of the Akka Cloud Platform switching to the Tab "Deploy via command line" and following those additional steps:
. Generate a license key and save it to the disk (e.g. `license.yaml`).
. If it doesn't exists already create the namespace you want to work in (e.g. `lightbend`):
+
[source,shell script]
----
kubectl create namespace lightbend
----
. Install the license key into the namespace:
+
[source,shell script]
----
kubectl apply -f license.yaml --namespace lightbend
----
. The output will be similar to the following snippet. Take note of the secret name for future reference, in the case below the name is: `akka-cloud-platform-1-license`.
+
[source,shell script]
----
secret/akka-cloud-platform-1-license created
----
. Install the GCP Marketplace `applications` CRD in the cluster, if it's not already installed (e.g. this is the first time you are installing an application from the Marketplace to the reference cluster):
+
[source,shell script]
----
kubectl apply -f "https://raw.githubusercontent.com/GoogleCloudPlatform/marketplace-k8s-app-tools/master/crd/app-crd.yaml"
----
. Verify the latest version already published to GCP https://console.cloud.google.com/gcr/images/cloud-marketplace/GLOBAL/lightbend-public/akka-cloud-platform?gcrImageListsize=30[here] and take note of the it.
. Update the Akka Microservices CRD to latest:
+
[source,shell script,subs="attributes+"]
----
kubectl apply -f https://raw.githubusercontent.com/lightbend/akka-operator-helm/v{akka-cloud-platform-version}/akka-operator/crds/v1/akka-microservices-crd.yml # <1>
----
<1> `v{akka-cloud-platform-version}` is the latest available version published to GCP (see steps above)
. Add the Akka Operator Helm repository and update the local index:
+
[source,shell script]
----
helm repo add akka-operator-helm https://lightbend.github.io/akka-operator-helm/
helm repo update
----
. Install the latest version with the command:
+
[source,shell script,subs="attributes+"]
----
helm install akka-operator akka-operator-helm/akka-operator \
--namespace lightbend \
--version={akka-cloud-platform-version} \ # <1>
--set provider.name=gcp \
--set reportingSecret=akka-cloud-platform-1-license # <2>
----
<1> `{akka-cloud-platform-version}` is the latest available version published to GCP (see steps above)
<2> `akka-cloud-platform-1-license` is the previously created secret name (see steps above)
== Upgrading the Akka Cloud Platform on GKE
Upgrading of Akka Cloud Platform is only supported using the command line option.
Using the Marketplace UI you forcefully need to uninstall first and install back again Application.
. Verify the version you want to deploy is already published to GCP https://console.cloud.google.com/gcr/images/cloud-marketplace/GLOBAL/lightbend-public/akka-cloud-platform?gcrImageListsize=30[here] and take note of the it.
. Update the Akka Microservices CRD to latest:
+
[source,shell script,subs="attributes+"]
----
kubectl apply -f https://raw.githubusercontent.com/lightbend/akka-operator-helm/v{akka-cloud-platform-version}/akka-operator/crds/v1/akka-microservices-crd.yml # <1>
----
<1> `v{akka-cloud-platform-version}` is the version published to GCP (see steps above)
. Add the Akka Operator Helm repository and update the local index:
+
[source,shell script]
----
helm repo add akka-operator-helm https://lightbend.github.io/akka-operator-helm/
helm repo update
----
. Upgrade with the command:
+
[source,shell script,subs="attributes+"]
----
helm upgrade akka-operator akka-operator-helm/akka-operator \
--namespace lightbend \
--version={akka-cloud-platform-version} \ # <1>
--set provider.name=gcp \
--set reportingSecret=akka-cloud-platform-1-license # <2>
----
<1> `{akka-cloud-platform-version}` is the version published to GCP (see steps above)
<2> `akka-cloud-platform-1-license` is the previously created secret name (see steps above)
== Delete a Kubernetes cluster
You can use the https://console.cloud.google.com/kubernetes/list[GCP GUI {tab-icon}, window="tab"] to delete the cluster.