mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-03 14:54:53 -04:00
cli: add basic support for constellation create
on OpenStack (#1283)
* image: support OpenStack image build / upload * cli: add OpenStack terraform template * config: add OpenStack as CSP * versionsapi: add OpenStack as CSP * cli: add OpenStack as provider for `config generate` and `create` * disk-mapper: add basic support for boot on OpenStack * debugd: add placeholder for OpenStack * image: fix config file sourcing for image upload
This commit is contained in:
parent
b013a7ab32
commit
b79f7d0c8c
37 changed files with 954 additions and 79 deletions
|
@ -216,6 +216,46 @@ func (v *AzureIAMVariables) String() string {
|
|||
return b.String()
|
||||
}
|
||||
|
||||
// OpenStackClusterVariables is user configuration for creating a cluster with Terraform on OpenStack.
|
||||
type OpenStackClusterVariables struct {
|
||||
// CommonVariables contains common variables.
|
||||
CommonVariables
|
||||
|
||||
// Cloud is the (optional) name of the OpenStack cloud to use when reading the "clouds.yaml" configuration file. If empty, environment variables are used.
|
||||
Cloud string
|
||||
// AvailabilityZone is the OpenStack availability zone to use.
|
||||
AvailabilityZone string
|
||||
// Flavor is the ID of the OpenStack flavor (machine type) to use.
|
||||
FlavorID string
|
||||
// FloatingIPPoolID is the ID of the OpenStack floating IP pool to use for public IPs.
|
||||
FloatingIPPoolID string
|
||||
// ImageURL is the URL of the OpenStack image to use.
|
||||
ImageURL string
|
||||
// DirectDownload decides whether to download the image directly from the URL to OpenStack or to upload it from the local machine.
|
||||
DirectDownload bool
|
||||
// Debug is true if debug mode is enabled.
|
||||
Debug bool
|
||||
}
|
||||
|
||||
// String returns a string representation of the variables, formatted as Terraform variables.
|
||||
func (v *OpenStackClusterVariables) String() string {
|
||||
b := &strings.Builder{}
|
||||
b.WriteString(v.CommonVariables.String())
|
||||
if v.Cloud != "" {
|
||||
writeLinef(b, "cloud = %q", v.Cloud)
|
||||
}
|
||||
writeLinef(b, "availability_zone = %q", v.AvailabilityZone)
|
||||
writeLinef(b, "flavor_id = %q", v.FlavorID)
|
||||
writeLinef(b, "floating_ip_pool_id = %q", v.FloatingIPPoolID)
|
||||
writeLinef(b, "image_url = %q", v.ImageURL)
|
||||
writeLinef(b, "direct_download = %t", v.DirectDownload)
|
||||
writeLinef(b, "debug = %t", v.Debug)
|
||||
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// TODO: Add support for OpenStack IAM variables.
|
||||
|
||||
// QEMUVariables is user configuration for creating a QEMU cluster with Terraform.
|
||||
type QEMUVariables struct {
|
||||
// CommonVariables contains common variables.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue