Skip to content

Commit

Permalink
MM-29124 Change the default filestore to non-multitenant on E10/E0 (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Whitlock authored Dec 15, 2020
1 parent 8dcb197 commit 698c786
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions server/command_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func getCreateFlagSet() *flag.FlagSet {
createFlagSet.String("size", "miniSingleton", "Size of the Mattermost installation e.g. 'miniSingleton' or 'miniHA'")
createFlagSet.String("version", "", "Mattermost version to run, e.g. '5.12.4'")
createFlagSet.String("affinity", cloud.InstallationAffinityMultiTenant, "Whether the installation is isolated in it's own cluster or shares ones. Can be 'isolated' or 'multitenant'")
createFlagSet.String("license", "e20", "The enterprise license to use. Can be 'e10', 'e20', or 'te'")
createFlagSet.String("filestore", cloud.InstallationFilestoreMultiTenantAwsS3, "Specify the backing file store. Can be 'aws-multitenant-s3' (S3 Shared Bucket), 'aws-s3' (S3 Bucket), 'operator' (Minio Operator inside the cluster")
createFlagSet.String("license", licenseOptionE20, "The enterprise license to use. Can be 'e10', 'e20', or 'te'")
createFlagSet.String("filestore", "", "Specify the backing file store. Can be 'aws-multitenant-s3' (S3 Shared Bucket), 'aws-s3' (S3 Bucket), 'operator' (Minio Operator inside the cluster. Default 'aws-multi-tenant-s3' for E20, and 'aws-s3' for E10 and E0/TE.")
createFlagSet.String("database", cloud.InstallationDatabaseMultiTenantRDSPostgres, "Specify the backing database. Can be 'aws-multitenant-rds-postgres' (RDS Postgres Shared), 'aws-multitenant-rds' (RDS MySQL Shared), 'aws-rds-postgres' (RDS Postgres), 'aws-rds' (RDS MySQL), 'mysql-operator' (MySQL Operator inside the cluster)")
createFlagSet.Bool("test-data", false, "Set to pre-load the server with test data")

Expand Down Expand Up @@ -83,6 +83,15 @@ func parseCreateArgs(args []string, install *Installation) error {
return err
}

// the filestore has a different default depending upon the target installation type
if install.Filestore == "" {
if install.License == licenseOptionE20 {
install.Filestore = cloud.InstallationFilestoreMultiTenantAwsS3
} else {
install.Filestore = cloud.InstallationFilestoreAwsS3
}
}

if !cloud.IsSupportedFilestore(install.Filestore) {
return errors.Errorf("invalid filestore option %s; must be %s, %s, or %s",
install.Filestore,
Expand Down

0 comments on commit 698c786

Please sign in to comment.