Skip to content

Commit 45c8aa4

Browse files
committed
rename gamora to monsoon
1 parent a962d6a commit 45c8aa4

File tree

13 files changed

+110
-210
lines changed

13 files changed

+110
-210
lines changed

.env.example

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/usr/bin/env bash
22

33
export REGISTRY_HOST="bigdatauniversity/"
4-
export REPO="bigdatauniversity/portals.gamora"
5-
6-
export PIP_REPO_USERNAME=""
7-
export PIP_REPO_PASSWORD=""
8-
export PIP_REPO_HOST_WITH_CREDS="https://${PIP_REPO_USERNAME:?}:${PIP_REPO_PASSWORD:?}@na.artifactory.swg-devops.com/artifactory/api/pypi/apset-pypi-local/simple"
4+
export REPO="backwork"
95

106
export BACKUP_LOCAL_PATHS="/etc /var"
117
export LOCAL_BACKUP_NUMBER=

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased][]
99

10+
## [1.4.0][] - 2019-08-18
11+
12+
### Changed
13+
14+
- `gamora`/`monsoon` is now `backwork`
15+
16+
1017
## [1.3.0][] - 2019-07-24
1118

1219
### Added
@@ -24,7 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2431

2532
### Added
2633

27-
- Added `monsoon-upload-cos` plugin to upload backup files to IBM Cloud Object Storage
34+
- Added `backwork-upload-cos` plugin to upload backup files to IBM Cloud Object Storage
2835

2936
## [1.0.1][] - 2018-04-06
3037

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Contributing
2+
3+
## Development
4+
5+
1. Build locally.
6+
7+
```sh
8+
bin/build
9+
```
10+
11+
2. Run locally.
12+
13+
```sh
14+
cp .env{.example,}
15+
nano .env
16+
docker-compose up
17+
```
18+
19+
## Publishing
20+
21+
1. Build and publish.
22+
23+
```sh
24+
git add ...
25+
git commit
26+
git tag -a 0.1.0 -m v0.1.1 # If you want to publish
27+
git push --tags
28+
```
29+
30+
2. Check dockerhub
31+
32+
## License
33+
34+
Please refer to [LICENSE](LICENSE).
35+
36+
## Authors
37+
38+
* IBM Developer Skills Network

README.md

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,5 @@
1-
[![Build Status](https://travis.ibm.com/bdu/gamora.svg?token=sEYcW68KU3tGRyi3z1eH&branch=master)](https://travis.ibm.com/bdu/gamora)
1+
# Backwork
22

3-
# Gamora
43

5-
Automated backups for MySQL, Mongo, and file paths using the Monsoon library.
4+
Automated backups for MySQL, Mongo, and file paths using the Backwork library.
65

7-
## Development
8-
9-
1. Build locally.
10-
11-
```sh
12-
bin/build
13-
```
14-
15-
2. Run locally.
16-
17-
```sh
18-
cp .env{.example,}
19-
nano .env
20-
docker-compose up
21-
```
22-
23-
## Production
24-
25-
1. Build and publish.
26-
27-
```sh
28-
git add ...
29-
git commit
30-
git tag -a 0.1.0 -m v0.1.1 # If you want to publish
31-
git push --tags
32-
```
33-
34-
2. Check [Travis](https://travis.ibm.com/bdu/gamora/builds).
35-
36-
## License
37-
38-
Please refer to [LICENSE](LICENSE).
39-
40-
## Authors
41-
42-
* Partner Ecosystem Team, IBM Digital Business Group <mailto:[email protected]>
File renamed without changes.

backwork/Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM python:3.7.4-alpine3.9
2+
LABEL maintainer="[email protected]"
3+
4+
# Install database clients
5+
# Apply security patches
6+
# hadolint ignore=DL3018
7+
RUN echo 'http://dl-3.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories \
8+
&& echo 'http://dl-3.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories \
9+
&& apk add --no-cache \
10+
bash \
11+
curl \
12+
libressl \
13+
mariadb-client \
14+
mongodb-tools \
15+
mysql \
16+
postgresql \
17+
tini \
18+
&& apk add --upgrade --no-cache \
19+
db \
20+
expat \
21+
freetype \
22+
fontconfig \
23+
libpng \
24+
ncurses \
25+
zlib
26+
27+
RUN curl -sL https://sentry.io/get-cli/ | bash
28+
29+
##########
30+
# Backwork
31+
##########
32+
33+
COPY requirements.txt ./
34+
RUN pip install -r ./requirements.txt
35+
36+
COPY ./docker-entrypoint.sh /
37+
38+
VOLUME ["/backups"]
39+
ENTRYPOINT ["/sbin/tini", "--"]
40+
CMD ["/docker-entrypoint.sh"]

gamora/docker-entrypoint.sh renamed to backwork/docker-entrypoint.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ upload_backup() {
4040
remote_path="${SOFTLAYER_PATH:?}/$(date +%Y/%m)"
4141

4242
log "Uploading backup"
43-
monsoon "${NOTIFICATION_SETTINGS[@]}" upload softlayer \
43+
backwork "${NOTIFICATION_SETTINGS[@]}" upload softlayer \
4444
--username "${SOFTLAYER_USER:?}" \
4545
--api-key "${SOFTLAYER_API_KEY:?}" \
4646
--datacenter "${SOFTLAYER_DATACENTER:?}" \
@@ -87,7 +87,7 @@ upload_backup_cos() {
8787
fi
8888

8989
log "Uploading backup to IBM COS"
90-
monsoon "${NOTIFICATION_SETTINGS[@]}" upload cos \
90+
backwork "${NOTIFICATION_SETTINGS[@]}" upload cos \
9191
--endpoint-url "${IBM_COS_ENDPOINT_URL}" \
9292
--instance-id "${IBM_COS_INSTANCE_ID}" \
9393
--access-key "${IBM_COS_ACCESS_KEY}" \
@@ -118,7 +118,7 @@ back_up_mongo() {
118118
filename=mongo_backup_$(date +"%Y%m%d_%H%M%S").archive.gz
119119

120120
log "Taking mongo backup"
121-
monsoon "${NOTIFICATION_SETTINGS[@]}" backup mongo \
121+
backwork "${NOTIFICATION_SETTINGS[@]}" backup mongo \
122122
-u "${MONGO_BACKUP_USER}" \
123123
-p "${MONGO_BACKUP_PASSWORD}" \
124124
--host="${MONGO_HOST}" \
@@ -140,7 +140,7 @@ back_up_mysql() {
140140
filename=mysql_backup_$(date +"%Y%m%d_%H%M%S").archive.gz
141141

142142
log "Taking mysql backup"
143-
monsoon "${NOTIFICATION_SETTINGS[@]}" backup mysql \
143+
backwork "${NOTIFICATION_SETTINGS[@]}" backup mysql \
144144
--output="${BACKUP_PATH:?}/${filename}" \
145145
--gzip \
146146
--all-databases \
@@ -176,7 +176,7 @@ back_up_postgresql() {
176176

177177
filename=postgresql_backup_${database:?}_$(date +"%Y%m%d_%H%M%S").archive.gz
178178

179-
monsoon "${NOTIFICATION_SETTINGS[@]}" backup postgresql \
179+
backwork "${NOTIFICATION_SETTINGS[@]}" backup postgresql \
180180
--output="${BACKUP_PATH:?}/${filename}" \
181181
--gzip \
182182
"--host=${PGHOST:?}" \
@@ -202,7 +202,7 @@ back_up_files() {
202202

203203
log "Taking file backup"
204204
# shellcheck disable=SC2086
205-
cmd="monsoon ${NOTIFICATION_SETTINGS[@]} backup files \
205+
cmd="backwork ${NOTIFICATION_SETTINGS[@]} backup files \
206206
--output=\"${BACKUP_PATH:?}/${filename}\""
207207
for f in ${BACKUP_LOCAL_PATHS_EXCLUDE:-}; do
208208
cmd="${cmd} --exclude=\"${f}\""

backwork/requirements.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
contextlib2==0.5.4
2+
httplib2==0.9.2
3+
backwork==0.3.0
4+
backwork-backup-files==0.3.0
5+
backwork-backup-mongo==0.3.0
6+
backwork-backup-mysql==0.3.0
7+
backwork-backup-postgresql==0.2.1
8+
backwork-notifier-sentry==0.2.0
9+
backwork-upload-softlayer==0.2.1
10+
backwork-upload-cos==0.3.0

bin/build

Lines changed: 0 additions & 12 deletions
This file was deleted.

bin/push

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)