Commit 41b578a2 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Renamed everything from nomadxt to nomad.

parent a7ba32f8
......@@ -20,7 +20,7 @@
# The dockerfile is multistages to getaway with building on a larger base image.
# using the base image with most requirements already installed
FROM nomadxt_requirements:latest as requirements
FROM nomad_requirements:latest as requirements
# we use slim for the final image
FROM python:3.6-slim as final
......
......@@ -109,9 +109,9 @@ reinstall them all the time, we need to build new images.
The fontend image is only for building and serving the gui.
Build the requirements image tagged `nomadxt_requirements`:
Build the requirements image tagged `nomad_requirements`:
```
docker build -t nomadxt_requirements -f requirements.Dockerfile .
docker build -t nomad_requirements -f requirements.Dockerfile .
```
The other images are build via *docker-compose* and don't have to be created manually.
......@@ -121,7 +121,7 @@ The other images are build via *docker-compose* and don't have to be created man
Now we can build the *docker-compose* that contains all external services (rabbitmq,
mongo, elastic, minio, elk) and nomad services (worker, handler, api, gui).
```
cd ./infrastructure/nomadxt
cd ./infrastructure/nomad
docker-compose build
```
......@@ -167,7 +167,7 @@ docker-compose up api gui proxy
Usually these services only used by the nomad containers, but sometimes you also
need to checkseomthing or do some manual steps.
The file `infrastructure/nomadxt/.env` contains variables that control the ports
The file `infrastructure/nomad/.env` contains variables that control the ports
used to bind internal docker ports to your host machine. These are the ports you
have to use to connect to the respective services.
......
......@@ -13,5 +13,5 @@ RUN yarn build
# production environment
FROM nginx:1.13.9-alpine
COPY --from=builder /nomad/app/build /app/nomadxt
COPY --from=builder /nomad/app/build /app/nomad
CMD ["nginx", "-g", "daemon off;"]
REACT_APP_API_BASE = 'http://localhost:8000/nomadxt/api'
REACT_APP_API_BASE = 'http://localhost:8000/nomad/api'
REACT_APP_OBJECT_BASE = 'http://localhost:9007'
REACT_APP_APP_BASE = '/nomadxt'
REACT_APP_APP_BASE = '/nomad'
REACT_APP_APP_STATIC_BASE = ''
REACT_APP_DEBUG = 'true'
\ No newline at end of file
REACT_APP_API_BASE = '/nomadxt/api'
REACT_APP_OBJECT_BASE = '/nomadxt/objects'
REACT_APP_APP_BASE = '/nomadxt'
REACT_APP_APP_STATIC_BASE = '/nomadxt'
REACT_APP_API_BASE = '/nomad/api'
REACT_APP_OBJECT_BASE = '/nomad/objects'
REACT_APP_APP_BASE = '/nomad'
REACT_APP_APP_STATIC_BASE = '/nomad'
REACT_APP_DEBUG = 'true'
\ No newline at end of file
......@@ -40,5 +40,5 @@
"eslint-plugin-standard": "^3.1.0",
"serve": "^10.0.0"
},
"homepage": "http://mywebsite.com/nomadxt"
"homepage": "http://mywebsite.com/nomad"
}
......@@ -30,7 +30,7 @@ class Development extends React.Component {
This system pushes logs, events, monitoring data,
and other application metrics to a central database where it
can be analysed visually.
\n\n[Link to Kiaba](/nomadxt/kibana/)
\n\n[Link to Kiaba](/nomad/kibana/)
`}</Markdown>
</div>
)
......
......@@ -8,7 +8,7 @@ This image is based on the populer elk-stack docker image:
- disabled ssl for beats communication to logstash server
- added tcp input
- simplified elastic search output (don't now how to set metric and other vars yet :-()
- added kibana.yml::server.basePath="/nomadxt/kibana"
- added kibana.yml::server.basePath="/nomad/kibana"
## Usage
......@@ -17,7 +17,7 @@ You can run this image outside the usual docker-compose.
To use this image with reverse proxy in nginx, use:
```
location ~ ^/nomadxt/kibana/(.*)$ {
location ~ ^/nomad/kibana/(.*)$ {
proxy_pass http://130.183.207.116:15601/$1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
......
......@@ -11,7 +11,7 @@ server.host: "0.0.0.0"
# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects
# the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests
# to Kibana. This setting cannot end in a slash.
server.basePath: "/nomadxt/kibana"
server.basePath: "/nomad/kibana"
# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576
#!/bin/bash
docker build -t nomadxt_elk .
docker run -v nomadxt_elk:/var/lib/elasticsearch -p 15601:5601 -p 15000:5000 -p 15044:5044 --restart=always nomadxt_elk
\ No newline at end of file
docker build -t nomad_elk .
docker run -v nomad_elk:/var/lib/elasticsearch -p 15601:5601 -p 15000:5000 -p 15044:5044 --restart=always nomad_elk
\ No newline at end of file
......@@ -9,6 +9,6 @@ API_HOST_PORT=18000
GUI_HOST_PORT=18080
APP_HOST_PORT=0.0.0.0:10080
VOLUME_BINDS=/scratch/nomadxt
VOLUME_BINDS=/scratch/nomad_FAIR
EXTERNAL_HOST=enc-staging-nomad.esc.rzg.mpg.de
EXTERNAL_PORT=80
......@@ -20,7 +20,7 @@ services:
restart: always
image: minio/minio:RELEASE.2018-06-08T03-49-38Z
# image: minio/minio
container_name: nomadxt_minio
container_name: nomad_minio
ports:
- ${MINIO_HOST_PORT}:9000
volumes:
......@@ -48,7 +48,7 @@ services:
rabbitmq:
restart: always
image: rabbitmq
container_name: nomadxt_rabbitmq
container_name: nomad_rabbitmq
environment:
- RABBITMQ_ERLANG_COOKIE=SWQOKODSQALRPCLNMEQG
- RABBITMQ_DEFAULT_USER=rabbitmq
......@@ -57,26 +57,26 @@ services:
ports:
- ${RABBITMQ_HOST_PORT}:5672
volumes:
- nomadxt_rabbitmq:/var/lib/rabbitmq
- nomad_rabbitmq:/var/lib/rabbitmq
# the search engine
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
container_name: nomadxt_elastic
container_name: nomad_elastic
volumes:
- nomadxt_elastic:/usr/share/elasticsearch/data
- nomad_elastic:/usr/share/elasticsearch/data
ports:
- ${ELASTIC_HOST_PORT}:9200
# the user data db
mongo:
image: mongo:latest
container_name: nomadxt_mongo
container_name: nomad_mongo
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- nomadxt_mongo:/data/db
- nomad_mongo:/data/db
ports:
- ${MONGO_HOST_PORT}:27017
command: mongod --smallfiles --logpath=/dev/null # --quiet
......@@ -85,12 +85,12 @@ services:
elk:
restart: always
build: ../elk/
container_name: nomadxt_elk
container_name: nomad_elk
expose:
- 5000 # logstash beats
- 5044 # logstash tcp
volumes:
- nomadxt_elk:/var/lib/elasticsearch
- nomad_elk:/var/lib/elasticsearch
ports:
- ${KIBANA_HOST_PORT}:5601 # kibana web
......@@ -100,7 +100,7 @@ services:
build:
context: ../../
dockerfile: backend.Dockerfile
container_name: nomadxt_worker
container_name: nomad_worker
environment:
- NOMAD_MINIO_PORT=9000
- NOMAD_MINIO_HOST=minio
......@@ -108,7 +108,7 @@ services:
- NOMAD_LOGSTASH_HOST=elk
- NOMAD_ELASTIC_HOST=elastic
- NOMAD_MONGO_HOST=mongo
- NOMAD_SERVICE=nomadxt_worker
- NOMAD_SERVICE=nomad_worker
links:
- minio
- rabbitmq
......@@ -125,7 +125,7 @@ services:
build:
context: ../../
dockerfile: backend.Dockerfile
container_name: nomadxt_handler
container_name: nomad_handler
environment:
- NOMAD_MINIO_PORT=9000
- NOMAD_MINIO_HOST=minio
......@@ -133,7 +133,7 @@ services:
- NOMAD_LOGSTASH_HOST=elk
- NOMAD_MONGO_HOST=mongo
- NOMAD_ELASTIC_HOST=elastic
- NOMAD_SERVICE=nomadxt_handler
- NOMAD_SERVICE=nomad_handler
links:
- minio
- rabbitmq
......@@ -148,7 +148,7 @@ services:
build:
context: ../../
dockerfile: backend.Dockerfile
container_name: nomadxt_api
container_name: nomad_api
environment:
- NOMAD_MINIO_PORT=9000
- NOMAD_MINIO_HOST=minio
......@@ -156,11 +156,11 @@ services:
- NOMAD_LOGSTASH_HOST=elk
- NOMAD_ELASTIC_HOST=elastic
- NOMAD_MONGO_HOST=mongo
- NOMAD_API_BASE_PATH=/nomadxt/api
- NOMAD_API_BASE_PATH=/nomad/api
- NOMAD_OBJECTS_HOST=${EXTERNAL_HOST}
- NOMAD_OBJECTS_PORT=${EXTERNAL_PORT}
- NOMAD_OBJECTS_BASE_PATH=/nomadxt/objects
- NOMAD_SERVICE=nomadxt_api
- NOMAD_OBJECTS_BASE_PATH=/nomad/objects
- NOMAD_SERVICE=nomad_api
links:
- minio
- rabbitmq
......@@ -176,7 +176,7 @@ services:
build:
context: ../../
dockerfile: frontend.Dockerfile
container_name: nomadxt_gui
container_name: nomad_gui
ports:
- ${GUI_HOST_PORT}:8080
volumes:
......@@ -187,7 +187,7 @@ services:
proxy:
restart: always
image: nginx:1.13.9-alpine
container_name: nomadxt_proxy
container_name: nomad_proxy
links:
- elk
- gui
......@@ -200,11 +200,11 @@ services:
command: nginx -g 'daemon off;'
volumes:
nomadxt_minio:
nomadxt_mongo:
nomadxt_elastic:
nomadxt_redis:
nomadxt_rabbitmq:
nomadxt_elk:
nomad_minio:
nomad_mongo:
nomad_elastic:
nomad_redis:
nomad_rabbitmq:
nomad_elk:
......@@ -2,8 +2,8 @@ server {
listen 8080;
server_name www.example.com;
location /nomadxt {
location /nomad {
root /app/;
try_files $uri /nomadxt/index.html; # fall back to index.html to support routing
try_files $uri /nomad/index.html; # fall back to index.html to support routing
}
}
......@@ -2,19 +2,19 @@ server {
listen 80;
server_name www.example.com;
location /nomadxt {
location /nomad {
proxy_pass http://gui:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /nomadxt/api {
location /nomad/api {
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_pass http://api:8000;
}
location ~ ^/nomadxt/objects/(.*)$ {
location ~ ^/nomad/objects/(.*)$ {
client_max_body_size 20g;
resolver 127.0.0.11 ipv6=off; # docker embedded DNS
proxy_set_header Host $host;
......@@ -22,7 +22,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/nomadxt/kibana/(.*)$ {
location ~ ^/nomad/kibana/(.*)$ {
resolver 127.0.0.11 ipv6=off; # docker embedded DNS
proxy_pass http://elk:5601/$1$is_args$args; # fix: https://github.com/elastic/kibana/issues/13533
proxy_set_header Host $host;
......
......@@ -43,9 +43,9 @@ content-type: application/json
}
###
POST http://localhost:8000/nomadxt/api/admin/repair_uploads HTTP/1.1
POST http://localhost:8000/nomad/api/admin/repair_uploads HTTP/1.1
###
GET http://enc-staging-nomad.esc.rzg.mpg.de//nomadxt/api/uploads HTTP/1.1
GET http://enc-staging-nomad.esc.rzg.mpg.de//nomad/api/uploads HTTP/1.1
Authorization: Basic bWVAZ21haWwuY29tOm5vbWFk
......@@ -87,7 +87,7 @@ class UploadsRes(Resource):
.. sourcecode:: http
GET /nomadxt/api/uploads HTTP/1.1
GET /nomad/api/uploads HTTP/1.1
Accept: application/json
**Example response**:
......@@ -134,7 +134,7 @@ class UploadsRes(Resource):
.. sourcecode:: http
POST /nomadxt/api/uploads HTTP/1.1
POST /nomad/api/uploads HTTP/1.1
Accept: application/json
Content-Type: application/json
......@@ -206,7 +206,7 @@ class UploadRes(Resource):
.. sourcecode:: http
GET /nomadxt/api/uploads/5b89469e0d80d40008077dbc HTTP/1.1
GET /nomad/api/uploads/5b89469e0d80d40008077dbc HTTP/1.1
Accept: application/json
**Example response**:
......@@ -310,7 +310,7 @@ class UploadRes(Resource):
.. sourcecode:: http
POST /nomadxt/api/uploads HTTP/1.1
POST /nomad/api/uploads HTTP/1.1
Accept: application/json
Content-Type: application/json
......@@ -357,7 +357,7 @@ class UploadRes(Resource):
.. sourcecode:: http
DELETE /nomadxt/api/uploads/5b89469e0d80d40008077dbc HTTP/1.1
DELETE /nomad/api/uploads/5b89469e0d80d40008077dbc HTTP/1.1
Accept: application/json
:param string upload_id: the id for the upload
......@@ -396,7 +396,7 @@ class RepoCalcRes(Resource):
.. sourcecode:: http
GET /nomadxt/api/repo/W36aqCzAKxOCfIiMFsBJh3nHPb4a/7ddvtfRfZAvc3Crr7jOJ8UH0T34I HTTP/1.1
GET /nomad/api/repo/W36aqCzAKxOCfIiMFsBJh3nHPb4a/7ddvtfRfZAvc3Crr7jOJ8UH0T34I HTTP/1.1
Accept: application/json
**Example response**:
......@@ -457,7 +457,7 @@ class RepoCalcsRes(Resource):
.. sourcecode:: http
GET /nomadxt/api/repo?page=1&per_page=25 HTTP/1.1
GET /nomad/api/repo?page=1&per_page=25 HTTP/1.1
Accept: application/json
**Example response**:
......@@ -558,7 +558,7 @@ def get_calc(upload_hash, calc_hash):
.. sourcecode:: http
GET /nomadxt/api/archive/W36aqCzAKxOCfIiMFsBJh3nHPb4a/7ddvtfRfZAvc3Crr7jOJ8UH0T34I HTTP/1.1
GET /nomad/api/archive/W36aqCzAKxOCfIiMFsBJh3nHPb4a/7ddvtfRfZAvc3Crr7jOJ8UH0T34I HTTP/1.1
Accept: application/json
:param string upload_hash: the hash of the upload (from uploaded file contents)
......
......@@ -24,7 +24,7 @@ import sys
import requests
from requests.auth import HTTPBasicAuth
api_base = 'http://localhost/nomadxt/api'
api_base = 'http://localhost/nomad/api'
def upload_file(file_path, name=None, user='other@gmail.com', pw='nomad'):
......
......@@ -91,7 +91,7 @@ logstash = LogstashConfig(
level=int(os.environ.get('NOMAD_LOGSTASH_LEVEL', logging.DEBUG))
)
services = NomadServicesConfig(
api_base_path=os.environ.get('NOMAD_API_BASE_PATH', '/nomadxt/api'),
api_base_path=os.environ.get('NOMAD_API_BASE_PATH', '/nomad/api'),
objects_host=os.environ.get('NOMAD_OBJECTS_HOST', 'localhost'),
objects_port=int(os.environ.get('NOMAD_OBJECTS_PORT', minio.port)),
objects_base_path=os.environ.get('NOMAD_OBJECTS_BASE_PATH', ''),
......
GET http://localhost/nomadxt/api/uploads HTTP/1.1
GET http://localhost/nomad/api/uploads HTTP/1.1
###
POST http://localhost/nomadxt/api/uploads HTTP/1.1
POST http://localhost/nomad/api/uploads HTTP/1.1
content-type: application/json
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment