Skip to content

Commit 82ad87a

Browse files
committed
Fix tarball generation
1 parent afabb49 commit 82ad87a

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

terraform_create_images/scripts/posvm/postproduction/launch_pos.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ function run_data_ingestion_pipeline() {
7979
function create_tarball() {
8080
local path_source=$1
8181
local path_destination=$2
82+
intermediate="/home/root/$(date +%Y%m%d_%H%M%S).tgz"
83+
8284
log "[START] Creating tarball from '${path_source}' to '${path_destination}'"
83-
tar czf - -C ${path_source} . | gsutil cp - ${path_destination}
85+
tar --use-compress-program=pigz -cf "$intermediate" -C "${path_source}" .
86+
gsutil cp "$intermediate" "${path_destination}"
87+
8488
log "[DONE] Creating tarball from '${path_source}' to '${path_destination}'"
8589
}
8690

terraform_create_images/scripts/posvm/startup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function install_packages() {
1414
log "Updating system"
1515
apt-get update
1616
log "Installing required packages"
17-
apt-get install -y wget vim tmux python3-pip docker.io docker-compose curl git tree htop
17+
apt-get install -y wget vim tmux python3-pip docker.io docker-compose curl git tree htop pigz
1818
log "Adding POS user '${POS_USER_NAME}' to docker group"
1919
usermod -aG docker ${POS_USER_NAME}
2020
log "Installing esbulk loader"
@@ -66,4 +66,4 @@ log "Launching postprocessing scripts, at $$(pwd)"
6666
log "Postprocessing scripts completed"
6767
# Shutting down this postproduction machine
6868
log "[--- Shutting down this postproduction machine ---]"
69-
poweroff
69+
poweroff

terraform_create_images/variables.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ variable "vm_pos_boot_image" {
9191
variable "vm_pos_boot_disk_size" {
9292
description = "POS VM boot disk size, default '64GB'"
9393
type = string
94-
default = 64
94+
default = 512
9595
}
9696

9797
variable "vm_pos_machine_type" {
@@ -137,5 +137,3 @@ variable "elastic_search_data_disk_size" {
137137
type = string
138138
default = "256"
139139
}
140-
141-

0 commit comments

Comments
 (0)