Skip to content

Commit 34a4266

Browse files
committed
v1.4.1, added cloud-sql-proxy and gemini-cli to python 3.12 bookworm image
Signed-off-by: Glen Yu <glen.yu@gmail.com>
1 parent 28634b2 commit 34a4266

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77

8+
## [1.4.1] - 2025-08-21
9+
### Added
10+
- Set `TERM='xterm-256color'` in `/etc/profile` of Python 3.12 Bookworm base image
11+
- Install of `cloud-sql-proxy` binary to the Python 3.12 Bookworm base image
12+
- Install of `gemini` CLI binary to the Python 3.12 Bookworm base image
13+
814
## [1.4.0] - 2025-08-20
915
### Added
1016
- Added `base-python3/base_python312_bookworm.pkr.hcl` which builds base Debian 12 (Bookworm) image with [Python 3.12 backport](https://github.com/pascallj/python3.12-backport)

base-python3/base_python312_bookworm.pkr.hcl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ variable "arch" {}
1515
variable "machine_type" {}
1616
variable "source_image_family" {}
1717
variable "image_family" {}
18+
variable "cloudsqlproxy_version" {}
1819

1920

2021
locals {
@@ -59,6 +60,7 @@ build {
5960
"sudo apt-get -y upgrade",
6061
"sudo apt-get -y dist-upgrade",
6162
"sudo apt-get -y autoremove",
63+
"echo 'export TERM=xterm-256color' | sudo tee -a /etc/profile",
6264
"echo 'Rebooting...'",
6365
"sudo reboot"
6466
]
@@ -114,12 +116,39 @@ build {
114116
max_retries = 3
115117
}
116118

119+
# https://cloud.google.com/sql/docs/mysql/connect-auth-proxy#install
120+
provisioner "shell" {
121+
inline = [
122+
"echo '=============================================='",
123+
"echo 'INSTALL CLOUD SQL AUTH PROXY'",
124+
"echo '=============================================='",
125+
"curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v${var.cloudsqlproxy_version}/cloud-sql-proxy.linux.amd64",
126+
"chmod +x cloud-sql-proxy",
127+
"sudo mv cloud-sql-proxy /usr/local/bin/cloud-sql-proxy"
128+
]
129+
}
130+
131+
provisioner "shell" {
132+
inline = [
133+
"echo '=============================================='",
134+
"echo 'INSTALL GEMINI-CLI'",
135+
"echo '=============================================='",
136+
"curl -sL https://deb.nodesource.com/setup_24.x | sudo bash -",
137+
"sudo apt-get update",
138+
"sudo apt-get install -y nodejs",
139+
"sudo npm install -g @google/gemini-cli"
140+
]
141+
}
142+
117143
provisioner "shell" {
118144
expect_disconnect = "true"
119145
inline = [
120146
"sudo apt autoremove -y",
121147
"sudo apt-get clean",
148+
"sudo npm cache clean --force",
122149
"python --version",
150+
"cloud-sql-proxy --version",
151+
"gemini --version",
123152
"/usr/local/bin/dynmotd",
124153
"echo '=============================================='",
125154
"echo 'BUILD COMPLETE'",

base-python3/variables.pkrvars.hcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ arch = "amd64"
33
machine_type = "n2-standard-4"
44
source_image_family = "debian-12"
55
image_family = "custom-python312-base"
6+
7+
cloudsqlproxy_version = "2.18.1"

0 commit comments

Comments
 (0)