From f584d129345fe31c732ce0189bccb2bf9c43732d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 31 Mar 2020 08:22:34 +0200 Subject: [PATCH] partially fix simple build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- docs/building.md | 34 ++++++++++++++++++---------------- pkg/command/server_simple.go | 11 ++++------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/docs/building.md b/docs/building.md index 319516066a..29e67ac29a 100644 --- a/docs/building.md +++ b/docs/building.md @@ -14,11 +14,23 @@ git clone https://github.com/owncloud/ocis.git cd ocis {{< / highlight >}} -All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. +All required tools besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. To build the `ocis` binary run: -## Simple Ocis +{{< highlight txt >}} +make generate +make build +{{< / highlight >}} -Building the simple ocis binary: +Finally, you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis -h` to see all available options. + + +## Simple Ocis fo extonsions example + +Currently, we are using a go build tag to allow building a more simple set of the binary. It was intended to let extension developers focus on only the necessary services. + +{{< hint info >}} +While it the tag based simple build demonstrates how to use ocis as a framework for a micro service architecture, we may change to an approach that uses an explicit command to run only a subset of the services. +{{< / hint >}} ```console TAGS=simple make build @@ -28,20 +40,10 @@ The artifact lives in `/bin/ocis` The generated simple ocis binary is a subset of the ocis command with a restricted set of services meant for ease up development. The services included are - ``` ocis-hello -phoenix -konnectd -devldap +ocis-phoenix +ocis-konnectd +ocis-glauth micro's own services ``` - -## Backend - -{{< highlight txt >}} -make generate -make build -{{< / highlight >}} - -Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis -h` to see all available options. diff --git a/pkg/command/server_simple.go b/pkg/command/server_simple.go index 51219dd30f..3b78e45a1a 100644 --- a/pkg/command/server_simple.go +++ b/pkg/command/server_simple.go @@ -15,15 +15,12 @@ import ( ) var ( - // SimpleRuntimeServices declares which services will be started for the fullstack server + // SimpleRuntimeServices declares which services will be started for the simple server SimpleRuntimeServices = []string{ "hello", "phoenix", - "reva-frontend", - "reva-gateway", - "reva-users", - "reva-auth-basic", - "reva-auth-bearer", + "konnectd", + "glauth", } ) @@ -50,7 +47,7 @@ func Simple(cfg *config.Config) *cli.Command { runtime := runtime.New( runtime.Logger(logger), - runtime.Services(append(runtime.RuntimeServices, SimpleRuntimeServices...)), + runtime.Services(append(runtime.MicroServices, SimpleRuntimeServices...)), runtime.MicroRuntime(cmd.DefaultCmd.Options().Runtime), runtime.Context(c), )