Skip to content

Commit

Permalink
Renaming ega- to lega-
Browse files Browse the repository at this point in the history
  • Loading branch information
silverdaz committed Nov 15, 2018
1 parent e47fa8f commit 5b1b0f3
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 60 deletions.
24 changes: 12 additions & 12 deletions deploy/bootstrap/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ services:
networks:
- lega-internal
volumes:
- ../images/mq/entrypoint.sh:/usr/bin/ega-entrypoint.sh
entrypoint: ["/bin/bash", "/usr/bin/ega-entrypoint.sh"]
- ../images/mq/entrypoint.sh:/usr/bin/lega-entrypoint.sh
entrypoint: ["/bin/bash", "/usr/bin/lega-entrypoint.sh"]
command: ["rabbitmq-server"]
# Postgres Database (using default port 5432)
Expand Down Expand Up @@ -375,14 +375,14 @@ services:
- ../images/db/download.sql:/docker-entrypoint-initdb.d/download.sql:ro
- ../images/db/qc.sql:/docker-entrypoint-initdb.d/qc.sql:ro
- ../images/db/grants.sql:/docker-entrypoint-initdb.d/grants.sql:ro
- ../images/db/entrypoint.sh:/usr/bin/ega-entrypoint.sh
- ../images/db/entrypoint.sh:/usr/bin/lega-entrypoint.sh
networks:
- lega-private
entrypoint: ["/bin/bash", "/usr/bin/ega-entrypoint.sh"]
entrypoint: ["/bin/bash", "/usr/bin/lega-entrypoint.sh"]
# SFTP inbox
inbox:
hostname: ega-inbox
hostname: inbox
environment:
- CEGA_USERS_ENDPOINT=https://egatest.crg.eu/lega/v1/legas/users/
- CEGA_USERS_JSON_PREFIX=response.result
Expand All @@ -397,13 +397,13 @@ services:
volumes:
- ./confs/inbox.ini:/etc/ega/conf.ini:ro
- inbox:/ega/inbox
- ../images/inbox/entrypoint.sh:/usr/bin/ega-entrypoint.sh
- ../images/inbox/entrypoint.sh:/usr/bin/lega-entrypoint.sh
- ~/_ega/lega:/home/lega/.local/lib/python3.6/site-packages/lega
- ~/_auth:/root/_auth
networks:
- lega-external
- lega-internal
entrypoint: ["/bin/bash", "/usr/bin/ega-entrypoint.sh"]
entrypoint: ["/bin/bash", "/usr/bin/lega-entrypoint.sh"]
# Ingestion Workers
ingest:
Expand Down Expand Up @@ -440,7 +440,7 @@ services:
networks:
- lega-internal
- lega-private
entrypoint: ["gosu", "lega", "ega-ingest"]
entrypoint: ["gosu", "lega", "lega-ingest"]
# Checksum validation
verify:
Expand Down Expand Up @@ -482,7 +482,7 @@ services:
networks:
- lega-internal
- lega-private
entrypoint: ["gosu", "lega", "ega-verify"]
entrypoint: ["gosu", "lega", "lega-verify"]
# Stable ID mapper, and inbox clean up
finalize:
Expand All @@ -507,7 +507,7 @@ services:
networks:
- lega-internal
- lega-private
entrypoint: ["gosu", "lega", "ega-finalize"]
entrypoint: ["gosu", "lega", "lega-finalize"]
# Here we use S3
vault:
Expand Down Expand Up @@ -540,7 +540,7 @@ services:
networks:
- lega-external
- lega-internal
entrypoint: ["gosu", "lega", "ega-outgest"]
entrypoint: ["gosu", "lega", "lega-outgest"]
# Re-Encryption
streamer:
Expand Down Expand Up @@ -582,7 +582,7 @@ services:
networks:
- lega-internal
- lega-private
entrypoint: ["gosu", "lega", "ega-streamer"]
entrypoint: ["gosu", "lega", "lega-streamer"]
EOF

# Adding the secrets
Expand Down
3 changes: 0 additions & 3 deletions deploy/bootstrap/settings.rc.sample
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#!/usr/bin/env bash
set -e

#DOCKER_IMAGE_PREFIX=crg/ega-

# Port mapping
DOCKER_PORT_inbox=2222
DOCKER_PORT_outgest=10443


# Credentials to connect to CentralEGA
add_secret 'cega_users.creds' "<username>:<password>" # provided by CentralEGA
add_secret 'cega_connection' "amqps://<user>:<password>@hellgate.crg.eu:5271/<vhost>" # provided by CentralEGA
Expand Down
8 changes: 4 additions & 4 deletions deploy/images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In the current folder, type `make` and the images are created in order.

It takes some time.

Later on, if the `crg/ega-*` do need to be recreated, one can type `make`.
Later on, if the `egarchive/*` do need to be recreated, one can type `make`.

`rabbitmq:3.6.16-management`, `postgres:11`, `centos:7.5.1804`,
`minio/minio:latest` are pulled from the main Docker hub.
Expand All @@ -17,6 +17,6 @@ The following images are created locally:

| Repository | Tag | Role |
|------------|:--------:|------|
| crg/ega-os | <HEAD commit> or latest | Base Operating System, including python 3.6.1 and extra libraries |
| crg/ega-base | <HEAD commit> or latest | All LocalEGA microservices on top of `crg/ega-os:latest` |
| crg/ega-inbox | <HEAD commit> or latest | SFTP server on top of `crg/ega-base:latest` |
| egarchive/base | <HEAD commit> or latest | Base Operating System, including python 3.6.1 and extra libraries |
| egarchive/lega | <HEAD commit> or latest | All LocalEGA microservices on top of `egarchive/base:latest` |
| egarchive/inbox | <HEAD commit> or latest | SFTP server on top of `egarchive/base:latest` |
2 changes: 1 addition & 1 deletion deploy/images/inbox/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ chmod 750 /ega/inbox
chmod g+s /ega/inbox # setgid bit

echo "Starting the FileSystem upload notification server"
gosu lega ega-notifier &
gosu lega lega-notifier &

echo "Starting the SFTP server"
exec /opt/openssh/sbin/ega -D -e -f /etc/ega/sshd_config
16 changes: 8 additions & 8 deletions docs/static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body { overflow-x: initial !important; } /* Fix readthedocs bug */
/* #ega thead { valign:top; } */
/* #ega tbody { valign:bottom; } */

#ega { margin-bottom: 1.5em; }
#lega { margin-bottom: 1.5em; }

/* #ega tr th { font-size: 90%; margin: 0; overflow: visible; padding: 0.5em 1em; border: 1px solid #e1e4e5; text-align:left; white-space: initial; } */
/* #ega tr th { font-weight: bold; border: 1px solid #e1e4e5; border-bottom-width:2px; } */
Expand All @@ -19,14 +19,14 @@ body { overflow-x: initial !important; } /* Fix readthedocs bug */

/* #ega tbody tr:nth-child(odd){ background-color: #f3f6f6; } */

#ega tr td { font-size: 90%; margin: 0; padding: 0.5em 1em; border: 1px solid #e1e4e5; text-align:left; white-space: initial; vertical-align:middle; }
#ega tr td:first-child { text-align:right; border:none; font-weight:bold; font-variant: small-caps; }
#ega tr td:last-child { text-align:center; border:none; }
#lega tr td { font-size: 90%; margin: 0; padding: 0.5em 1em; border: 1px solid #e1e4e5; text-align:left; white-space: initial; vertical-align:middle; }
#lega tr td:first-child { text-align:right; border:none; font-weight:bold; font-variant: small-caps; }
#lega tr td:last-child { text-align:center; border:none; }


.ega-stable { color: green; }
.ega-dev { color: orange; }
.ega-unstable { color: red; }
.lega-stable { color: green; }
.lega-dev { color: orange; }
.lega-unstable { color: red; }


#ega thead{ display: none; }
#lega thead{ display: none; }
20 changes: 10 additions & 10 deletions docs/table.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<table id="ega">
<table id="lega">
<thead>
<tr>
<th>Service</th>
Expand All @@ -10,52 +10,52 @@
<tr>
<td>db</td>
<td>A Postgres database with appropriate schemas</td>
<td><i class="fa fa-battery-full ega-stable" title="Stable"></i></td>
<td><i class="fa fa-battery-full lega-stable" title="Stable"></i></td>
</tr>
<tr>
<td>mq</td>
<td>A RabbitMQ message broker with appropriate accounts,
exchanges, queues and bindings. We use a federated queue to get
messages from CentralEGA's broker and shovels to send answers
back.</td>
<td><i class="fa fa-battery-full ega-stable" title="Stable"></i></td>
<td><i class="fa fa-battery-full lega-stable" title="Stable"></i></td>
</tr>
<tr>
<td>inbox</td>
<td>SFTP server, acting as a dropbox, where user credentials come from Central EGA</td>
<td><i class="fa fa-battery-full ega-stable" title="Stable"></i></td>
<td><i class="fa fa-battery-full lega-stable" title="Stable"></i></td>
</tr>
<tr>
<td>ingesters</td>
<td>Split the Crypt4GH header and move the remainder to the storage backend. No cryptographic task.</td>
<td><i class="fa fa-battery-full ega-stable" title="Stable"></i></td>
<td><i class="fa fa-battery-full lega-stable" title="Stable"></i></td>
</tr>
<tr>
<td>verifiers</td>
<td>Decrypt the stored files and checksum them against their embedded checksum.</td>
<td><i class="fa fa-battery-full ega-stable" title="Stable"></i></td>
<td><i class="fa fa-battery-full lega-stable" title="Stable"></i></td>
</tr>
<tr>
<td>vault</td>
<td>Storage backend: as a regular file system or as a S3 object store.</td>
<td><i class="fa fa-battery-full ega-stable" title="Stable"></i></td>
<td><i class="fa fa-battery-full lega-stable" title="Stable"></i></td>
</tr>
<tr>
<td>finalizers</td>
<td>Receive a so-called Stable ID from Central EGA and flag the ingested file as <em>Ready</em>.</td>
<td><i class="fa fa-battery-full ega-stable" title="Stable"></i></td>
<td><i class="fa fa-battery-full lega-stable" title="Stable"></i></td>
</tr>
<tr>
<td>outgesters</td>
<td>Front-facing HTTP server, receiving POST requests to outgest files.
It is guarded by an external check regarding the given file access permissions.
It is based on standard OAuth authorization.</td>
<td><i class="fa fa-battery-half ega-dev" title="Working, but still under development"></i></td>
<td><i class="fa fa-battery-half lega-dev" title="Working, but still under development"></i></td>
</tr>
<tr>
<td>streamers</td>
<td>Fetch the vault file internally and prepare streaming in Crypt4GH format.</td>
<td><i class="fa fa-battery-half ega-dev" title="Working, but still under development"></i></td>
<td><i class="fa fa-battery-half lega-dev" title="Working, but still under development"></i></td>
</tr>
</tbody>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ loggers:
handlers: [debugFile,console]
propagate: True
qualname: lega
crypt4gh:
level: DEBUG
handlers: [crypt4gh]
propagate: True
qualname: lega
asyncio:
level: DEBUG
handlers: [console]
Expand All @@ -34,10 +39,14 @@ handlers:
class: logging.StreamHandler
formatter: simple
stream: ext://sys.stderr
crypt4gh:
class: logging.StreamHandler
formatter: simple_no_correlation
stream: ext://sys.stderr
debugFile:
class: logging.FileHandler
formatter: lega
filename: '/tmp/ega-debug.log'
filename: '/tmp/lega-debug.log'
mode: 'w'

formatters:
Expand All @@ -46,5 +55,8 @@ formatters:
style: '{'
datefmt: '%Y-%m-%d %H:%M:%S'
simple:
format: '[{correlation_id}][{name:^10}][{levelname:^6}] (L{lineno}) {message}'
style: '{'
simple_no_correlation:
format: '[{name:^10}][{levelname:^6}] (L{lineno}) {message}'
style: '{'
2 changes: 1 addition & 1 deletion lega/conf/loggers/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ handlers:
debugFile:
class: logging.FileHandler
formatter: lega
filename: '/tmp/ega-debug.log'
filename: '/tmp/lega-debug.log'
mode: 'w'

formatters:
Expand Down
15 changes: 4 additions & 11 deletions lega/conf/loggers/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,18 @@ root:
loggers:
lega:
level: INFO
handlers: [syslog,mainFile]
handlers: [console]
propagate: true
qualname: lega

handlers:
noHandler:
class: logging.NullHandler
level: NOTSET
mainFile:
class: logging.FileHandler
console:
class: logging.StreamHandler
formatter: lega
filename: '/tmp/ega.log'
mode: 'w'
syslog:
class: logging.handlers.SysLogHandler
address: !!python/tuple ['ega-db', 514]
formatter: lega
facility: 'local1'
# socktype: socket.SOCK_STREAM # for tcp. Defaults to udp
stream: ext://sys.stderr

formatters:
lega:
Expand Down
4 changes: 2 additions & 2 deletions lega/conf/loggers/syslog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ handlers:
level: NOTSET
syslog:
class: logging.handlers.SysLogHandler
address: !!python/tuple ['ega-monitors', 10514]
address: !!python/tuple ['monitors', 10514]
formatter: lega
facility: 'local1'
syslogSimple:
class: logging.handlers.SysLogHandler
address: !!python/tuple ['ega-monitors', 10514]
address: !!python/tuple ['monitors', 10514]
formatter: simple
facility: 'local1'

Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
zip_safe=False,
entry_points={
'console_scripts': [
'ega-ingest = lega.ingest:main',
'ega-verify = lega.verify:main',
'ega-finalize = lega.finalize:main',
'ega-notifier = lega.notifications:main',
'ega-outgest = lega.outgest:main',
'ega-streamer = lega.streamer:main',
'ega-cleanup = lega.cleanup:main',
'lega-ingest = lega.ingest:main',
'lega-verify = lega.verify:main',
'lega-finalize = lega.finalize:main',
'lega-notifier = lega.notifications:main',
'lega-outgest = lega.outgest:main',
'lega-streamer = lega.streamer:main',
#'lega-cleanup = lega.cleanup:main',
]
},
platforms='any',
Expand Down

0 comments on commit 5b1b0f3

Please sign in to comment.