opack cloud ?
This commit is contained in:
@@ -35,6 +35,39 @@ Location of sets? = done
|
||||
|
||||
endef
|
||||
|
||||
define OPACK_INSTALL_CLOUD_CONTENT =
|
||||
Choose your keyboard layout = fr
|
||||
System hostname = $(OPACK_SYS_HOSTNAME)-$(OPACK_TARGET)
|
||||
Which network interface = vio0
|
||||
IPv4 address for vio0 = dhcp
|
||||
IPv6 address for vio0 = none
|
||||
Password for root account = $(OPACK_SYS_PASSWORD)
|
||||
Public ssh key for root account = $(OPACK_SYS_SSH_PUBLIC_KEY)
|
||||
Allow root ssh login = prohibit-password
|
||||
Do you expect to run the X Window System = $(OPACK_SYS_XENOCARA)
|
||||
Setup a user = $(OPACK_SYS_USER)
|
||||
Password for user $(OPACK_SYS_USER) = $(OPACK_SYS_PASSWORD)
|
||||
Public ssh key for $(OPACK_SYS_USER) = $(OPACK_SYS_SSH_PUBLIC_KEY)
|
||||
Allow root ssh login = prohibit-password
|
||||
What timezone = $(OPACK_SYS_TIMEZONE)
|
||||
Which disk = sd0
|
||||
Use (W)hole disk or (E)dit the MBR = whole
|
||||
URL to autopartitioning template for disklabel = file:/autodisklabel
|
||||
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout = A
|
||||
Location of sets = $(OPACK_SYS_SETS_LOCATION)
|
||||
HTTP Server = $(OPACK_SYS_SERVER)
|
||||
Server directory = pub/OpenBSD/$(OPACK_SYS_VERSION)/$(OPACK_SYS_ARCHITECTURE)
|
||||
Unable to connect using https. Use http instead = yes
|
||||
Pathname to the sets = $(OPACK_SYS_VERSION_MAJOR).$(OPACK_SYS_VERSION_MINOR)/amd64
|
||||
Set name(s) = $(OPACK_SYS_SETS) done
|
||||
Directory does not contain SHA256.sig. Continue without verification = $(OPACK_NO_SIGCHK)
|
||||
Signature check of SHA256.sig failed. Continue without verification = no
|
||||
Cannot determine prefetch area. Continue without verification = yes
|
||||
Location of sets? = done
|
||||
|
||||
endef
|
||||
|
||||
|
||||
define OPACK_METADATA_CONTENT =
|
||||
{
|
||||
"name": "$(OPACK_BOX_TAG)",
|
||||
@@ -55,3 +88,53 @@ define OPACK_METADATA_CONTENT =
|
||||
}
|
||||
|
||||
endef
|
||||
|
||||
define OPACK_TERRAFORM_CONTENT =
|
||||
|
||||
variable "credentials" { default = "../$(OPACK_GCE_JSON_KEY)" }
|
||||
variable "project" { default = "$(OPACK_GCE_PROJECT)" }
|
||||
variable "region" { default = "europe-west4" }
|
||||
variable "zone" { default = "europe-west4-b" }
|
||||
|
||||
provider "google" {
|
||||
region = "$${var.region}"
|
||||
credentials = "$${var.credentials}"
|
||||
project = "$${var.project}"
|
||||
}
|
||||
|
||||
module "OPENBSD" {
|
||||
source = "./module"
|
||||
gce_zone = "$${var.zone}"
|
||||
}
|
||||
|
||||
endef
|
||||
|
||||
define OPACK_TERRAFORM_MODULE_CONTENT =
|
||||
variable "servers" {}
|
||||
variable "gce_zone" {}
|
||||
|
||||
resource "google_compute_instance" "$(OPACK_TARGET)" {
|
||||
tags = ["skz-opack", "default"]
|
||||
name = "$(OPACK_TARGET)"
|
||||
machine_type = "$(OPACK_GCE_MACHINE)"
|
||||
zone = "$${var.gce_zone}"
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
image = "openbsd"
|
||||
}
|
||||
}
|
||||
network_interface {
|
||||
network = "default"
|
||||
access_config {
|
||||
// Ephemeral IP
|
||||
}
|
||||
}
|
||||
scheduling {
|
||||
preemptible = false
|
||||
on_host_maintenance = "MIGRATE"
|
||||
automatic_restart = true
|
||||
}
|
||||
}
|
||||
|
||||
endef
|
||||
|
||||
|
||||
Reference in New Issue
Block a user