mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
Use 'Constellation cluster' in UI
This commit is contained in:
parent
1189078c5a
commit
0e63ee0c4a
@ -16,7 +16,7 @@ import (
|
||||
"github.com/edgelesssys/constellation/internal/config"
|
||||
)
|
||||
|
||||
const warningStr = "Warning: not verifying the Constellation's %s measurements\n"
|
||||
const warningStr = "Warning: not verifying the Constellation cluster's %s measurements\n"
|
||||
|
||||
type Validators struct {
|
||||
provider cloudprovider.Provider
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
func newCreateCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "create {aws|gcp|azure}",
|
||||
Short: "Create instances on a cloud platform for your Constellation.",
|
||||
Long: "Create instances on a cloud platform for your Constellation.",
|
||||
Short: "Create instances on a cloud platform for your Constellation cluster.",
|
||||
Long: "Create instances on a cloud platform for your Constellation cluster.",
|
||||
Args: cobra.MatchAll(
|
||||
cobra.ExactArgs(1),
|
||||
isCloudProvider(0),
|
||||
@ -66,15 +66,15 @@ func create(cmd *cobra.Command, creator cloudCreator, fileHandler file.Handler,
|
||||
|
||||
if !flags.yes {
|
||||
// Ask user to confirm action.
|
||||
cmd.Printf("The following Constellation will be created:\n")
|
||||
cmd.Printf("The following Constellation cluster will be created:\n")
|
||||
cmd.Printf("%d control-planes nodes of type %s will be created.\n", flags.controllerCount, flags.insType)
|
||||
cmd.Printf("%d worker nodes of type %s will be created.\n", flags.workerCount, flags.insType)
|
||||
ok, err := askToConfirm(cmd, "Do you want to create this Constellation?")
|
||||
ok, err := askToConfirm(cmd, "Do you want to create this cluster?")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !ok {
|
||||
cmd.Println("The creation of the Constellation was aborted.")
|
||||
cmd.Println("The creation of the cluster was aborted.")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@ -88,7 +88,7 @@ func create(cmd *cobra.Command, creator cloudCreator, fileHandler file.Handler,
|
||||
return err
|
||||
}
|
||||
|
||||
cmd.Println("Your Constellation was created successfully.")
|
||||
cmd.Println("Your Constellation cluster was created successfully.")
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ func parseCreateFlags(cmd *cobra.Command, provider cloudprovider.Provider) (crea
|
||||
}
|
||||
if len(name) > constellationNameLength {
|
||||
return createFlags{}, fmt.Errorf(
|
||||
"name for Constellation too long, maximum length is %d, got %d: %s",
|
||||
"name for Constellation cluster too long, maximum length is %d, got %d: %s",
|
||||
constellationNameLength, len(name), name,
|
||||
)
|
||||
}
|
||||
|
@ -34,17 +34,17 @@ import (
|
||||
func newInitCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "init",
|
||||
Short: "Initialize the Constellation. Start your confidential Kubernetes cluster.",
|
||||
Long: "Initialize the Constellation. Start your confidential Kubernetes cluster.",
|
||||
Short: "Initialize the Constellation cluster. Start your confidential Kubernetes.",
|
||||
Long: "Initialize the Constellation cluster. Start your confidential Kubernetes.",
|
||||
ValidArgsFunction: initCompletion,
|
||||
Args: cobra.ExactArgs(0),
|
||||
RunE: runInitialize,
|
||||
}
|
||||
cmd.Flags().String("privatekey", "", "path to your private key.")
|
||||
cmd.Flags().String("master-secret", "", "path to base64 encoded master secret.")
|
||||
cmd.Flags().Bool("wg-autoconfig", false, "enable automatic configuration of WireGuard interface")
|
||||
cmd.Flags().String("privatekey", "", "Path to your private key.")
|
||||
cmd.Flags().String("master-secret", "", "Path to base64 encoded master secret.")
|
||||
cmd.Flags().Bool("wg-autoconfig", false, "Enable automatic configuration of WireGuard interface.")
|
||||
must(cmd.Flags().MarkHidden("wg-autoconfig"))
|
||||
cmd.Flags().Bool("autoscale", false, "enable Kubernetes cluster-autoscaler")
|
||||
cmd.Flags().Bool("autoscale", false, "Enable Kubernetes cluster-autoscaler.")
|
||||
return cmd
|
||||
}
|
||||
|
||||
@ -242,8 +242,8 @@ func (r activationResult) writeOutput(wr io.Writer, fileHandler file.Handler) er
|
||||
writeRow(tw, "Your WireGuard IP", r.clientVpnIP)
|
||||
writeRow(tw, "Control plane's public IP", r.coordinatorPubIP)
|
||||
writeRow(tw, "Control plane's public key", r.coordinatorPubKey)
|
||||
writeRow(tw, "Constellation's owner identifier", r.ownerID)
|
||||
writeRow(tw, "Constellation's unique identifier", r.clusterID)
|
||||
writeRow(tw, "Constellation cluster's owner identifier", r.ownerID)
|
||||
writeRow(tw, "Constellation cluster's unique identifier", r.clusterID)
|
||||
writeRow(tw, "WireGuard configuration file", constants.WGQuickConfigFilename)
|
||||
writeRow(tw, "Kubernetes configuration", constants.AdminConfFilename)
|
||||
tw.Flush()
|
||||
@ -253,7 +253,7 @@ func (r activationResult) writeOutput(wr io.Writer, fileHandler file.Handler) er
|
||||
return fmt.Errorf("write kubeconfig: %w", err)
|
||||
}
|
||||
|
||||
fmt.Fprintln(wr, "You can now connect to your Constellation cluster by executing:")
|
||||
fmt.Fprintln(wr, "You can now connect to your cluster by executing:")
|
||||
fmt.Fprintf(wr, "\twg-quick up ./%s\n", constants.WGQuickConfigFilename)
|
||||
fmt.Fprintf(wr, "\texport KUBECONFIG=\"$PWD/%s\"\n", constants.AdminConfFilename)
|
||||
return nil
|
||||
@ -462,7 +462,7 @@ func getGCPInstances(stat state.ConstellationState, config *config.Config) (coor
|
||||
func getAzureInstances(stat state.ConstellationState, config *config.Config) (coordinators, nodes ScalingGroup, err error) {
|
||||
coordinatorMap := stat.AzureCoordinators
|
||||
if len(coordinatorMap) == 0 {
|
||||
return ScalingGroup{}, ScalingGroup{}, errors.New("no control-plane nodes available, can't create Constellation without any instance")
|
||||
return ScalingGroup{}, ScalingGroup{}, errors.New("no control-plane nodes available, can't create Constellation cluster without any instance")
|
||||
}
|
||||
var coordinatorInstances Instances
|
||||
for _, node := range coordinatorMap {
|
||||
|
@ -25,8 +25,8 @@ var diskUUIDRegexp = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA
|
||||
func newRecoverCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "recover",
|
||||
Short: "Recover a Constellation.",
|
||||
Long: "Recover a Constellation by sending a recovery key to an instance in the boot stage." +
|
||||
Short: "Recover a Constellation cluster.",
|
||||
Long: "Recover a Constellation cluster by sending a recovery key to an instance in the boot stage." +
|
||||
"\nThis is only required if instances restart without other instances available for bootstrapping.",
|
||||
Args: cobra.ExactArgs(0),
|
||||
RunE: runRecover,
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
func newTerminateCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "terminate",
|
||||
Short: "Terminate an existing Constellation.",
|
||||
Long: "Terminate an existing Constellation. The Constellation can't be started again, and all persistent storage will be lost.",
|
||||
Short: "Terminate an existing Constellation cluster.",
|
||||
Long: "Terminate an existing Constellation cluster. The cluster can't be started again, and all persistent storage will be lost.",
|
||||
Args: cobra.NoArgs,
|
||||
RunE: runTerminate,
|
||||
}
|
||||
@ -46,7 +46,7 @@ func terminate(cmd *cobra.Command, terminator cloudTerminator, fileHandler file.
|
||||
return err
|
||||
}
|
||||
|
||||
cmd.Println("Your Constellation was terminated successfully.")
|
||||
cmd.Println("Your Constellation cluster was terminated successfully.")
|
||||
|
||||
var retErr error
|
||||
if err := fileHandler.Remove(constants.StateFilename); err != nil {
|
||||
|
@ -93,7 +93,7 @@ func parseVerifyFlags(cmd *cobra.Command) (verifyFlags, error) {
|
||||
return verifyFlags{}, err
|
||||
}
|
||||
if ownerID == "" && clusterID == "" {
|
||||
return verifyFlags{}, errors.New("neither owner ID nor unique ID provided to verify the Constellation")
|
||||
return verifyFlags{}, errors.New("neither owner ID nor unique ID provided to verify the cluster")
|
||||
}
|
||||
|
||||
endpoint, err := cmd.Flags().GetString("node-endpoint")
|
||||
|
@ -18,7 +18,7 @@ func (c *Client) CreateSecurityGroup(ctx context.Context, input SecurityGroupInp
|
||||
|
||||
id := uuid.New()
|
||||
createInput := &awsec2.CreateSecurityGroupInput{
|
||||
Description: aws.String("Security group of Constellation. This group was generated through the Constellation CLI."),
|
||||
Description: aws.String("Security group of Constellation cluster. This group was generated through the Constellation CLI."),
|
||||
GroupName: aws.String("Constellation-" + id.String()),
|
||||
DryRun: aws.Bool(true),
|
||||
}
|
||||
|
@ -311,13 +311,13 @@ type insertInstanceTemplateInput struct {
|
||||
func (i insertInstanceTemplateInput) insertInstanceTemplateRequest() *computepb.InsertInstanceTemplateRequest {
|
||||
req := computepb.InsertInstanceTemplateRequest{
|
||||
InstanceTemplateResource: &computepb.InstanceTemplate{
|
||||
Description: proto.String("This instance belongs to a Constellation."),
|
||||
Description: proto.String("This instance belongs to a Constellation cluster."),
|
||||
Name: proto.String(i.Name),
|
||||
Properties: &computepb.InstanceProperties{
|
||||
ConfidentialInstanceConfig: &computepb.ConfidentialInstanceConfig{
|
||||
EnableConfidentialCompute: proto.Bool(true),
|
||||
},
|
||||
Description: proto.String("This instance belongs to a Constellation."),
|
||||
Description: proto.String("This instance belongs to a Constellation cluster."),
|
||||
Disks: []*computepb.AttachedDisk{
|
||||
{
|
||||
InitializeParams: &computepb.AttachedDiskInitializeParams{
|
||||
|
@ -15,7 +15,7 @@ func (c *Client) CreateServiceAccount(ctx context.Context, input ServiceAccountI
|
||||
Project: c.project,
|
||||
AccountID: "constellation-app-" + c.uid,
|
||||
DisplayName: "constellation-app-" + c.uid,
|
||||
Description: "This service account belongs to a Constellation.",
|
||||
Description: "This service account belongs to a Constellation cluster.",
|
||||
}
|
||||
|
||||
email, err := c.insertServiceAccount(ctx, insertInput)
|
||||
|
Loading…
Reference in New Issue
Block a user