diff --git a/BUILD.bazel b/BUILD.bazel index a7164142de6..dbeed755793 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -84,14 +84,22 @@ pkg_tar( strip_prefix = ".", deps = [ ":cli_bin", + ":old_cli_bin", ":tf_bin", ], ) pkg_tar( - name = "cli_bin", + name = "old_cli_bin", srcs = ["//installer/cmd/tectonic"], - mode = "0777", + mode = "0555", + package_dir = "installer", +) + +pkg_tar( + name = "cli_bin", + srcs = ["//cmd/openshift-install"], + mode = "0555", package_dir = "installer", ) diff --git a/cmd/openshift-install/BUILD.bazel b/cmd/openshift-install/BUILD.bazel index b6362cae12f..4ae24c7cd18 100644 --- a/cmd/openshift-install/BUILD.bazel +++ b/cmd/openshift-install/BUILD.bazel @@ -15,6 +15,10 @@ go_library( go_binary( name = "openshift-install", + out = "openshift-install", embed = [":go_default_library"], + # Use pure to build a pure-go binary. + # This has the nice side effect of making the binary statically linked. + pure = "on", visibility = ["//visibility:public"], ) diff --git a/cmd/openshift-install/main.go b/cmd/openshift-install/main.go index b97964c67a6..1d9e1b6be44 100644 --- a/cmd/openshift-install/main.go +++ b/cmd/openshift-install/main.go @@ -14,6 +14,7 @@ var ( installConfigCommand = kingpin.Command("install-config", "Generate the Install Config asset") ignitionConfigsCommand = kingpin.Command("ignition-configs", "Generate the Ignition Config assets") manifestsCommand = kingpin.Command("manifests", "Generate the Kubernetes manifests") + clusterCommand = kingpin.Command("cluster", "Create an OpenShift cluster") dirFlag = kingpin.Flag("dir", "assets directory").Default(".").String() logLevel = kingpin.Flag("log-level", "log level (e.g. \"debug\")").Default("warn").Enum("debug", "info", "warn", "error", "fatal", "panic") @@ -39,6 +40,12 @@ func main() { assetStock.Manifests(), assetStock.Tectonic(), } + case clusterCommand.FullCommand(): + targetAssets = []asset.Asset{ + assetStock.TFVars(), + assetStock.KubeconfigAdmin(), + assetStock.Cluster(), + } } l, err := log.ParseLevel(*logLevel) diff --git a/config.tf b/config.tf index ea06c097009..a70992438f3 100644 --- a/config.tf +++ b/config.tf @@ -294,21 +294,30 @@ variable "tectonic_kubelet_debug_config" { description = "(internal) debug flags for the kubelet (used in CI only)" } -variable "tectonic_ignition_masters" { +variable "ignition_masters" { type = "list" default = [] description = <