Skip to content

[WIP] Network Mounted Volumes - docker based solution - #224

Open
angad-k wants to merge 1 commit into
developfrom
network-mounted-volumes-dockerized
Open

[WIP] Network Mounted Volumes - docker based solution#224
angad-k wants to merge 1 commit into
developfrom
network-mounted-volumes-dockerized

Conversation

@angad-k

@angad-k angad-k commented Oct 25, 2020

Copy link
Copy Markdown
Member

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.

dockerozed seaweedfs, doesn't change any database behaviour as of now

no breaking changes
@angad-k angad-k changed the title [WIP} Network Mounted Volumes - docker based solution [WIP] Network Mounted Volumes - docker based solution Oct 25, 2020

@karan0299 karan0299 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few requested changes
Rest L.G.T.M

Comment thread helper.go
}
}

func setupSeaweedfsContainer(serviceName string) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this function change serviceName -> seaweedType

Comment thread helper.go
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)

Comment thread lib/docker/container.go
if containerCfg.Name == types.SeaweedFiler {
err := os.MkdirAll("seaweed/seaweed-filer-storage/filerldb2", 0777)
if err != nil {
println(err.Error())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't here be return statement instead of print

Comment thread lib/docker/container.go
},
PortBindings: nat.PortMap{
nat.Port(containerPortRule1): []nat.PortBinding{{
HostIP: "",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
HostIP: "",
HostIP: "0.0.0.0",

Comment thread lib/docker/container.go
HostIP: "",
HostPort: fmt.Sprintf("%d", containerCfg.ContainerPort1)}},
nat.Port(containerPortRule2): []nat.PortBinding{{
HostIP: "",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
HostIP: "",
HostIP: "0.0.0.0",

Comment thread service_launchers.go
func startMasterService() error {

checkAndPullImages("chrislusf/seaweedfs")
err := os.MkdirAll("seaweed/seaweed-filer-storage/filerldb2", 0777)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does ldb2 signify in filerldb2 ? and Is it necessary to name it so

Comment thread types/constants.go
//SeaweedCronjob is the cronjob service for Seaweedfs
SeaweedCronjob = "seaweed_cronjob"

//SeaweedS3 is the Seaweed service that provides support for AmazonS3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@supra08 Is support for AmazonS3 required for our use case? In future may be?

Comment thread types/container.go
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change Comment to distinguish HostPort1 and HostPort2

Comment thread types/container.go
ContainerPort1 int
// Port of the docker container in the host system
ContainerPort2 int
// Directory inside the docker container for volume mounting purposes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly for ContainerPort1 and ContainerPort2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants