Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce fetch depth #none #2

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
856f0e7
Update Docker file
jbygdell Mar 21, 2019
38d60c0
Add build-hooks for docker-hub
jbygdell Mar 21, 2019
c97e177
Loading configurations as new admin user
silverdaz Mar 25, 2019
fc1f66e
Use static shovels
dtitov Mar 27, 2019
c31cd98
Fix MQ version
jbygdell Mar 28, 2019
d8ce073
Fix env-vars naming
dtitov Mar 28, 2019
2a66f91
Merge pull request #1 from jbygdell/feature/docker-image
silverdaz Mar 28, 2019
43a62bb
Merge branch 'master' into feature/static-shovels
dtitov Apr 4, 2019
e3d88bd
Adding templates
silverdaz Apr 4, 2019
fc29230
Merge pull request #7 from EGA-archive/templates
omllobet Apr 5, 2019
115d84e
Remove cega_processing and cega_error shovels, we don't need them
dtitov Apr 5, 2019
c309438
Add missing lines from Jocke's commit
dtitov Apr 5, 2019
9fdce39
Don't call /usr/local/bin/docker-entrypoint.sh
dtitov Apr 11, 2019
7185170
Add checks of env-vars
dtitov Apr 11, 2019
e529cbf
Merge pull request #4 from EGA-archive/feature/static-shovels
silverdaz Apr 12, 2019
088f5fa
Add TLS config
jbygdell May 2, 2019
c349c0a
Replace `sed` in entrypoint script
jbygdell May 10, 2019
4ef024b
Update Docker file
jbygdell May 10, 2019
4638949
Parameterize the cert paths
jbygdell May 10, 2019
e03e316
Merge pull request #9 from EGA-archive/tls
silverdaz May 10, 2019
e567a17
Fixing permissions on some files read by rabbitmq user
silverdaz May 13, 2019
1fdb700
Merge pull request #12 from EGA-archive/permissions-fix
silverdaz May 14, 2019
e4eb031
Run container as rabbitmq user
jbygdell Jul 2, 2019
746d510
Add more config options to entrypoint script
jbygdell Jul 2, 2019
db8b7a1
Update readme
jbygdell Jul 2, 2019
ad71a3e
Merge pull request #1 from neicnordic/feature/conf
blankdots Jul 3, 2019
d7295f7
Update build directive to use cache from nbis repo
jonandernovella Jul 22, 2019
1d9255a
Merge pull request #2 from neicnordic/feature/hooks
blankdots Jul 23, 2019
df63234
Add ENVs to Dockerfile
jbygdell Apr 7, 2020
19a5ceb
Update entrypoint script
jbygdell Apr 7, 2020
a070c9b
Merge pull request #4 from neicnordic/fixes
blankdots Apr 7, 2020
30944bb
Prepend "/" to vhost name in shovel URI
jbygdell Apr 15, 2020
0011923
Merge pull request #5 from neicnordic/fixes
blankdots Apr 15, 2020
58a001e
Update entrypoint script
jbygdell May 4, 2020
b958dd8
Fix generated cert permisssions
jbygdell May 5, 2020
39de494
Rename entrypoint script
jbygdell May 5, 2020
3531a6d
Merge pull request #6 from neicnordic/standalone
blankdots May 13, 2020
5cd5bd0
Use files.verified shovel
jonandernovella Jun 24, 2020
027f903
Merge pull request #7 from neicnordic/feature/verified
blankdots Jun 25, 2020
9518da8
Update config
jbygdell Oct 16, 2020
58e0890
Reference `neicnordic` not `EGA-Archve`
jbygdell Oct 16, 2020
36c407e
Use accessionID instead of stableID
jbygdell Oct 19, 2020
8145ef8
Merge pull request #8 from neicnordic/New_config
jbygdell Oct 19, 2020
add7254
Add missing error queue
jbygdell Oct 20, 2020
671ba65
Add bindings
jbygdell Oct 20, 2020
88c0055
Merge pull request #9 from neicnordic/New_config
jbygdell Oct 20, 2020
c04af16
add backup queue
blankdots Oct 21, 2020
606b935
Merge pull request #10 from neicnordic/feature/backup-queue
blankdots Oct 21, 2020
b93ca97
Update README.md
blankdots Oct 21, 2020
a8df380
Merge pull request #11 from neicnordic/rename-to-sda
blankdots Oct 21, 2020
4d61b98
add missing mappings queue
blankdots Nov 24, 2020
9856660
stand-alone does not have localega sources
blankdots Nov 24, 2020
25e11e9
Merge pull request #13 from neicnordic/bugfix/missing-queues
jbygdell Nov 25, 2020
5e17cba
bump version & publish dockerhub & github registry
jbygdell Nov 29, 2021
76681f8
Merge pull request #20 from neicnordic/tag_and_build
blankdots Nov 29, 2021
410cac4
Update mq version to 3.8.16
jbygdell Nov 29, 2021
ff6a22b
Rework entrypoint script to not generate self signed certificates.
jbygdell Nov 29, 2021
bce59c2
Update README
jbygdell Nov 29, 2021
521e969
Delete obsolete hooks folder
jbygdell Nov 29, 2021
f122a3d
Merge pull request #21 from neicnordic/no_tls
norling Nov 30, 2021
e9b6c63
Update tag_and_build.yaml
jbygdell Dec 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug Report
about: Use this to report a new bug

---

### Expected Behavior
<!--- Tell us what should happen -->

### Current Behavior
<!--- Tell us what happens instead of the expected behavior -->

### Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->

### Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.

### Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

<!--- Provide a general summary of the issue in the Title above -->
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature Request
about: Suggest an idea for this project

---

### Description
<!-- What use case are you trying to solve with this feature -->

### Proposed solution
<!-- A clear and concise description of what you want to happen -->

### Definition of Done
<!-- How to know this is implemeted. Preferably one short sentence -->
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/new-sprint-task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Sprint Task
about: Use when creating a new task in a sprint

---

### Description
<!-- What are you working on -->

### Definition of Done
<!-- How to know when the task is done. -->

### How to test
<!-- How can someone else verify the task, can be test-suite or something else -->
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!-- Lines like this one are comments and will not be shown in the final output. -->
<!-- Make sure that you have read the "Contributing" section of the README and also the notes in CodingStyle. -->
<!-- If you are a collaborator, please add labels and assign other collaborators for a review. -->

### Describe the pull request:
<!-- Replace [ ] with [x] to select options. -->
- [ ] Bug fix
- [ ] Functional change
- [ ] New feature
- [ ] Code cleanup
- [ ] Build system change
- [ ] Documentation change
- [ ] Language translation

### Pull request long description:
<!-- Describe your pull request in detail. -->

### Changes made:
<!-- Enumerate the changes with 1), 2), 3) etc. -->
<!-- Ensure the test cases are updated if needed. -->

### Related issues:
<!-- Reference issues with #<issue-num>. -->
<!-- Write "Fixes #<issue-num>" to notify Github that this PR fixes an issue. -->

### Additional information:
<!-- Include sample dive log or other relevant information to allow testing the change where feasible. -->

### Release note:
<!-- Describe if this change needs a release note present in CHANGELOG.md. -->
<!-- Also, please make sure to add the release note on top of the file CHANGELOG.md. -->

### Documentation change:
<!-- If this PR makes changes to user functionality, then the documentation has to be updated too. -->
<!-- Please, briefly outline here what has changed in terms of the user experience (UX). -->
<!-- If UX changes have been made, a maintainer should apply the 'needs-documentation-change' label. -->

### Mentions:
<!-- Mention users that you want to review your pull request with @<user-name>. Leave empty if not sure. -->
71 changes: 71 additions & 0 deletions .github/workflows/tag_and_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Bump version
on:
push:
branches:
- master
jobs:
tag:
name: bump tags
outputs:
part: ${{ steps.bump_tag.outputs.part }}
tag: ${{ steps.bump_tag.outputs.tag }}
new_tag: ${{ steps.bump_tag.outputs.new_tag }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '1'
- name: Bump version and push tag
id: bump_tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch

push_to_registry:
needs: tag
if: needs.tag.outputs.part != ''
name: Push Docker image to Github Container registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to the Github Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ needs.tag.outputs.tag }}
ghcr.io/${{ github.repository }}:latest
${{ github.repository }}:${{ needs.tag.outputs.tag }}
${{ github.repository }}:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
org.opencontainers.image.revision=${{ github.sha }}
34 changes: 21 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
FROM rabbitmq:3.6.14-management
FROM rabbitmq:3.8.16-management-alpine

EXPOSE 5672 15672
ARG BUILD_DATE
ARG SOURCE_COMMIT

VOLUME /var/lib/rabbitmq
LABEL maintainer "EGA System Developers"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.vcs-url="https://github.com/neicnordic/LocalEGA-mq"
LABEL org.label-schema.vcs-ref=$SOURCE_COMMIT

RUN mkdir -p /etc/rabbitmq/ && \
chown -R rabbitmq:rabbitmq /etc/rabbitmq
ENV RABBITMQ_CONFIG_FILE=/var/lib/rabbitmq/rabbitmq
ENV RABBITMQ_ADVANCED_CONFIG_FILE=/var/lib/rabbitmq/advanced
ENV RABBITMQ_LOG_BASE=/var/lib/rabbitmq

# Initialization
RUN rabbitmq-plugins enable --offline rabbitmq_federation && \
rabbitmq-plugins enable --offline rabbitmq_federation_management && \
rabbitmq-plugins enable --offline rabbitmq_shovel && \
rabbitmq-plugins enable --offline rabbitmq_shovel_management
RUN apk add --no-cache ca-certificates openssl

COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod 755 /usr/local/bin/entrypoint.sh
RUN rabbitmq-plugins enable --offline rabbitmq_federation rabbitmq_federation_management rabbitmq_shovel rabbitmq_shovel_management

COPY entrypoint.sh /usr/local/bin/docker-entrypoint.sh

RUN chmod +x /usr/local/bin/docker-entrypoint.sh

USER 100:101

ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["rabbitmq-server"]
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@
# LocalEGA internal message broker in a docker image
# NeIC SDA internal message broker in a docker image

We use [RabbitMQ 3.6.14](https://hub.docker.com/_/rabbitmq) including the management plugins.
We use [RabbitMQ 3.8.16](https://hub.docker.com/_/rabbitmq) including the management plugins.

## Configuration

The following environment variables can be used to configure the broker:

| Variable | Description |
|---------:|:------------|
| `MQ_VHOST` | Default vhost other than `/` |
| `MQ_VERIFY` | Set to `verify_none` to disable verification of client certificate |
| `MQ_USER` | Default user (with admin rights) |
| `MQ_PASSWORD_HASH` | Password hash for the above user |
| `CEGA_CONNECTION` | DSN URL for the shovels and federated queues with CentralEGA |
| `MQ_SERVER_CERT` | Path to the server SSL certificate |
| `MQ_SERVER_KEY` | Path to the server SSL key |
| `MQ_CA` | Path to the CA root certificate |
| `MQ_VERIFY` | Require client certificates (`verify_peer` or `verify_none`)
| `NOTLS` | Run the server without SSL |

If you want persistent data, you can use a named volume or a bind-mount and make it point to `/var/lib/rabbitmq`.

## Sample Docker Compose definition

```docker-compose
version: '3.3'

services:

mq:
image: egarchive/lega-mq:latest
hostname: mq
ports:
- "5672:5672"
- "15672:15672"
environment:
- MQ_VHOST=vhost
- MQ_USER=admin
- MQ_PASSWORD_HASH=4tHURqDiZzypw0NTvoHhpn8/MMgONWonWxgRZ4NXgR8nZRBz
- NOTLS=true
- CEGA_CONNECTION

```

Run `docker-compose up -d` to test it.
Loading