CNE GCP Ready: Bootstrapping Your Initial Environment
After completing the prerequisites, run the Cloud Native Experience (CNE) bootstrap process to provision a complete GKE environment from a clean Google Cloud Platform (GCP) project.
Initial Cloud Native Experience (CNE) provisioning takes approximately 45 minutes to complete.
The bootstrap process provisions multiple GCP-managed services and platform components through Terraform and Crossplane. Provisioning occurs in parallel across phases, and the environment becomes usable only after all dependencies reach a healthy state.
The longest blocking steps are typically:
- Google Kubernetes Engine (GKE) cluster provisioning (~15 minutes)
- Cloud SQL database provisioning (~10 minutes)
- GitOps platform installation (Argo CD, Crossplane, External Secrets) (~5 minutes)
- GitOps resource reconciliation (~3 minutes)
- Liferay infrastructure provisioning and application startup (~15–20 minutes)
The LiferayInfrastructure resource must report Healthy before Liferay can start with valid service connections.
Do not interrupt the bootstrap process during provisioning.
Run the bootstrap process with the default configuration for the first deployment.
This initial deployment establishes the full platform baseline, including Terraform-managed infrastructure, Crossplane resources, and GitOps reconciliation through Argo CD.
After validating the environment, you can adjust configuration values for production workloads and re-run the bootstrap process if required.
Authenticate Your Local Environment
Before running the script, authenticate your terminal with Google Cloud.
-
Authenticate with gcloud:
gcloud auth login -
Configure Application Default Credentials:
gcloud auth application-default loginTerraform uses Application Default Credentials during provisioning.
If Terraform fails with an oauth2 invalid_grant or invalid_rapt error during provisioning, refresh the Application Default Credentials:
gcloud auth application-default login
Prepare the Bootstrap Directory
Create a working directory for the bootstrap process. This directory stores the bootstrap configuration and downloaded Terraform resources used during provisioning.
mkdir cne-bootstrap
cd cne-bootstrap
touch config.json
Configure the Bootstrap
The config.json file defines the full provisioning behavior for the environment:
{
"options": {
"auto_approve": false,
"parallelism": 10,
"provider": "gcp",
"version": "1.0.1"
},
"variables": {
"deployment_name": "liferay-gcp-test",
"liferay_git_repo_url": "https://github.com/clarity/acme-gitops",
"project_id": "your-gcp-project-id",
"region": "us-central1",
"liferay_git_repo_config": {
"auth": {
"credentials_secret_name": "liferay-credentials-gitops"
},
"source_paths": {},
"target": {}
}
}
}
The GitOps repository must be accessible by Argo CD.
The liferay_git_repo_config.auth.credentials_secret_name value must match the Secret Manager secret created during prerequisites. You can use any secret naming convention, as long as the configured values match.
Options
| Option | Description |
|---|---|
provider | Specifies the infrastructure provider. Valid values: aws, gcp. |
version | Bootstrap version provided by Liferay. |
auto_approve | Skips confirmation prompts when set to true. |
parallelism | Sets the maximum number of concurrent Terraform operations. Default is 10. Lower this value if you experience API rate-limiting or kubeapi overload. |
For a complete list of all available GKE infrastructure and GitOps configuration variables, see Bootstrap Configuration Reference.
Variables
| Variable | Description |
|---|---|
deployment_name | Identifier used for all provisioned resources. |
project_id | GCP project where infrastructure is created. |
region | GCP region for all resources. |
liferay_git_repo_url | GitOps repository URL. |
liferay_git_repo_config | GitOps authentication and deployment configuration. |
liferay_git_repo_config.source_paths | GitOps repository source mapping (leave default unless customizing structure). |
liferay_git_repo_config.target | Argo CD application target configuration (leave default unless customizing structure). |
Run the Bootstrap Script
-
Run the bootstrap process:
bash <(curl -sL https://raw.githubusercontent.com/liferay/liferay-portal/master/cloud/scripts/bootstrap.sh)The script initializes Terraform, provisions infrastructure, and deploys the GitOps platform and Liferay resources.
-
If
auto_approveis disabled, confirm the provisioning steps when prompted.The process includes
- GKE cluster provisioning
- GitOps platform deployment (Argo CD, Crossplane, External Secrets)
- Cloud SQL provisioning
- Elasticsearch (ECK) deployment
- Liferay environment initialization
The bootstrap process is idempotent. Re-running the script with the same config.json reuses existing resources when possible and resumes provisioning from the last successful step.
Re-run the Bootstrap Process
If provisioning fails, update config.json and rerun the script from the same directory.
-
Existing resources may be reused depending on failure stage.
-
Partial infrastructure may already exist and cause conflicts on retry.
If failures persist, clean up the environment before retrying.
Use troubleshooting guides if repeated failures occur during provisioning or GitOps reconciliation.
Access Argo CD
When bootstrap completes, the script outputs the Argo CD credentials and initiates a port-forward.
Open Argo CD in your browser at http://localhost:8080. Log in with username admin and the password shown in the terminal output.
If you need to restart the port-forward later, run:
kubectl port-forward service/argocd-server 8080:443 \
--namespace argocd-system
Retrieve password again:
kubectl -n argocd-system get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 --decode
Once all applications reach Healthy and Synced in Argo CD, the Cloud Native Experience environment is fully provisioned. The GCP infrastructure, Kubernetes cluster, GitOps platform, and Liferay runtime are operational.
Verify the Deployment
Verify the infrastructure and Liferay workloads:
kubectl get liferayinfrastructure --all-namespaces
kubectl get pods --all-namespaces -l app=liferay
The LiferayInfrastructure resource should report Healthy. The Liferay pods should be in Running state and report Ready.
To identify the provisioned Liferay namespace:
kubectl get ns | grep liferay
Continue with Configuring the Cloud Native Experience.