Skip to content

Commit

Permalink
refactor extensions -> services
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <crichter@owncloud.com>
  • Loading branch information
dragonchaser committed Jun 20, 2022
1 parent 1abccfc commit fdae5f4
Show file tree
Hide file tree
Showing 612 changed files with 1,081 additions and 1,081 deletions.
66 changes: 33 additions & 33 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,35 @@ DEFAULT_NODEJS_VERSION = "14"
config = {
"modules": [
# if you add a module here please also add it to the root level Makefile
"extensions/app-provider",
"extensions/app-registry",
"extensions/audit",
"extensions/auth-basic",
"extensions/auth-bearer",
"extensions/auth-machine",
"extensions/frontend",
"extensions/gateway",
"extensions/graph-explorer",
"extensions/graph",
"extensions/groups",
"extensions/idm",
"extensions/idp",
"extensions/nats",
"extensions/notifications",
"extensions/ocdav",
"extensions/ocs",
"extensions/proxy",
"extensions/settings",
"extensions/sharing",
"extensions/storage-system",
"extensions/storage-publiclink",
"extensions/storage-shares",
"extensions/storage-users",
"extensions/store",
"extensions/thumbnails",
"extensions/users",
"extensions/web",
"extensions/webdav",
"services/app-provider",
"services/app-registry",
"services/audit",
"services/auth-basic",
"services/auth-bearer",
"services/auth-machine",
"services/frontend",
"services/gateway",
"services/graph-explorer",
"services/graph",
"services/groups",
"services/idm",
"services/idp",
"services/nats",
"services/notifications",
"services/ocdav",
"services/ocs",
"services/proxy",
"services/settings",
"services/sharing",
"services/storage-system",
"services/storage-publiclink",
"services/storage-shares",
"services/storage-users",
"services/store",
"services/thumbnails",
"services/users",
"services/web",
"services/webdav",
"ocis-pkg",
"ocis",
],
Expand Down Expand Up @@ -777,7 +777,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"LOCAL_UPLOAD_DIR": "/uploads",
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
"WEB_PATH": "/srv/app/web",
"FEATURE_PATH": "/drone/src/extensions/settings/ui/tests/acceptance/features",
"FEATURE_PATH": "/drone/src/services/settings/ui/tests/acceptance/features",
"MIDDLEWARE_HOST": "http://middleware:3000",
},
"commands": [
Expand All @@ -788,7 +788,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"git checkout $WEB_COMMITID",
# TODO: settings/package.json has all the acceptance test dependencies
# they shouldn't be needed since we could also use them from web:/tests/acceptance/package.json
"cd /drone/src/extensions/settings",
"cd /drone/src/services/settings",
"yarn install --immutable",
"make test-acceptance-webui",
],
Expand Down Expand Up @@ -1640,8 +1640,8 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"SHARING_USER_OWNCLOUDSQL_DB_PORT": 3306,
"SHARING_USER_OWNCLOUDSQL_DB_NAME": "owncloud",
# General oCIS config
# OCIS_RUN_EXTENSIONS specifies to start all fullstack extensions except idm and idp. These are replaced by external services
"OCIS_RUN_EXTENSIONS": "app-registry,app-provider,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav",
# OCIS_RUN_SERVICES specifies to start all fullstack services except idm and idp. These are replaced by external services
"OCIS_RUN_SERVICES": "app-registry,app-provider,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav",
"OCIS_LOG_LEVEL": "info",
"OCIS_URL": OCIS_URL,
"OCIS_BASE_DATA_PATH": "/mnt/data/ocis",
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# coverage reports
*/coverage.out
extensions/*/coverage.out
services/*/coverage.out

# unit test reports
*/checkstyle.xml
extensions/*/checkstyle.xml
services/*/checkstyle.xml

# nodejs / yarn
*/package-lock.json
Expand All @@ -14,9 +14,9 @@ yarn.lock

# build artifacts
*/bin
extensions/*/bin
services/*/bin
dist/
extensions/*/assets
services/*/assets
ocis/ocis
ocis/cmd/ocis/__debug_bin
ocis/cmd/ocis/config/
Expand Down
2 changes: 1 addition & 1 deletion .make/docs.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

SKIP_CONFIG_DOCS_GENERATE ?= 0
CONFIG_DOCS_BASE_PATH ?= ../../docs/extensions
CONFIG_DOCS_BASE_PATH ?= ../../docs/services

.PHONY: config-docs-generate
config-docs-generate: #$(FLAEX)
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"PROXY_ENABLE_BASIC_AUTH": "true",
// demo users
"IDM_CREATE_DEMO_USERS": "true",
// OCIS_RUN_EXTENSIONS allows to start a subset of extensions even in the supervised mode
//"OCIS_RUN_EXTENSIONS": "settings,storage-system,graph,graph-explorer,idp,idm,ocs,store,thumbnails,web,webdav,frontend,gateway,users,groups,auth-basic,auth-bearer,storage-authmachine,storage-users,storage-shares,storage-publiclink,storage-system,app-provider,sharing,proxy,ocdav",
// OCIS_RUN_SERVICES allows to start a subset of services even in the supervised mode
//"OCIS_RUN_SERVICES": "settings,storage-system,graph,graph-explorer,idp,idm,ocs,store,thumbnails,web,webdav,frontend,gateway,users,groups,auth-basic,auth-bearer,storage-authmachine,storage-users,storage-shares,storage-publiclink,storage-system,app-provider,sharing,proxy,ocdav",

/*
* Keep secrets and passwords in one block to allow easy uncommenting
Expand Down
58 changes: 29 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ L10N_MODULES := $(shell find . -path '*.tx*' -name 'config' | sed 's|/[^/]*$$||'

# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
extensions/app-provider \
extensions/app-registry \
extensions/audit \
extensions/auth-basic \
extensions/auth-bearer \
extensions/auth-machine \
extensions/frontend \
extensions/gateway \
extensions/graph \
extensions/graph-explorer \
extensions/groups \
extensions/idm \
extensions/idp \
extensions/nats \
extensions/notifications \
extensions/ocdav \
extensions/ocs \
extensions/proxy \
extensions/settings \
extensions/sharing \
extensions/storage-system \
extensions/storage-publiclink \
extensions/storage-shares \
extensions/storage-users \
extensions/store \
extensions/thumbnails \
extensions/users \
extensions/web \
extensions/webdav\
services/app-provider \
services/app-registry \
services/audit \
services/auth-basic \
services/auth-bearer \
services/auth-machine \
services/frontend \
services/gateway \
services/graph \
services/graph-explorer \
services/groups \
services/idm \
services/idp \
services/nats \
services/notifications \
services/ocdav \
services/ocs \
services/proxy \
services/settings \
services/sharing \
services/storage-system \
services/storage-publiclink \
services/storage-shares \
services/storage-users \
services/store \
services/thumbnails \
services/users \
services/web \
services/webdav\
ocis \
ocis-pkg

Expand Down
4 changes: 2 additions & 2 deletions deployments/examples/oc10_ocis_parallel/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ services:
# ownCloud storage readonly
OCIS_STORAGE_READ_ONLY: "false" # TODO: conflict with OWNCLOUDSQL -> https://github.com/owncloud/ocis/issues/2303
# General oCIS config
# OCIS_RUN_EXTENSIONS specifies to start all fullstack extensions except idm and idp. These are replaced by external services
OCIS_RUN_EXTENSIONS: app-registry,app-provider,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav
# OCIS_RUN_SERVICES specifies to start all fullstack services except idm and idp. These are replaced by external services
OCIS_RUN_SERVICES: app-registry,app-provider,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}"
OCIS_URL: https://${CLOUD_DOMAIN:-cloud.owncloud.test}
Expand Down
2 changes: 1 addition & 1 deletion deployments/examples/ocis_hello/config/ocis/proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ policy_selector:
policies:
- name: ocis
routes:
# defaults, taken from https://owncloud.dev/extensions/proxy/configuration/
# defaults, taken from https://owncloud.dev/services/proxy/configuration/
- endpoint: /
backend: http://localhost:9100
- endpoint: /.well-known/
Expand Down
4 changes: 2 additions & 2 deletions deployments/examples/ocis_ldap/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ services:
IDP_LDAP_UUID_ATTRIBUTE: "ownclouduuid"
IDP_LDAP_UUID_ATTRIBUTE_TYPE: binary
GRAPH_LDAP_SERVER_WRITE_ENABLED: "false" # assuming the external ldap is readonly
# OCIS_RUN_EXTENSIONS specifies to start all extensions except glauth, idm and accounts. These are replaced by external services
OCIS_RUN_EXTENSIONS: app-registry,app-provider,audit,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,idp,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav
# OCIS_RUN_SERVICES specifies to start all services except glauth, idm and accounts. These are replaced by external services
OCIS_RUN_SERVICES: app-registry,app-provider,audit,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,idp,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav
# General oCIS config
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: docs-generate
docs-generate: ## run docs-generate for all oCIS extensions
docs-generate: ## run docs-generate for all oCIS services
@pushd helpers && go run configenvextractor.go; popd
@$(MAKE) --no-print-directory -C ../ docs-generate

Expand Down
4 changes: 2 additions & 2 deletions docs/helpers/adoc-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/v2/extensions/", "",
"github.com/owncloud/ocis/v2/services/", "",
"/pkg/config/defaults", "",
)
var fields []ConfigField
Expand All @@ -48,7 +48,7 @@ m := map[string]interface{}{
{{- end }}
}

targetFolder := "../../docs/extensions/_includes/adoc/"
targetFolder := "../../docs/services/_includes/adoc/"
for pkg, conf := range m {
fields = GetAnnotatedVariables(conf)
if len(fields) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion docs/helpers/configenvextractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var targets = map[string]string{

func main() {
fmt.Println("Getting relevant packages")
paths, err := filepath.Glob("../../extensions/*/pkg/config/defaults/defaultconfig.go")
paths, err := filepath.Glob("../../services/*/pkg/config/defaults/defaultconfig.go")
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions docs/helpers/environment-variable-docs-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/v2/extensions/", "",
"github.com/owncloud/ocis/v2/services/", "",
"/pkg/config/defaults", "",
)
var fields []ConfigField
Expand All @@ -42,7 +42,7 @@ m := map[string]interface{}{
{{- end }}
}

targetFolder := "../../docs/extensions/_includes/"
targetFolder := "../../docs/services/_includes/"
for pkg, conf := range m {
fields = GetAnnotatedVariables(conf)
if len(fields) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions docs/helpers/example-config-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func main() {
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/v2/extensions/", "",
"github.com/owncloud/ocis/v2/services/", "",
"/pkg/config/defaults", "",
)
cfg := map[string]string{
Expand All @@ -35,7 +35,7 @@ func main() {
targetFolders := []string{
// TODO: comment in when it is clear how to commit this to the structure of the master|main branch
// filepath.Join("../../", pkg, "/config"),
"../../docs/extensions/_includes/",
"../../docs/services/_includes/",
}
for _, targetFolder := range targetFolders {
os.MkdirAll(targetFolder, 0700)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 30 additions & 30 deletions ocis-pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ package config
import (
"github.com/owncloud/ocis/v2/ocis-pkg/shared"

appProvider "github.com/owncloud/ocis/v2/extensions/app-provider/pkg/config"
appRegistry "github.com/owncloud/ocis/v2/extensions/app-registry/pkg/config"
audit "github.com/owncloud/ocis/v2/extensions/audit/pkg/config"
authbasic "github.com/owncloud/ocis/v2/extensions/auth-basic/pkg/config"
authbearer "github.com/owncloud/ocis/v2/extensions/auth-bearer/pkg/config"
authmachine "github.com/owncloud/ocis/v2/extensions/auth-machine/pkg/config"
frontend "github.com/owncloud/ocis/v2/extensions/frontend/pkg/config"
gateway "github.com/owncloud/ocis/v2/extensions/gateway/pkg/config"
graphExplorer "github.com/owncloud/ocis/v2/extensions/graph-explorer/pkg/config"
graph "github.com/owncloud/ocis/v2/extensions/graph/pkg/config"
groups "github.com/owncloud/ocis/v2/extensions/groups/pkg/config"
idm "github.com/owncloud/ocis/v2/extensions/idm/pkg/config"
idp "github.com/owncloud/ocis/v2/extensions/idp/pkg/config"
nats "github.com/owncloud/ocis/v2/extensions/nats/pkg/config"
notifications "github.com/owncloud/ocis/v2/extensions/notifications/pkg/config"
ocdav "github.com/owncloud/ocis/v2/extensions/ocdav/pkg/config"
ocs "github.com/owncloud/ocis/v2/extensions/ocs/pkg/config"
proxy "github.com/owncloud/ocis/v2/extensions/proxy/pkg/config"
search "github.com/owncloud/ocis/v2/extensions/search/pkg/config"
settings "github.com/owncloud/ocis/v2/extensions/settings/pkg/config"
sharing "github.com/owncloud/ocis/v2/extensions/sharing/pkg/config"
storagepublic "github.com/owncloud/ocis/v2/extensions/storage-publiclink/pkg/config"
storageshares "github.com/owncloud/ocis/v2/extensions/storage-shares/pkg/config"
storagesystem "github.com/owncloud/ocis/v2/extensions/storage-system/pkg/config"
storageusers "github.com/owncloud/ocis/v2/extensions/storage-users/pkg/config"
store "github.com/owncloud/ocis/v2/extensions/store/pkg/config"
thumbnails "github.com/owncloud/ocis/v2/extensions/thumbnails/pkg/config"
users "github.com/owncloud/ocis/v2/extensions/users/pkg/config"
web "github.com/owncloud/ocis/v2/extensions/web/pkg/config"
webdav "github.com/owncloud/ocis/v2/extensions/webdav/pkg/config"
appProvider "github.com/owncloud/ocis/v2/services/app-provider/pkg/config"
appRegistry "github.com/owncloud/ocis/v2/services/app-registry/pkg/config"
audit "github.com/owncloud/ocis/v2/services/audit/pkg/config"
authbasic "github.com/owncloud/ocis/v2/services/auth-basic/pkg/config"
authbearer "github.com/owncloud/ocis/v2/services/auth-bearer/pkg/config"
authmachine "github.com/owncloud/ocis/v2/services/auth-machine/pkg/config"
frontend "github.com/owncloud/ocis/v2/services/frontend/pkg/config"
gateway "github.com/owncloud/ocis/v2/services/gateway/pkg/config"
graphExplorer "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config"
graph "github.com/owncloud/ocis/v2/services/graph/pkg/config"
groups "github.com/owncloud/ocis/v2/services/groups/pkg/config"
idm "github.com/owncloud/ocis/v2/services/idm/pkg/config"
idp "github.com/owncloud/ocis/v2/services/idp/pkg/config"
nats "github.com/owncloud/ocis/v2/services/nats/pkg/config"
notifications "github.com/owncloud/ocis/v2/services/notifications/pkg/config"
ocdav "github.com/owncloud/ocis/v2/services/ocdav/pkg/config"
ocs "github.com/owncloud/ocis/v2/services/ocs/pkg/config"
proxy "github.com/owncloud/ocis/v2/services/proxy/pkg/config"
search "github.com/owncloud/ocis/v2/services/search/pkg/config"
settings "github.com/owncloud/ocis/v2/services/settings/pkg/config"
sharing "github.com/owncloud/ocis/v2/services/sharing/pkg/config"
storagepublic "github.com/owncloud/ocis/v2/services/storage-publiclink/pkg/config"
storageshares "github.com/owncloud/ocis/v2/services/storage-shares/pkg/config"
storagesystem "github.com/owncloud/ocis/v2/services/storage-system/pkg/config"
storageusers "github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
store "github.com/owncloud/ocis/v2/services/store/pkg/config"
thumbnails "github.com/owncloud/ocis/v2/services/thumbnails/pkg/config"
users "github.com/owncloud/ocis/v2/services/users/pkg/config"
web "github.com/owncloud/ocis/v2/services/web/pkg/config"
webdav "github.com/owncloud/ocis/v2/services/webdav/pkg/config"
)

const (
Expand Down
Loading

0 comments on commit fdae5f4

Please sign in to comment.