Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Get up and running with a few clicks! To install SAMi application to a Google Kubernetes Engine cluster using Google Cloud Marketplace, click on - Deploy SAMi on GCP Marketplace.

The below SAMi page is loaded on clicking the above link or when the Configure button is clicked on SAMi listing in the GCP marketplace.

...

with Product details & purchase choice is displayed in the GCP marketplace.

...

Proceed by clicking on Purchase button, follow the rest of the steps as guided on UI to enter related & relevant valid information. Post completion of the previous steps, the product details page is loaded. To access the deployment page, click on the "Configure" button as seen below -

Screenshot 2024-04-03 at 10.48.37 AM-20240419-064132.pngImage Added

Screenshot 2024-04-03 at 12.01.05 PM-20240419-064214.pngImage Added The image provided showcases the deployment page for the SAMi application, highlighting several key fields:

...

Info

The application fundamentally uses PostgreSQL as its underlying database and the EMBEDDED database . Should you opt to use your database, simply disable this toggle and fill in the fields numbered 9 to 12 with your database detailsshould be installed as a part of the deployment in the current version

  • Postgres Database Hostname for Apigee Edge (OPTIONAL): The hostname of the PostgreSQL database for application connectivity.

  • Postgres Database Name for Apigee Edge (OPTIONAL): Database name used for application connectivity.

  • Postgres Username for Apigee Edge (OPTIONAL): Username for connecting the application to the PostgreSQL database.

  • Postgres Database Password for Apigee Edge (OPTIONAL): Password for the PostgreSQL database connection.

Info

The database configuration below can be same as the above database configurations.

  • Postgres Database Hostname for Apigee X/Hybrid/PayG (OPTIONAL): The hostname of the PostgreSQL database for application connectivity.

  • Postgres Database Name for Apigee X/Hybrid/PayG (OPTIONAL): Database name used for application connectivity.

  • Postgres Username for Apigee X/Hybrid/PayG (OPTIONAL): Username for connecting the application to the PostgreSQL database.

  • Postgres Database Password for Apigee X/Hybrid/PayG (OPTIONAL): Password for the PostgreSQL database connection.

  • Reporting Service Account: This dropdown menu facilitates the selection of a service account for reporting purposes. It authenticates and accesses GCP services to generate reports.

Note: Hostname, and database name may contain only the ASCII letters a through z (in a case-insensitive manner), the digits 0 through 9, and the hyphen character ('-').

...

Configure gcloud as a Docker credential helper:

Code Block

language bash

Code Block
gcloud auth configure-docker

  • Create a Google Kubernetes Engine cluster

Create a cluster from command-line. If you already have a cluster that you want to use, skip this step. Use region-appropriate zones for the deployment, below is an example. For more information on setting the right zone, please refer to https://cloud.google.com/compute/docs/gpus/gpu-regions-zones.

Code Block
export CLUSTER=sami-cluster
export ZONE=us-west1-a

...

Code Block
kubectl apply -f "https://raw.githubusercontent.com/GoogleCloudPlatform/marketplace-k8s-app-tools/master/crd/app-crd.yaml"

You need to run this command The command has to be executed once for each cluster chosen for deployment.

The Application resource is defined by the Kubernetes SIG-apps community. The source code can be found on github.com/kubernetes-sigs/application.

...

Navigate to the SAMi directory:

Code Block

languagebash

Code Block
cd click-to-deploy/k8s/SAMi

Configure the app with environment variables

Choose an instance name and namespace for the app. In most cases, you can use the default namespace.

Code Block

language bash

Code Block
export APP_INSTANCE_NAME=sami-platform
export NAMESPACE=sami-platform

Set up the image tag:

It is advised to use stable image reference which you can find on Marketplace Container Registry. Example:

Code Block

languagebash

Code Block
export TAG="3.0"

Configure the container images:

Code Block

languagebash

Code Block
export SOURCE_REGISTRY="gcr.io/cloud-marketplace/sidgs-sami-public/sami"
export IMAGE_SAM_MODULES="${SOURCE_REGISTRY}/sam-modules"
export IMAGE_SAM_PORTAL_ELASTICSEARCH="${IMAGE_REGISTRY}/sam-portal-elasticsearch"
export IMAGE_SAM_WEB_SERVER="${IMAGE_REGISTRY}/sam-web-server"
export IMAGE_SKY_API="${SOURCE_REGISTRY}/sky-api"
export IMAGE_SKY_GATEWAY="${SOURCE_REGISTRY}/sky-gateway"
export IMAGE_SKY_OPDK_EVENT_PROCESSOR="${SOURCE_REGISTRY}/sky-opdk-event-processor"
export IMAGE_SKY_OPDK_SYNC_JOB="${SOURCE_REGISTRY}/sky-opdk-sync-job"
export IMAGE_SKY_PROXY_GEN="${SOURCE_REGISTRY}/sky-proxy-gen"
export IMAGE_SKY_PUBHUB_API="${SOURCE_REGISTRY}/sky-pubhub-api"
export IMAGE_SKY_PUBHUB_EVENT_PROCESSOR="${SOURCE_REGISTRY}/sky-pubhub-event-processor"
export IMAGE_SKYLINE_ACTIVEMQ="${SOURCE_REGISTRY}/skyline-activemq"
export IMAGE_UBBAGENT="${SOURCE_REGISTRY}/ubbagent"

Code Block

language bash

Code Block
export PORTALDB_USER=<db-username>
export PORTALDB_PASSWORD=<db-password>
export PORTALDB_URL=<db-url>
export NGINX_DOMAIN=<domain-name> 
export DB_HOST=<db-hostname>
export DB_NAME=<db-name>

...

Expand the manifest template

Code Block

language bash

Code Block
helm template $APP_INSTANCE_NAME chart/sami-platform \
  --namespace $NAMESPACE \
  --set "ubbAgent.image=$IMAGE_UBBAGENT"\
  --set "sam-portal-chart.nginx.image.repository=$IMAGE_SAM_WEB_SERVER"\
  --set "sam-portal-chart.elasticsearch.image.repository=$IMAGE_SAM_PORTAL_ELASTICSEARCH"\
  --set "sam-portal-chart.liferay.modules.image.repository=$IMAGE_SAM_MODULES"\
  --set "sky-gateway-api-chart.image.initRepository=$IMAGE_SAM_MODULES"\
  --set "sky-gateway-api-chart.image.repository=$IMAGE_SKY_GATEWAY"\
  --set "sky-gateway-api-chart.activemq.repository=$IMAGE_SKY_GATEWAY"\
  --set "sky-gateway-api-chart.activemq.image.repository=$IMAGE_SKYLINE_ACTIVEMQ"\
  --set "sky-data-services-api.image.repository=$IMAGE_SKY_API"\
  --set "sky-data-services-api.image.initRepository=$IMAGE_SAM_MODULES"\
  --set "sky-proxy-gen.image.repository=IMAGE_SKY_PROXY_GEN"\
  --set "sky-pubhub-api-chart.image.repository=$IMAGE_SKY_PUBHUB_API"\
  --set "sky-pubhub-api-chart.image.initRepository=$IMAGE_SAM_MODULES"\
  --set "sky-pubhub-api-chart.ep.image.repository=$IMAGE_SKY_PUBHUB_EVENT_PROCESSOR"\
  --set "skyline-opdk-connector-chart.sky-opdk-sync-job.image.repository=$IMAGE_SKY_OPDK_SYNC_JOB"\
  --set "skyline-opdk-connector-chart.sky-opdk-sync-job.image.initRepository=$IMAGE_SAM_MODULES"\
  --set "skyline-opdk-connector-chart.opdk-event-processor.image.repository=$IMAGE_SKY_OPDK_EVENT_PROCESSOR"\
  --set "skyline-opdk-connector-chart.opdk-event-processor.image.initRepository=$IMAGE_SAM_MODULES"\
  --set "global.portaldb.user=$PORTALDB_USER" \
  --set "global.portaldb.password=$PORTALDB_PASSWORD" \
  --set "global.portaldb.url=$PORTALDB_URL" \
  --set "global.nginx.domain.name=$NGINX_DOMAIN" \
  --set "global.env.normal.DB_HOST=$DB_HOST" \
  --set "global.env.normal.DB_NAME=$DB_NAME" \
  --set "global.env.secret.DB_USERNAME=$PORTALDB_USER" \
  --set "global.env.secret.DB_PASSWORD=$PORTALDB_PASSWORD" \
   > ${APP_INSTANCE_NAME}_manifest.yaml

Apply the manifest to your Kubernetes cluster

...

Code Block
kubectl apply -f "${APP_INSTANCE_NAME}_manifest.yaml" --namespace "${NAMESPACE}"

 

4. Configure SAMi post installation

...