Skip to content

Commit

Permalink
Rename sleuthers to minions (Fixes #866)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahid Akbar committed Sep 5, 2018
1 parent ead2620 commit 8ad02ce
Show file tree
Hide file tree
Showing 143 changed files with 270 additions and 247 deletions.
14 changes: 7 additions & 7 deletions .gitlab-ci.yml
Expand Up @@ -223,7 +223,7 @@ buildtest:typescript-apis:
- "*/dist"
expire_in: 30 days

buildtest:sleuthers:
buildtest:minions:
stage: buildtest
image: registry.gitlab.com/magda-data/magda/data61/magda-builder-nodejs:$CI_COMMIT_REF_SLUG
retry: 1
Expand All @@ -233,8 +233,8 @@ buildtest:sleuthers:
cache:
paths: []
script:
- yarn run in-submodules -- -f categories.sleuther=true -- run build --include-filtered-dependencies
- yarn run in-submodules -- -f categories.sleuther=true -- run test
- yarn run in-submodules -- -f categories.minion=true -- run build --include-filtered-dependencies
- yarn run in-submodules -- -f categories.minion=true -- run test
artifacts:
paths:
- "*/dist"
Expand Down Expand Up @@ -331,7 +331,7 @@ dockerize:typescript-apis:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- yarn run in-submodules -- -f categories.api=true -f language=typescript -- run docker-build-prod --include-filtered-dependencies -- -- --repository=$CI_REGISTRY/magda-data/magda --version=$CI_COMMIT_REF_SLUG --cacheFromVersion=master

dockerize:sleuthers:
dockerize:minions:
stage: dockerize
image: registry.gitlab.com/magda-data/magda/data61/magda-builder-docker:$CI_COMMIT_REF_SLUG
retry: 2
Expand All @@ -342,10 +342,10 @@ dockerize:sleuthers:
dependencies:
- builders-and-yarn
- registry-typescript-api
- buildtest:sleuthers
- buildtest:minions
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- yarn run in-submodules -- -f categories.sleuther=true -- run docker-build-prod --include-filtered-dependencies -- -- --repository=$CI_REGISTRY/magda-data/magda --version=$CI_COMMIT_REF_SLUG --cacheFromVersion=master
- yarn run in-submodules -- -f categories.minion=true -- run docker-build-prod --include-filtered-dependencies -- -- --repository=$CI_REGISTRY/magda-data/magda --version=$CI_COMMIT_REF_SLUG --cacheFromVersion=master

dockerize:connectors:
stage: dockerize
Expand Down Expand Up @@ -490,7 +490,7 @@ Deploy Master To Dev:
- export KUBECONFIG=kubectlconfig.yaml
- kubectl create secret docker-registry regcred --namespace default --docker-server=registry.gitlab.com --docker-username=gitlab-ci-token --docker-password=$CI_JOB_TOKEN --docker-email=alex.gilleran@data61.csiro.au --dry-run -o json | kubectl apply --namespace default -f -
- helm upgrade magda deploy/helm/magda --install --recreate-pods -f deploy/helm/magda-dev.yml --set global.image.repository=registry.gitlab.com/magda-data/magda/data61,global.image.tag=master --timeout 1200 --wait

Release Tags To Docker Hub:
stage: release
only:
Expand Down
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -38,13 +38,13 @@ matrix:
# Cleanup the cached directories to avoid unnecessary cache updates
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
script:
script:
- yarn run in-submodules -- -f categories.api=true -f language=typescript -- run build --include-filtered-dependencies
- yarn run in-submodules -- -f categories.api=true -f language=typescript -- run test
- yarn run in-submodules -- -f categories.api=true -f language=typescript -- run test
- yarn run in-submodules -- -f categories.connector=true -- run build --include-filtered-dependencies
- yarn run in-submodules -- -f categories.connector=true -- run test
- yarn run in-submodules -- -f categories.sleuther=true -- run build --include-filtered-dependencies
- yarn run in-submodules -- -f categories.sleuther=true -- run test
- yarn run in-submodules -- -f categories.connector=true -- run test
- yarn run in-submodules -- -f categories.minion=true -- run build --include-filtered-dependencies
- yarn run in-submodules -- -f categories.minion=true -- run test
env:
global:
- CI=true
Expand Down
24 changes: 12 additions & 12 deletions .vscode/launch.json
Expand Up @@ -69,7 +69,7 @@
"type": "node",
"request": "launch",
"protocol": "inspector",
"name": "Sleuther Format",
"name": "Minion Format",
"runtimeExecutable":
"${workspaceRoot}/scripts/node_modules/.bin/ts-node",
"windows": {
Expand All @@ -85,7 +85,7 @@
"--userId",
"00000000-0000-4000-8000-000000000000"
],
"cwd": "${workspaceRoot}/magda-sleuther-format"
"cwd": "${workspaceRoot}/magda-minion-format"
},
{
"type": "node",
Expand Down Expand Up @@ -116,9 +116,9 @@
"type": "node",
"request": "launch",
"protocol": "inspector",
"name": "Sleuther Framework tests",
"name": "Minion Framework tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"cwd": "${workspaceRoot}/magda-sleuther-framework",
"cwd": "${workspaceRoot}/magda-minion-framework",
"args": [
"--compilers",
"ts:ts-node/register",
Expand All @@ -131,9 +131,9 @@
"type": "node",
"request": "launch",
"protocol": "inspector",
"name": "format sleuther api tests",
"name": "format minion api tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"cwd": "${workspaceRoot}/magda-sleuther-format",
"cwd": "${workspaceRoot}/magda-minion-format",
"args": [
"--compilers",
"ts:ts-node/register",
Expand All @@ -146,10 +146,10 @@
"type": "node",
"request": "launch",
"protocol": "inspector",
"name": "sleuther-linked-data-rating",
"name": "minion-linked-data-rating",
"program":
"${workspaceRoot}/magda-sleuther-linked-data-rating/node_modules/mocha/bin/_mocha",
"cwd": "${workspaceRoot}/magda-sleuther-linked-data-rating",
"${workspaceRoot}/magda-minion-linked-data-rating/node_modules/mocha/bin/_mocha",
"cwd": "${workspaceRoot}/magda-minion-linked-data-rating",
"args": [
"--compilers",
"ts:@magda/scripts/node_modules/ts-node/register",
Expand All @@ -162,10 +162,10 @@
"type": "node",
"request": "launch",
"protocol": "inspector",
"name": "sleuther-broken-link test",
"name": "minion-broken-link test",
"program":
"${workspaceRoot}/magda-sleuther-broken-link/node_modules/mocha/bin/_mocha",
"cwd": "${workspaceRoot}/magda-sleuther-broken-link",
"${workspaceRoot}/magda-minion-broken-link/node_modules/mocha/bin/_mocha",
"cwd": "${workspaceRoot}/magda-minion-broken-link",
"args": [
"--compilers",
"ts:@magda/scripts/node_modules/ts-node/register",
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -2,6 +2,7 @@

- Make sure CKAN connector doesn't loop forever if server reports wrong dataset count or empty page
- Whitelist KMZ.
- Rename sleuthers to minions
- Add ability to change content (logo).
- CSW connector will exit with code 1 if error happens
- Fixed an issue of format enhancer processing MIME
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -50,11 +50,11 @@ Most importantly, aspects are able to be declared dynamically by other services

Connectors go out to external datasources and copy their metadata into the Registry, so that they can be searched and have other aspects attached to them. A connector is simply a docker-based microservice that is invoked as a [job](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/). It scans the target datasource (usually an open-data portal), then completes and shuts down. We have connectors for a number of existing open data formats, otherwise you can easily write and run your own.

### Sleuthers
### Minions

A sleuther is a service that listens for new records or changes to existing records, performs some kind of operation and then writes the result back to the registry. For instance, we have a broken link sleuther that listens for changes to distributions, retrieves the URLs described, records whether they were able to be accessed successfully and then writes that back to the registry in its own aspect.
A minion is a service that listens for new records or changes to existing records, performs some kind of operation and then writes the result back to the registry. For instance, we have a broken link minion that listens for changes to distributions, retrieves the URLs described, records whether they were able to be accessed successfully and then writes that back to the registry in its own aspect.

Other aspects exist that are written to by many sleuthers - for instance, we have a "quality" aspect that contains a number of different quality ratings from different sources, which are averaged out and used by search.
Other aspects exist that are written to by many minions - for instance, we have a "quality" aspect that contains a number of different quality ratings from different sources, which are averaged out and used by search.

### Search

Expand Down
10 changes: 5 additions & 5 deletions deploy/helm/magda-dev.yml
Expand Up @@ -10,17 +10,17 @@ global:
tags:
all: true
ingress: true
sleuther-broken-link: true
sleuther-linked-data-rating: true
sleuther-visualization: true
sleuther-format: true
minion-broken-link: true
minion-linked-data-rating: true
minion-visualization: true
minion-format: true

ingress:
hostname: dev.magda.io
ingressClass: nginx
enableTls: true
useDefaultCertificate: true

gateway:
ckanRedirectionDomain: "ckan.data.gov.au"
enableAuthEndpoint: true
Expand Down
@@ -1,4 +1,3 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: sleuther-broken-link

name: minion-broken-link
@@ -1,7 +1,7 @@
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: sleuther-broken-link-recrawl
name: minion-broken-link-recrawl
spec:
concurrencyPolicy: Allow
schedule: "0 0 14,28 * *"
Expand All @@ -12,16 +12,16 @@ spec:
spec:
template:
metadata:
name: sleuther-broken-link-recrawl
name: minion-broken-link-recrawl
labels:
cron: sleuther-broken-link-recrawl
cron: minion-broken-link-recrawl
spec:
containers:
- image: "alpine"
imagePullPolicy: IfNotPresent
name: sleuther-broken-link-recrawl
command:
name: minion-broken-link-recrawl
command:
- "/bin/sh"
- "-c"
- "apk add --no-cache ca-certificates curl && curl -i -X POST http://sleuther-broken-link/recrawl"
restartPolicy: OnFailure
- "apk add --no-cache ca-certificates curl && curl -i -X POST http://minion-broken-link/recrawl"
restartPolicy: OnFailure
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sleuther-visualization
name: minion-broken-link
spec:
replicas: 1
strategy:
Expand All @@ -10,10 +10,10 @@ spec:
template:
metadata:
labels:
service: sleuther-visualization
service: minion-broken-link
spec:
containers:
- name: sleuther-visualization
- name: minion-broken-link
image: {{ template "dockerimage" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.image.pullPolicy }}
{{- if .Values.global.enableLivenessProbes }}
Expand All @@ -35,7 +35,7 @@ spec:
- name: USER_ID
value: {{ .Values.global.defaultAdminUserId }}
- name: INTERNAL_URL
value: "http://sleuther-visualization"
value: "http://minion-broken-link"
- name: JWT_SECRET
valueFrom:
secretKeyRef:
Expand Down
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: sleuther-broken-link
name: minion-broken-link
spec:
ports:
- name: http
Expand All @@ -12,4 +12,4 @@ spec:
type: NodePort
{{- end }}
selector:
service: sleuther-broken-link
service: minion-broken-link
@@ -1,4 +1,3 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: sleuther-format

name: minion-format
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sleuther-format
name: minion-format
spec:
replicas: 1
strategy:
Expand All @@ -10,10 +10,10 @@ spec:
template:
metadata:
labels:
service: sleuther-format
service: minion-format
spec:
containers:
- name: sleuther-format
- name: minion-format
image: {{ template "dockerimage" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.image.pullPolicy }}
{{- if .Values.global.enableLivenessProbes }}
Expand All @@ -35,9 +35,9 @@ spec:
- name: USER_ID
value: {{ .Values.global.defaultAdminUserId }}
- name: INTERNAL_URL
value: "http://sleuther-format"
value: "http://minion-format"
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: auth-secrets
key: jwt-secret
key: jwt-secret
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: sleuther-format
name: minion-format
spec:
ports:
- name: http
Expand All @@ -12,4 +12,4 @@ spec:
type: NodePort
{{- end }}
selector:
service: sleuther-format
service: minion-format
@@ -1,4 +1,3 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: sleuther-linked-data-rating

name: minion-linked-data-rating
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sleuther-linked-data-rating
name: minion-linked-data-rating
spec:
replicas: 1
strategy:
Expand All @@ -10,10 +10,10 @@ spec:
template:
metadata:
labels:
service: sleuther-linked-data-rating
service: minion-linked-data-rating
spec:
containers:
- name: sleuther-linked-data-rating
- name: minion-linked-data-rating
image: {{ template "dockerimage" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.image.pullPolicy }}
{{- if .Values.global.enableLivenessProbes }}
Expand All @@ -35,9 +35,9 @@ spec:
- name: USER_ID
value: {{ .Values.global.defaultAdminUserId }}
- name: INTERNAL_URL
value: "http://sleuther-linked-data-rating"
value: "http://minion-linked-data-rating"
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: auth-secrets
key: jwt-secret
key: jwt-secret
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: sleuther-linked-data-rating
name: minion-linked-data-rating
spec:
ports:
- name: http
Expand All @@ -12,4 +12,4 @@ spec:
type: NodePort
{{- end }}
selector:
service: sleuther-linked-data-rating
service: minion-linked-data-rating
@@ -1,4 +1,3 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: sleuther-visualization

name: minion-visualization

0 comments on commit 8ad02ce

Please sign in to comment.