Deploy App Studio Enterprise to a Fusion 5 Cluster (GKE)
This article explains how to deploy App Studio Enterprise (ASE) to an existing Fusion 5 cluster in Google Kubernetes Engine (GKE) without using the Webapps service.
Before completing this guide, ensure that your
fusion.conf file points to the IP or URI and port of the proxy service.
Run the App Studio Enterprise application locally and verify functioning security and search features with the cluster you are deploying to.
Prepare the package
Package your app into a single JAR file:
App Studio Enterprise includes a
dockerfile. Create the App Studio Enterprise Docker image:
docker build PATH -t APP_NAME
Set or replace
APP_NAMEwith the name of your application. Replace
PATHwith the path to build from.
You can test the Docker image locally with the following command:
docker run -it -p LOCAL_PORT:8080 APP_NAME
Set or replace
LOCAL_PORTwith the port on your local machine that can access the app. Replace
APP_NAMEwith the ASE application name.
Publish the image
You can publish the Docker image anywhere that supports Docker images. This section explains how to publish a Docker image to Google Kubernetes Engine.
Tag your container for the registry:
docker tag APP_NAME gcr.io/PROJECT_NAME/APP_NAME
Push your Docker image to the Google Container Registry:
docker push gcr.io/PROJECT_NAME/APP_NAME
Verify the image:
gcloud compute instances list
Deploy the app to a cluster
After publishing your ASE Docker image, deploy the image to a cluster. Your existing Fusion 5 cluster is a good choice.
Switch the context to your Fusion 5 cluster:
gcloud container clusters get-credentials CLUSTER_NAME
CLUSTER_NAMEwith your existing Fusion 5 cluster’s name.
Create a deployment in your cluster using the image you published:
kubectl create deployment APP_NAME --image=gcr.io/PROJECT_NAME/APP_NAME:latest
Create an Ingress resource
After deploying the app, create an Ingress resource for your ASE instance. If you require more Ingress rules, your Ingress resource will look different. Learn more about Ingress resources.
Use the following command to create a minimal Ingress resource:
cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: ase-ingress spec: backend: serviceName: $AppName servicePort: 80 EOF
Verify the Ingress resource:
kubectl get ingress ase-ingress