aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-01-13 22:49:49 -0800
committerchrislu <chris.lu@gmail.com>2022-01-13 22:49:49 -0800
commitb17c426e9910b280b751ac04cff07b96574bc8c9 (patch)
treecd0a479ed78b8866d05592dcdd801c6ae6c8667e
parent3c8b74318eec916bcb9ccfe599003d2f4e15e48d (diff)
downloadseaweedfs-b17c426e9910b280b751ac04cff07b96574bc8c9.tar.xz
seaweedfs-b17c426e9910b280b751ac04cff07b96574bc8c9.zip
weed server: optionally start IAM service
related to https://github.com/chrislusf/seaweedfs/issues/2560
-rw-r--r--weed/command/server.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/weed/command/server.go b/weed/command/server.go
index dcf0411fd..fe58e20bb 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -28,6 +28,7 @@ var (
masterOptions MasterOptions
filerOptions FilerOptions
s3Options S3Options
+ iamOptions IamOptions
webdavOptions WebDavOption
msgBrokerOptions MessageBrokerOptions
)
@@ -71,6 +72,7 @@ var (
isStartingVolumeServer = cmdServer.Flag.Bool("volume", true, "whether to start volume server")
isStartingFiler = cmdServer.Flag.Bool("filer", false, "whether to start filer")
isStartingS3 = cmdServer.Flag.Bool("s3", false, "whether to start S3 gateway")
+ isStartingIam = cmdServer.Flag.Bool("iam", false, "whether to start IAM service")
isStartingWebDav = cmdServer.Flag.Bool("webdav", false, "whether to start WebDAV gateway")
isStartingMsgBroker = cmdServer.Flag.Bool("msgBroker", false, "whether to start message broker")
@@ -134,6 +136,8 @@ func init() {
s3Options.auditLogConfig = cmdServer.Flag.String("s3.auditLogConfig", "", "path to the audit log config file")
s3Options.allowEmptyFolder = cmdServer.Flag.Bool("s3.allowEmptyFolder", true, "allow empty folders")
+ iamOptions.port = cmdServer.Flag.Int("iam.port", 8111, "iam server http listen port")
+
webdavOptions.port = cmdServer.Flag.Int("webdav.port", 7333, "webdav server http listen port")
webdavOptions.collection = cmdServer.Flag.String("webdav.collection", "", "collection to create the files")
webdavOptions.replication = cmdServer.Flag.String("webdav.replication", "", "replication to create the files")
@@ -161,6 +165,9 @@ func runServer(cmd *Command, args []string) bool {
if *isStartingS3 {
*isStartingFiler = true
}
+ if *isStartingIam {
+ *isStartingFiler = true
+ }
if *isStartingWebDav {
*isStartingFiler = true
}
@@ -227,25 +234,27 @@ func runServer(cmd *Command, args []string) bool {
if *isStartingFiler {
go func() {
time.Sleep(1 * time.Second)
-
filerOptions.startFiler()
-
}()
}
if *isStartingS3 {
go func() {
time.Sleep(2 * time.Second)
-
s3Options.startS3Server()
+ }()
+ }
+ if *isStartingIam {
+ go func() {
+ time.Sleep(2 * time.Second)
+ iamOptions.startIamServer()
}()
}
if *isStartingWebDav {
go func() {
time.Sleep(2 * time.Second)
-
webdavOptions.startWebDav()
}()