General
Deploying A2 OnPrem to GCP
This guide explains how to deploy A2 OnPrem to Google Cloud Platform (GCP).
This guide describes how to deploy A2 using Google Cloud Platform (GCP)‘s Compute Engine.
Setting up GCP Compute Engine
1. Prerequisites
You need to set up a GCP project and enable the Compute Engine API. This process can be easily performed in the GCP console.
2. Creating an Instance
- Navigate to
Compute Engine
>VM instances
menu. - Click the
CREATE INSTANCE
button. - Configure the following settings:
Name
: Instance name (e.g., “a2-ce”)Region
: Choose a nearby region (e.g., “asia-northeast3 (Seoul)”)Machine configuration
>Machine type
:- Recommend CPU 8 vCPU, memory 16GB or higher. (e.g., e2-standard-8)
- Click the
CHANGE
button underBoot disk
:Operating system
: Select “Container Optimized OS”- Verify that the auto-selected
Version
is “x86/64” architecture - (optional) To preserve the disk permanently, select
Keep disk
underSHOW ADVANCED CONFIGURATION
>Deletion rule
- click the
SELECT
button.
Firewall
: CheckAllow HTTP traffic
andAllow HTTPS traffic
- Expand
Advanced options
:Networking
>Network tags
: Enter “a2-ce”Networking
>Network interfaces
> Expanddefault
>External IPv4 address
: SelectRESERVE STATIC EXTERNAL IP ADDRESS
- Enter “a2-ce” for
name
and clickRESERVE
- Enter “a2-ce” for
- Click the “CREATE” button at the bottom of the screen to create the instance.
3. Setting up Firewall Rules
- Go to
VPC network
>Firewall
menu. - Click the
CREATE FIREWALL RULE
button. - Configure the following settings:
Name
: Specify a name for the rule (e.g., “allow-a2-ce”)Targets
: SelectSpecified target tags
and enter the previously used tag (e.g., “a2-ce”)Source filter
: SelectIPv4 ranges
and enter “0.0.0.0/0” (allows access from all IPs)Protocols and ports
: SelectSpecified protocols and ports
, checkTCP
and enter ports “8000,8080”
- Click the “CREATE” button to create the rule.
4. Deploying Docker Image
-
Connect to the instance using the SSH button in the GCP console.
-
Install docker compose
-
Create a docker-compose.yml file:
-
Run docker compose:
5. Verifying the Service
- Open a web browser.
- Access
http://[YOUR_STATIC_EXTERNAL_IP]:8000
. - Verify that the service is running normally.
Reference Images
- settings 1
- settings 2
- network
- firewall
By following this guide, you can successfully deploy A2 to GCP Compute Engine. If you need additional configuration or optimization, please refer to the GCP documentation or contact our support team anytime.
Was this page helpful?