[WIP] Network Mounted Volumes - docker based solution - #224
Conversation
dockerozed seaweedfs, doesn't change any database behaviour as of now no breaking changes
karan0299
left a comment
There was a problem hiding this comment.
Few requested changes
Rest L.G.T.M
| } | ||
| } | ||
|
|
||
| func setupSeaweedfsContainer(serviceName string) { |
There was a problem hiding this comment.
In this function change serviceName -> seaweedType
| utils.LogInfo("No %s instance found in host. Building the instance.", strings.Title(serviceName)) | ||
| containerID, err := seaweedfs.SetupSeaweedfsInstance(serviceName) | ||
| if err != nil { | ||
| utils.Log("There was a problem deploying %s service.", strings.Title(serviceName), utils.ErrorTAG) |
There was a problem hiding this comment.
| utils.Log("There was a problem deploying %s service.", strings.Title(serviceName), utils.ErrorTAG) | |
| utils.Log("There was a problem deploying %s seaweedType", strings.Title(serviceName), utils.ErrorTAG) |
| if containerCfg.Name == types.SeaweedFiler { | ||
| err := os.MkdirAll("seaweed/seaweed-filer-storage/filerldb2", 0777) | ||
| if err != nil { | ||
| println(err.Error()) |
There was a problem hiding this comment.
Shouldn't here be return statement instead of print
| }, | ||
| PortBindings: nat.PortMap{ | ||
| nat.Port(containerPortRule1): []nat.PortBinding{{ | ||
| HostIP: "", |
There was a problem hiding this comment.
| HostIP: "", | |
| HostIP: "0.0.0.0", |
| HostIP: "", | ||
| HostPort: fmt.Sprintf("%d", containerCfg.ContainerPort1)}}, | ||
| nat.Port(containerPortRule2): []nat.PortBinding{{ | ||
| HostIP: "", |
There was a problem hiding this comment.
| HostIP: "", | |
| HostIP: "0.0.0.0", |
| func startMasterService() error { | ||
|
|
||
| checkAndPullImages("chrislusf/seaweedfs") | ||
| err := os.MkdirAll("seaweed/seaweed-filer-storage/filerldb2", 0777) |
There was a problem hiding this comment.
What does ldb2 signify in filerldb2 ? and Is it necessary to name it so
| //SeaweedCronjob is the cronjob service for Seaweedfs | ||
| SeaweedCronjob = "seaweed_cronjob" | ||
|
|
||
| //SeaweedS3 is the Seaweed service that provides support for AmazonS3 |
There was a problem hiding this comment.
@supra08 Is support for AmazonS3 required for our use case? In future may be?
| Image string | ||
| // Port on which a database service is running inside the container | ||
| HostPort1 int | ||
| // Port on which a database service is running inside the container |
There was a problem hiding this comment.
Can you change Comment to distinguish HostPort1 and HostPort2
| ContainerPort1 int | ||
| // Port of the docker container in the host system | ||
| ContainerPort2 int | ||
| // Directory inside the docker container for volume mounting purposes |
There was a problem hiding this comment.
Similarly for ContainerPort1 and ContainerPort2
Disregard the previous PR. The work for this is mostly completed. Once the next seaweedFS release happens (which usually does every 5-6 days), I'll rebuild the docker images for the databases and then include those images instead of the current ones we are using.