Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Ocis Binary #79

Merged
merged 13 commits into from
Jan 10, 2020
Merged

Simple Ocis Binary #79

merged 13 commits into from
Jan 10, 2020

Conversation

refs
Copy link
Member

@refs refs commented Jan 9, 2020

Simple Ocis

To generate the simple-ocis binary:

TAGS=simple make build

run it:

./bin/ocis server

Services running

com.owncloud.api
com.owncloud.api.hello
com.owncloud.http.broker
com.owncloud.proxy
com.owncloud.registry
com.owncloud.router
com.owncloud.runtime
com.owncloud.web
com.owncloud.web.hello
com.owncloud.web.konnectd
com.owncloud.web.phoenix

Build ocis with the subset of services for easy extensions development.

I also went ahead and disabled some services I found we don't need at this stage, not only for simple ocis but for the entire binary.

TODO

  • update docs

@refs refs requested a review from butonic January 9, 2020 15:06
@refs refs self-assigned this Jan 9, 2020
@refs refs mentioned this pull request Jan 9, 2020
4 tasks
Copy link
Member

@butonic butonic left a comment

Choose a reason for hiding this comment

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

yep works!

@butonic
Copy link
Member

butonic commented Jan 9, 2020

fixes #75

@butonic
Copy link
Member

butonic commented Jan 9, 2020

for ocis simple we want to change the PhoenixCommand ... or introduce a PhoenixSimpleCommand that uses a different build flag ... not sure how to minimize code duplication.

	cfg.Phoenix.Phoenix.Config.Apps = []string{}
	cfg.Phoenix.Phoenix.Config.ExternalApps = []svcconfig.ExternalApp{
		svcconfig.ExternalApp{
			Name: "hello",
			Path: "http://localhost:9105/hello.js",
			Config: map[string]interface{}{
				"url": "http://localhost:9105",
			},
		},
	}

but can be done in a subsequent PR

@refs
Copy link
Member Author

refs commented Jan 10, 2020

for ocis simple we want to change the PhoenixCommand ... or introduce a PhoenixSimpleCommand that uses a different build flag ... not sure how to minimize code duplication.

	cfg.Phoenix.Phoenix.Config.Apps = []string{}
	cfg.Phoenix.Phoenix.Config.ExternalApps = []svcconfig.ExternalApp{
		svcconfig.ExternalApp{
			Name: "hello",
			Path: "http://localhost:9105/hello.js",
			Config: map[string]interface{}{
				"url": "http://localhost:9105",
			},
		},
	}

but can be done in a subsequent PR

cannot avoid code duplication, not without getting into some nasty logic using go/build for handling conditions on build flags.

In my opinion this duplication is at least accepted for this purpose. It can however be better structured and be separated on it's own folder (pkg) but then you'd have the same. The idiom of adding the _simple suffix to the filename makes clear that this files are only included for the simple build tags.

The confusing bit is the !simple on the excluded files. For the time being this PR fulfills the requirements we desire and I propose we ship it as it is, then build on top of it.

@refs
Copy link
Member Author

refs commented Jan 10, 2020

@butonic feeling like adding the phoenix simple command to this PR?

@butonic
Copy link
Member

butonic commented Jan 10, 2020

@refs no ... let us get the build tags in place first. we can then think about configuring phoenix and adding konnectd & devldap

@refs
Copy link
Member Author

refs commented Jan 10, 2020

👍 I'll finish a few details and merge this.

@tboerger
Copy link
Contributor

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- pkg/command/server_simple.go  3
- pkg/tracing/tracing.go  9
         

Complexity decreasing per file
==============================
+ pkg/command/server.go  -7
         

See the complete overview on Codacy

@refs refs merged commit d4a7cec into master Jan 10, 2020
@refs refs deleted the feature/simple-ocis branch January 10, 2020 11:58
ownclouders pushed a commit that referenced this pull request Jan 10, 2020
Merge: 4da25c6 00cf134
Author: Alex Unger <zyxancf@gmail.com>
Date:   Fri Jan 10 12:58:51 2020 +0100

    Simple Ocis Binary (#79)

    Simple Ocis Binary
refs pushed a commit that referenced this pull request Sep 18, 2020
refs pushed a commit that referenced this pull request Sep 18, 2020
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.

3 participants